@tscircuit/props 0.0.537 → 0.0.539
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 +25 -0
- package/dist/index.d.ts +97 -10
- package/dist/index.js +787 -758
- package/dist/index.js.map +1 -1
- package/lib/components/chip.ts +10 -0
- package/lib/components/drc-check.ts +16 -0
- package/lib/components/spicemodel.ts +15 -0
- package/lib/customDrc.ts +78 -0
- package/lib/index.ts +3 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16054,9 +16054,15 @@ var kicadPinMetadata = z22.object({
|
|
|
16054
16054
|
});
|
|
16055
16055
|
expectTypesMatch(true);
|
|
16056
16056
|
|
|
16057
|
-
// lib/
|
|
16057
|
+
// lib/customDrc.ts
|
|
16058
16058
|
import { z as z23 } from "zod";
|
|
16059
|
-
var
|
|
16059
|
+
var customDrcCheckFn = z23.custom(
|
|
16060
|
+
(value) => typeof value === "function"
|
|
16061
|
+
);
|
|
16062
|
+
|
|
16063
|
+
// lib/common/ninePointAnchor.ts
|
|
16064
|
+
import { z as z24 } from "zod";
|
|
16065
|
+
var ninePointAnchor = z24.enum([
|
|
16060
16066
|
"top_left",
|
|
16061
16067
|
"top_center",
|
|
16062
16068
|
"top_right",
|
|
@@ -16069,47 +16075,47 @@ var ninePointAnchor = z23.enum([
|
|
|
16069
16075
|
]);
|
|
16070
16076
|
|
|
16071
16077
|
// lib/components/board.ts
|
|
16072
|
-
import { z as
|
|
16078
|
+
import { z as z38 } from "zod";
|
|
16073
16079
|
|
|
16074
16080
|
// lib/components/group.ts
|
|
16075
16081
|
import {
|
|
16076
16082
|
length as length3,
|
|
16077
16083
|
distance as distance11
|
|
16078
16084
|
} from "circuit-json";
|
|
16079
|
-
import { z as
|
|
16085
|
+
import { z as z37 } from "zod";
|
|
16080
16086
|
|
|
16081
16087
|
// lib/manual-edits/manual-edit-events/base_manual_edit_event.ts
|
|
16082
|
-
import { z as
|
|
16083
|
-
var base_manual_edit_event =
|
|
16084
|
-
edit_event_id:
|
|
16085
|
-
in_progress:
|
|
16086
|
-
created_at:
|
|
16088
|
+
import { z as z25 } from "zod";
|
|
16089
|
+
var base_manual_edit_event = z25.object({
|
|
16090
|
+
edit_event_id: z25.string(),
|
|
16091
|
+
in_progress: z25.boolean().optional(),
|
|
16092
|
+
created_at: z25.number()
|
|
16087
16093
|
});
|
|
16088
16094
|
expectTypesMatch(
|
|
16089
16095
|
true
|
|
16090
16096
|
);
|
|
16091
16097
|
|
|
16092
16098
|
// lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts
|
|
16093
|
-
import { z as
|
|
16099
|
+
import { z as z26 } from "zod";
|
|
16094
16100
|
var edit_pcb_component_location_event = base_manual_edit_event.extend({
|
|
16095
|
-
pcb_edit_event_type:
|
|
16096
|
-
edit_event_type:
|
|
16097
|
-
pcb_component_id:
|
|
16098
|
-
original_center:
|
|
16099
|
-
new_center:
|
|
16101
|
+
pcb_edit_event_type: z26.literal("edit_component_location").describe("deprecated"),
|
|
16102
|
+
edit_event_type: z26.literal("edit_pcb_component_location"),
|
|
16103
|
+
pcb_component_id: z26.string(),
|
|
16104
|
+
original_center: z26.object({ x: z26.number(), y: z26.number() }),
|
|
16105
|
+
new_center: z26.object({ x: z26.number(), y: z26.number() })
|
|
16100
16106
|
});
|
|
16101
16107
|
var edit_component_location_event = edit_pcb_component_location_event;
|
|
16102
16108
|
expectTypesMatch(true);
|
|
16103
16109
|
|
|
16104
16110
|
// lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts
|
|
16105
|
-
import { z as
|
|
16111
|
+
import { z as z27 } from "zod";
|
|
16106
16112
|
var edit_trace_hint_event = base_manual_edit_event.extend({
|
|
16107
|
-
pcb_edit_event_type:
|
|
16108
|
-
edit_event_type:
|
|
16109
|
-
pcb_port_id:
|
|
16110
|
-
pcb_trace_hint_id:
|
|
16111
|
-
route:
|
|
16112
|
-
|
|
16113
|
+
pcb_edit_event_type: z27.literal("edit_trace_hint").describe("deprecated"),
|
|
16114
|
+
edit_event_type: z27.literal("edit_pcb_trace_hint").optional(),
|
|
16115
|
+
pcb_port_id: z27.string(),
|
|
16116
|
+
pcb_trace_hint_id: z27.string().optional(),
|
|
16117
|
+
route: z27.array(
|
|
16118
|
+
z27.object({ x: z27.number(), y: z27.number(), via: z27.boolean().optional() })
|
|
16113
16119
|
)
|
|
16114
16120
|
});
|
|
16115
16121
|
expectTypesMatch(
|
|
@@ -16117,38 +16123,38 @@ expectTypesMatch(
|
|
|
16117
16123
|
);
|
|
16118
16124
|
|
|
16119
16125
|
// lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts
|
|
16120
|
-
import { z as
|
|
16126
|
+
import { z as z28 } from "zod";
|
|
16121
16127
|
var edit_schematic_component_location_event = base_manual_edit_event.extend({
|
|
16122
|
-
edit_event_type:
|
|
16123
|
-
schematic_component_id:
|
|
16124
|
-
original_center:
|
|
16125
|
-
new_center:
|
|
16128
|
+
edit_event_type: z28.literal("edit_schematic_component_location"),
|
|
16129
|
+
schematic_component_id: z28.string(),
|
|
16130
|
+
original_center: z28.object({ x: z28.number(), y: z28.number() }),
|
|
16131
|
+
new_center: z28.object({ x: z28.number(), y: z28.number() })
|
|
16126
16132
|
});
|
|
16127
16133
|
expectTypesMatch(true);
|
|
16128
16134
|
|
|
16129
16135
|
// lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts
|
|
16130
|
-
import { z as
|
|
16136
|
+
import { z as z29 } from "zod";
|
|
16131
16137
|
var edit_pcb_group_location_event = base_manual_edit_event.extend({
|
|
16132
|
-
edit_event_type:
|
|
16133
|
-
pcb_group_id:
|
|
16134
|
-
original_center:
|
|
16135
|
-
new_center:
|
|
16138
|
+
edit_event_type: z29.literal("edit_pcb_group_location"),
|
|
16139
|
+
pcb_group_id: z29.string(),
|
|
16140
|
+
original_center: z29.object({ x: z29.number(), y: z29.number() }),
|
|
16141
|
+
new_center: z29.object({ x: z29.number(), y: z29.number() })
|
|
16136
16142
|
});
|
|
16137
16143
|
expectTypesMatch(true);
|
|
16138
16144
|
|
|
16139
16145
|
// lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts
|
|
16140
|
-
import { z as
|
|
16146
|
+
import { z as z30 } from "zod";
|
|
16141
16147
|
var edit_schematic_group_location_event = base_manual_edit_event.extend({
|
|
16142
|
-
edit_event_type:
|
|
16143
|
-
schematic_group_id:
|
|
16144
|
-
original_center:
|
|
16145
|
-
new_center:
|
|
16148
|
+
edit_event_type: z30.literal("edit_schematic_group_location"),
|
|
16149
|
+
schematic_group_id: z30.string(),
|
|
16150
|
+
original_center: z30.object({ x: z30.number(), y: z30.number() }),
|
|
16151
|
+
new_center: z30.object({ x: z30.number(), y: z30.number() })
|
|
16146
16152
|
});
|
|
16147
16153
|
expectTypesMatch(true);
|
|
16148
16154
|
|
|
16149
16155
|
// lib/manual-edits/manual_edit_event.ts
|
|
16150
|
-
import { z as
|
|
16151
|
-
var manual_edit_event =
|
|
16156
|
+
import { z as z31 } from "zod";
|
|
16157
|
+
var manual_edit_event = z31.union([
|
|
16152
16158
|
edit_pcb_component_location_event,
|
|
16153
16159
|
edit_trace_hint_event,
|
|
16154
16160
|
edit_schematic_component_location_event
|
|
@@ -16156,33 +16162,33 @@ var manual_edit_event = z30.union([
|
|
|
16156
16162
|
expectTypesMatch(true);
|
|
16157
16163
|
|
|
16158
16164
|
// lib/manual-edits/manual_edits_file.ts
|
|
16159
|
-
import { z as
|
|
16165
|
+
import { z as z35 } from "zod";
|
|
16160
16166
|
|
|
16161
16167
|
// lib/manual-edits/manual_pcb_placement.ts
|
|
16162
|
-
import { z as
|
|
16168
|
+
import { z as z32 } from "zod";
|
|
16163
16169
|
import { point as point2 } from "circuit-json";
|
|
16164
|
-
var manual_pcb_placement =
|
|
16165
|
-
selector:
|
|
16166
|
-
relative_to:
|
|
16170
|
+
var manual_pcb_placement = z32.object({
|
|
16171
|
+
selector: z32.string(),
|
|
16172
|
+
relative_to: z32.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16167
16173
|
center: point2
|
|
16168
16174
|
});
|
|
16169
16175
|
expectTypesMatch(true);
|
|
16170
16176
|
|
|
16171
16177
|
// lib/manual-edits/manual_trace_hint.ts
|
|
16172
|
-
import { z as
|
|
16178
|
+
import { z as z33 } from "zod";
|
|
16173
16179
|
import { route_hint_point } from "circuit-json";
|
|
16174
|
-
var manual_trace_hint =
|
|
16175
|
-
pcb_port_selector:
|
|
16176
|
-
offsets:
|
|
16180
|
+
var manual_trace_hint = z33.object({
|
|
16181
|
+
pcb_port_selector: z33.string(),
|
|
16182
|
+
offsets: z33.array(route_hint_point)
|
|
16177
16183
|
});
|
|
16178
16184
|
expectTypesMatch(true);
|
|
16179
16185
|
|
|
16180
16186
|
// lib/manual-edits/manual_schematic_placement.ts
|
|
16181
|
-
import { z as
|
|
16187
|
+
import { z as z34 } from "zod";
|
|
16182
16188
|
import { point as point4 } from "circuit-json";
|
|
16183
|
-
var manual_schematic_placement =
|
|
16184
|
-
selector:
|
|
16185
|
-
relative_to:
|
|
16189
|
+
var manual_schematic_placement = z34.object({
|
|
16190
|
+
selector: z34.string(),
|
|
16191
|
+
relative_to: z34.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16186
16192
|
center: point4
|
|
16187
16193
|
});
|
|
16188
16194
|
expectTypesMatch(
|
|
@@ -16190,37 +16196,37 @@ expectTypesMatch(
|
|
|
16190
16196
|
);
|
|
16191
16197
|
|
|
16192
16198
|
// lib/manual-edits/manual_edits_file.ts
|
|
16193
|
-
var manual_edits_file =
|
|
16194
|
-
pcb_placements:
|
|
16195
|
-
manual_trace_hints:
|
|
16196
|
-
schematic_placements:
|
|
16199
|
+
var manual_edits_file = z35.object({
|
|
16200
|
+
pcb_placements: z35.array(manual_pcb_placement).optional(),
|
|
16201
|
+
manual_trace_hints: z35.array(manual_trace_hint).optional(),
|
|
16202
|
+
schematic_placements: z35.array(manual_schematic_placement).optional()
|
|
16197
16203
|
});
|
|
16198
16204
|
expectTypesMatch(true);
|
|
16199
16205
|
|
|
16200
16206
|
// lib/common/connectionsProp.ts
|
|
16201
|
-
import { z as
|
|
16202
|
-
var connectionTarget =
|
|
16207
|
+
import { z as z36 } from "zod";
|
|
16208
|
+
var connectionTarget = z36.string().or(z36.array(z36.string()).readonly()).or(z36.array(z36.string()));
|
|
16203
16209
|
var createConnectionsProp = (labels) => {
|
|
16204
|
-
return
|
|
16210
|
+
return z36.record(z36.enum(labels), connectionTarget);
|
|
16205
16211
|
};
|
|
16206
16212
|
|
|
16207
16213
|
// lib/components/group.ts
|
|
16208
|
-
var layoutConfig =
|
|
16209
|
-
layoutMode:
|
|
16210
|
-
position:
|
|
16211
|
-
grid:
|
|
16212
|
-
gridCols:
|
|
16213
|
-
gridRows:
|
|
16214
|
-
gridTemplateRows:
|
|
16215
|
-
gridTemplateColumns:
|
|
16216
|
-
gridTemplate:
|
|
16217
|
-
gridGap:
|
|
16218
|
-
gridRowGap:
|
|
16219
|
-
gridColumnGap:
|
|
16220
|
-
flex:
|
|
16221
|
-
flexDirection:
|
|
16222
|
-
alignItems:
|
|
16223
|
-
justifyContent:
|
|
16214
|
+
var layoutConfig = z37.object({
|
|
16215
|
+
layoutMode: z37.enum(["grid", "flex", "match-adapt", "relative", "none"]).optional(),
|
|
16216
|
+
position: z37.enum(["absolute", "relative"]).optional(),
|
|
16217
|
+
grid: z37.boolean().optional(),
|
|
16218
|
+
gridCols: z37.number().or(z37.string()).optional(),
|
|
16219
|
+
gridRows: z37.number().or(z37.string()).optional(),
|
|
16220
|
+
gridTemplateRows: z37.string().optional(),
|
|
16221
|
+
gridTemplateColumns: z37.string().optional(),
|
|
16222
|
+
gridTemplate: z37.string().optional(),
|
|
16223
|
+
gridGap: z37.number().or(z37.string()).optional(),
|
|
16224
|
+
gridRowGap: z37.number().or(z37.string()).optional(),
|
|
16225
|
+
gridColumnGap: z37.number().or(z37.string()).optional(),
|
|
16226
|
+
flex: z37.boolean().or(z37.string()).optional(),
|
|
16227
|
+
flexDirection: z37.enum(["row", "column"]).optional(),
|
|
16228
|
+
alignItems: z37.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16229
|
+
justifyContent: z37.enum([
|
|
16224
16230
|
"start",
|
|
16225
16231
|
"center",
|
|
16226
16232
|
"end",
|
|
@@ -16229,16 +16235,16 @@ var layoutConfig = z36.object({
|
|
|
16229
16235
|
"space-around",
|
|
16230
16236
|
"space-evenly"
|
|
16231
16237
|
]).optional(),
|
|
16232
|
-
flexRow:
|
|
16233
|
-
flexColumn:
|
|
16234
|
-
gap:
|
|
16235
|
-
pack:
|
|
16236
|
-
packOrderStrategy:
|
|
16238
|
+
flexRow: z37.boolean().optional(),
|
|
16239
|
+
flexColumn: z37.boolean().optional(),
|
|
16240
|
+
gap: z37.number().or(z37.string()).optional(),
|
|
16241
|
+
pack: z37.boolean().optional().describe("Pack the contents of this group using a packing strategy"),
|
|
16242
|
+
packOrderStrategy: z37.enum([
|
|
16237
16243
|
"largest_to_smallest",
|
|
16238
16244
|
"first_to_last",
|
|
16239
16245
|
"highest_to_lowest_pin_count"
|
|
16240
16246
|
]).optional(),
|
|
16241
|
-
packPlacementStrategy:
|
|
16247
|
+
packPlacementStrategy: z37.enum(["shortest_connection_along_outline"]).optional(),
|
|
16242
16248
|
padding: length3.optional(),
|
|
16243
16249
|
paddingLeft: length3.optional(),
|
|
16244
16250
|
paddingRight: length3.optional(),
|
|
@@ -16248,17 +16254,17 @@ var layoutConfig = z36.object({
|
|
|
16248
16254
|
paddingY: length3.optional(),
|
|
16249
16255
|
width: length3.optional(),
|
|
16250
16256
|
height: length3.optional(),
|
|
16251
|
-
matchAdapt:
|
|
16252
|
-
matchAdaptTemplate:
|
|
16257
|
+
matchAdapt: z37.boolean().optional(),
|
|
16258
|
+
matchAdaptTemplate: z37.any().optional()
|
|
16253
16259
|
});
|
|
16254
16260
|
expectTypesMatch(true);
|
|
16255
|
-
var border =
|
|
16261
|
+
var border = z37.object({
|
|
16256
16262
|
strokeWidth: length3.optional(),
|
|
16257
|
-
dashed:
|
|
16258
|
-
solid:
|
|
16263
|
+
dashed: z37.boolean().optional(),
|
|
16264
|
+
solid: z37.boolean().optional()
|
|
16259
16265
|
});
|
|
16260
|
-
var pcbAnchorAlignmentAutocomplete =
|
|
16261
|
-
var routingTolerances =
|
|
16266
|
+
var pcbAnchorAlignmentAutocomplete = z37.custom((value) => typeof value === "string");
|
|
16267
|
+
var routingTolerances = z37.object({
|
|
16262
16268
|
minTraceWidth: length3.optional(),
|
|
16263
16269
|
minViaHoleEdgeToViaHoleEdgeClearance: length3.optional(),
|
|
16264
16270
|
minViaEdgeToPadEdgeClearance: length3.optional(),
|
|
@@ -16269,19 +16275,19 @@ var routingTolerances = z36.object({
|
|
|
16269
16275
|
minViaHoleDiameter: length3.optional(),
|
|
16270
16276
|
minViaPadDiameter: length3.optional()
|
|
16271
16277
|
});
|
|
16272
|
-
var autorouterConfig =
|
|
16278
|
+
var autorouterConfig = z37.object({
|
|
16273
16279
|
serverUrl: url.optional(),
|
|
16274
|
-
inputFormat:
|
|
16275
|
-
serverMode:
|
|
16276
|
-
serverCacheEnabled:
|
|
16277
|
-
cache:
|
|
16280
|
+
inputFormat: z37.enum(["simplified", "circuit-json"]).optional(),
|
|
16281
|
+
serverMode: z37.enum(["job", "solve-endpoint"]).optional(),
|
|
16282
|
+
serverCacheEnabled: z37.boolean().optional(),
|
|
16283
|
+
cache: z37.custom((v) => true).optional(),
|
|
16278
16284
|
traceClearance: length3.optional(),
|
|
16279
|
-
availableJumperTypes:
|
|
16280
|
-
groupMode:
|
|
16281
|
-
algorithmFn:
|
|
16285
|
+
availableJumperTypes: z37.array(z37.enum(["1206x4", "0603"])).optional(),
|
|
16286
|
+
groupMode: z37.enum(["sequential_trace", "subcircuit", "sequential-trace"]).optional(),
|
|
16287
|
+
algorithmFn: z37.custom(
|
|
16282
16288
|
(v) => typeof v === "function" || v === void 0
|
|
16283
16289
|
).optional(),
|
|
16284
|
-
preset:
|
|
16290
|
+
preset: z37.enum([
|
|
16285
16291
|
"sequential_trace",
|
|
16286
16292
|
"subcircuit",
|
|
16287
16293
|
"auto",
|
|
@@ -16297,59 +16303,59 @@ var autorouterConfig = z36.object({
|
|
|
16297
16303
|
"auto-local",
|
|
16298
16304
|
"auto-cloud"
|
|
16299
16305
|
]).optional(),
|
|
16300
|
-
local:
|
|
16306
|
+
local: z37.boolean().optional()
|
|
16301
16307
|
});
|
|
16302
|
-
var autorouterPreset =
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16308
|
+
var autorouterPreset = z37.union([
|
|
16309
|
+
z37.literal("sequential_trace"),
|
|
16310
|
+
z37.literal("subcircuit"),
|
|
16311
|
+
z37.literal("auto"),
|
|
16312
|
+
z37.literal("auto_local"),
|
|
16313
|
+
z37.literal("auto_cloud"),
|
|
16314
|
+
z37.literal("auto_jumper"),
|
|
16315
|
+
z37.literal("tscircuit_beta"),
|
|
16316
|
+
z37.literal("krt"),
|
|
16317
|
+
z37.literal("freerouting"),
|
|
16318
|
+
z37.literal("laser_prefab"),
|
|
16313
16319
|
// Prefabricated PCB with laser copper ablation
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16320
|
+
z37.literal("auto-jumper"),
|
|
16321
|
+
z37.literal("sequential-trace"),
|
|
16322
|
+
z37.literal("auto-local"),
|
|
16323
|
+
z37.literal("auto-cloud")
|
|
16318
16324
|
]);
|
|
16319
|
-
var autorouterString =
|
|
16320
|
-
var autorouterProp =
|
|
16325
|
+
var autorouterString = z37.string();
|
|
16326
|
+
var autorouterProp = z37.union([
|
|
16321
16327
|
autorouterConfig,
|
|
16322
16328
|
autorouterPreset,
|
|
16323
16329
|
autorouterString
|
|
16324
16330
|
]);
|
|
16325
|
-
var autorouterEffortLevel =
|
|
16331
|
+
var autorouterEffortLevel = z37.enum(["1x", "2x", "5x", "10x", "100x"]);
|
|
16326
16332
|
var baseGroupProps = commonLayoutProps.extend({
|
|
16327
|
-
name:
|
|
16328
|
-
children:
|
|
16329
|
-
schTitle:
|
|
16330
|
-
key:
|
|
16331
|
-
showAsSchematicBox:
|
|
16332
|
-
connections:
|
|
16333
|
+
name: z37.string().optional(),
|
|
16334
|
+
children: z37.any().optional(),
|
|
16335
|
+
schTitle: z37.string().optional(),
|
|
16336
|
+
key: z37.any().optional(),
|
|
16337
|
+
showAsSchematicBox: z37.boolean().optional(),
|
|
16338
|
+
connections: z37.record(z37.string(), connectionTarget.optional()).optional(),
|
|
16333
16339
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16334
16340
|
schPinSpacing: length3.optional(),
|
|
16335
16341
|
schPinStyle: schematicPinStyle.optional(),
|
|
16336
16342
|
...layoutConfig.shape,
|
|
16337
16343
|
grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
|
|
16338
16344
|
flex: layoutConfig.shape.flex.describe("@deprecated use pcbFlex"),
|
|
16339
|
-
pcbGrid:
|
|
16340
|
-
pcbGridCols:
|
|
16341
|
-
pcbGridRows:
|
|
16342
|
-
pcbGridTemplateRows:
|
|
16343
|
-
pcbGridTemplateColumns:
|
|
16344
|
-
pcbGridTemplate:
|
|
16345
|
-
pcbGridGap:
|
|
16346
|
-
pcbGridRowGap:
|
|
16347
|
-
pcbGridColumnGap:
|
|
16348
|
-
pcbFlex:
|
|
16349
|
-
pcbFlexGap:
|
|
16350
|
-
pcbFlexDirection:
|
|
16351
|
-
pcbAlignItems:
|
|
16352
|
-
pcbJustifyContent:
|
|
16345
|
+
pcbGrid: z37.boolean().optional(),
|
|
16346
|
+
pcbGridCols: z37.number().or(z37.string()).optional(),
|
|
16347
|
+
pcbGridRows: z37.number().or(z37.string()).optional(),
|
|
16348
|
+
pcbGridTemplateRows: z37.string().optional(),
|
|
16349
|
+
pcbGridTemplateColumns: z37.string().optional(),
|
|
16350
|
+
pcbGridTemplate: z37.string().optional(),
|
|
16351
|
+
pcbGridGap: z37.number().or(z37.string()).optional(),
|
|
16352
|
+
pcbGridRowGap: z37.number().or(z37.string()).optional(),
|
|
16353
|
+
pcbGridColumnGap: z37.number().or(z37.string()).optional(),
|
|
16354
|
+
pcbFlex: z37.boolean().or(z37.string()).optional(),
|
|
16355
|
+
pcbFlexGap: z37.number().or(z37.string()).optional(),
|
|
16356
|
+
pcbFlexDirection: z37.enum(["row", "column"]).optional(),
|
|
16357
|
+
pcbAlignItems: z37.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16358
|
+
pcbJustifyContent: z37.enum([
|
|
16353
16359
|
"start",
|
|
16354
16360
|
"center",
|
|
16355
16361
|
"end",
|
|
@@ -16358,25 +16364,25 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16358
16364
|
"space-around",
|
|
16359
16365
|
"space-evenly"
|
|
16360
16366
|
]).optional(),
|
|
16361
|
-
pcbFlexRow:
|
|
16362
|
-
pcbFlexColumn:
|
|
16363
|
-
pcbGap:
|
|
16364
|
-
pcbPack:
|
|
16365
|
-
pcbPackGap:
|
|
16366
|
-
schGrid:
|
|
16367
|
-
schGridCols:
|
|
16368
|
-
schGridRows:
|
|
16369
|
-
schGridTemplateRows:
|
|
16370
|
-
schGridTemplateColumns:
|
|
16371
|
-
schGridTemplate:
|
|
16372
|
-
schGridGap:
|
|
16373
|
-
schGridRowGap:
|
|
16374
|
-
schGridColumnGap:
|
|
16375
|
-
schFlex:
|
|
16376
|
-
schFlexGap:
|
|
16377
|
-
schFlexDirection:
|
|
16378
|
-
schAlignItems:
|
|
16379
|
-
schJustifyContent:
|
|
16367
|
+
pcbFlexRow: z37.boolean().optional(),
|
|
16368
|
+
pcbFlexColumn: z37.boolean().optional(),
|
|
16369
|
+
pcbGap: z37.number().or(z37.string()).optional(),
|
|
16370
|
+
pcbPack: z37.boolean().optional(),
|
|
16371
|
+
pcbPackGap: z37.number().or(z37.string()).optional(),
|
|
16372
|
+
schGrid: z37.boolean().optional(),
|
|
16373
|
+
schGridCols: z37.number().or(z37.string()).optional(),
|
|
16374
|
+
schGridRows: z37.number().or(z37.string()).optional(),
|
|
16375
|
+
schGridTemplateRows: z37.string().optional(),
|
|
16376
|
+
schGridTemplateColumns: z37.string().optional(),
|
|
16377
|
+
schGridTemplate: z37.string().optional(),
|
|
16378
|
+
schGridGap: z37.number().or(z37.string()).optional(),
|
|
16379
|
+
schGridRowGap: z37.number().or(z37.string()).optional(),
|
|
16380
|
+
schGridColumnGap: z37.number().or(z37.string()).optional(),
|
|
16381
|
+
schFlex: z37.boolean().or(z37.string()).optional(),
|
|
16382
|
+
schFlexGap: z37.number().or(z37.string()).optional(),
|
|
16383
|
+
schFlexDirection: z37.enum(["row", "column"]).optional(),
|
|
16384
|
+
schAlignItems: z37.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16385
|
+
schJustifyContent: z37.enum([
|
|
16380
16386
|
"start",
|
|
16381
16387
|
"center",
|
|
16382
16388
|
"end",
|
|
@@ -16385,11 +16391,11 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16385
16391
|
"space-around",
|
|
16386
16392
|
"space-evenly"
|
|
16387
16393
|
]).optional(),
|
|
16388
|
-
schFlexRow:
|
|
16389
|
-
schFlexColumn:
|
|
16390
|
-
schGap:
|
|
16391
|
-
schPack:
|
|
16392
|
-
schMatchAdapt:
|
|
16394
|
+
schFlexRow: z37.boolean().optional(),
|
|
16395
|
+
schFlexColumn: z37.boolean().optional(),
|
|
16396
|
+
schGap: z37.number().or(z37.string()).optional(),
|
|
16397
|
+
schPack: z37.boolean().optional(),
|
|
16398
|
+
schMatchAdapt: z37.boolean().optional(),
|
|
16393
16399
|
pcbWidth: length3.optional(),
|
|
16394
16400
|
pcbHeight: length3.optional(),
|
|
16395
16401
|
minTraceWidth: length3.optional(),
|
|
@@ -16412,38 +16418,38 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16412
16418
|
pcbPaddingBottom: length3.optional(),
|
|
16413
16419
|
pcbAnchorAlignment: pcbAnchorAlignmentAutocomplete.optional()
|
|
16414
16420
|
});
|
|
16415
|
-
var partsEngine =
|
|
16421
|
+
var partsEngine = z37.custom((v) => "findPart" in v);
|
|
16416
16422
|
var subcircuitGroupProps = baseGroupProps.extend({
|
|
16417
16423
|
manualEdits: manual_edits_file.optional(),
|
|
16418
|
-
schAutoLayoutEnabled:
|
|
16419
|
-
schTraceAutoLabelEnabled:
|
|
16424
|
+
schAutoLayoutEnabled: z37.boolean().optional(),
|
|
16425
|
+
schTraceAutoLabelEnabled: z37.boolean().optional(),
|
|
16420
16426
|
schMaxTraceDistance: distance11.optional(),
|
|
16421
|
-
routingDisabled:
|
|
16422
|
-
bomDisabled:
|
|
16427
|
+
routingDisabled: z37.boolean().optional(),
|
|
16428
|
+
bomDisabled: z37.boolean().optional(),
|
|
16423
16429
|
defaultTraceWidth: length3.optional(),
|
|
16424
16430
|
...routingTolerances.shape,
|
|
16425
16431
|
nominalTraceWidth: length3.optional(),
|
|
16426
16432
|
partsEngine: partsEngine.optional(),
|
|
16427
|
-
_subcircuitCachingEnabled:
|
|
16428
|
-
pcbRouteCache:
|
|
16433
|
+
_subcircuitCachingEnabled: z37.boolean().optional(),
|
|
16434
|
+
pcbRouteCache: z37.custom((v) => true).optional(),
|
|
16429
16435
|
autorouter: autorouterProp.optional(),
|
|
16430
16436
|
autorouterEffortLevel: autorouterEffortLevel.optional(),
|
|
16431
|
-
autorouterVersion:
|
|
16432
|
-
square:
|
|
16433
|
-
emptyArea:
|
|
16434
|
-
filledArea:
|
|
16437
|
+
autorouterVersion: z37.enum(["v1", "v2", "v3", "v4", "v5", "latest"]).optional(),
|
|
16438
|
+
square: z37.boolean().optional(),
|
|
16439
|
+
emptyArea: z37.string().optional(),
|
|
16440
|
+
filledArea: z37.string().optional(),
|
|
16435
16441
|
width: distance11.optional(),
|
|
16436
16442
|
height: distance11.optional(),
|
|
16437
|
-
outline:
|
|
16443
|
+
outline: z37.array(point).optional(),
|
|
16438
16444
|
outlineOffsetX: distance11.optional(),
|
|
16439
16445
|
outlineOffsetY: distance11.optional(),
|
|
16440
|
-
circuitJson:
|
|
16446
|
+
circuitJson: z37.array(z37.any()).optional()
|
|
16441
16447
|
});
|
|
16442
16448
|
var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
|
|
16443
|
-
subcircuit:
|
|
16449
|
+
subcircuit: z37.literal(true)
|
|
16444
16450
|
});
|
|
16445
|
-
var groupProps =
|
|
16446
|
-
baseGroupProps.extend({ subcircuit:
|
|
16451
|
+
var groupProps = z37.discriminatedUnion("subcircuit", [
|
|
16452
|
+
baseGroupProps.extend({ subcircuit: z37.literal(false).optional() }),
|
|
16447
16453
|
subcircuitGroupPropsWithBool
|
|
16448
16454
|
]);
|
|
16449
16455
|
expectTypesMatch(true);
|
|
@@ -16453,35 +16459,35 @@ expectTypesMatch(true);
|
|
|
16453
16459
|
expectTypesMatch(true);
|
|
16454
16460
|
|
|
16455
16461
|
// lib/components/board.ts
|
|
16456
|
-
var boardColor =
|
|
16462
|
+
var boardColor = z38.custom((value) => typeof value === "string");
|
|
16457
16463
|
var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
16458
|
-
material:
|
|
16459
|
-
layers:
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16464
|
+
material: z38.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
16465
|
+
layers: z38.union([
|
|
16466
|
+
z38.literal(1),
|
|
16467
|
+
z38.literal(2),
|
|
16468
|
+
z38.literal(4),
|
|
16469
|
+
z38.literal(6),
|
|
16470
|
+
z38.literal(8)
|
|
16465
16471
|
]).default(2),
|
|
16466
16472
|
borderRadius: distance.optional(),
|
|
16467
16473
|
thickness: distance.optional(),
|
|
16468
16474
|
boardAnchorPosition: point.optional(),
|
|
16469
16475
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16470
16476
|
boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
|
|
16471
|
-
title:
|
|
16477
|
+
title: z38.string().optional(),
|
|
16472
16478
|
solderMaskColor: boardColor.optional(),
|
|
16473
16479
|
topSolderMaskColor: boardColor.optional(),
|
|
16474
16480
|
bottomSolderMaskColor: boardColor.optional(),
|
|
16475
16481
|
silkscreenColor: boardColor.optional(),
|
|
16476
16482
|
topSilkscreenColor: boardColor.optional(),
|
|
16477
16483
|
bottomSilkscreenColor: boardColor.optional(),
|
|
16478
|
-
doubleSidedAssembly:
|
|
16479
|
-
schematicDisabled:
|
|
16484
|
+
doubleSidedAssembly: z38.boolean().optional().default(false),
|
|
16485
|
+
schematicDisabled: z38.boolean().optional()
|
|
16480
16486
|
});
|
|
16481
16487
|
expectTypesMatch(true);
|
|
16482
16488
|
|
|
16483
16489
|
// lib/components/panel.ts
|
|
16484
|
-
import { z as
|
|
16490
|
+
import { z as z39 } from "zod";
|
|
16485
16491
|
var panelProps = baseGroupProps.omit({
|
|
16486
16492
|
width: true,
|
|
16487
16493
|
height: true,
|
|
@@ -16490,25 +16496,25 @@ var panelProps = baseGroupProps.omit({
|
|
|
16490
16496
|
}).extend({
|
|
16491
16497
|
width: distance.optional(),
|
|
16492
16498
|
height: distance.optional(),
|
|
16493
|
-
children:
|
|
16499
|
+
children: z39.any().optional(),
|
|
16494
16500
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16495
|
-
noSolderMask:
|
|
16496
|
-
panelizationMethod:
|
|
16501
|
+
noSolderMask: z39.boolean().optional(),
|
|
16502
|
+
panelizationMethod: z39.enum(["tab-routing", "none"]).optional(),
|
|
16497
16503
|
boardGap: distance.optional(),
|
|
16498
|
-
layoutMode:
|
|
16499
|
-
row:
|
|
16500
|
-
col:
|
|
16504
|
+
layoutMode: z39.enum(["grid", "pack", "none"]).optional(),
|
|
16505
|
+
row: z39.number().optional(),
|
|
16506
|
+
col: z39.number().optional(),
|
|
16501
16507
|
cellWidth: distance.optional(),
|
|
16502
16508
|
cellHeight: distance.optional(),
|
|
16503
16509
|
tabWidth: distance.optional(),
|
|
16504
16510
|
tabLength: distance.optional(),
|
|
16505
|
-
mouseBites:
|
|
16511
|
+
mouseBites: z39.boolean().optional(),
|
|
16506
16512
|
edgePadding: distance.optional(),
|
|
16507
16513
|
edgePaddingLeft: distance.optional(),
|
|
16508
16514
|
edgePaddingRight: distance.optional(),
|
|
16509
16515
|
edgePaddingTop: distance.optional(),
|
|
16510
16516
|
edgePaddingBottom: distance.optional(),
|
|
16511
|
-
_subcircuitCachingEnabled:
|
|
16517
|
+
_subcircuitCachingEnabled: z39.boolean().optional()
|
|
16512
16518
|
});
|
|
16513
16519
|
expectTypesMatch(true);
|
|
16514
16520
|
|
|
@@ -16531,36 +16537,40 @@ expectTypesMatch(true);
|
|
|
16531
16537
|
|
|
16532
16538
|
// lib/components/chip.ts
|
|
16533
16539
|
import { distance as distance13, supplier_name as supplier_name2 } from "circuit-json";
|
|
16534
|
-
import { z as
|
|
16535
|
-
var connectionTarget2 =
|
|
16536
|
-
var noConnectProp =
|
|
16537
|
-
var connectionsProp =
|
|
16538
|
-
var
|
|
16540
|
+
import { z as z42 } from "zod";
|
|
16541
|
+
var connectionTarget2 = z42.string().or(z42.array(z42.string()).readonly()).or(z42.array(z42.string()));
|
|
16542
|
+
var noConnectProp = z42.array(schematicPinLabel).readonly().or(z42.array(schematicPinLabel));
|
|
16543
|
+
var connectionsProp = z42.custom().pipe(z42.record(z42.string(), connectionTarget2));
|
|
16544
|
+
var spicemodelElement = z42.custom(
|
|
16545
|
+
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
16546
|
+
);
|
|
16547
|
+
var pinLabelsProp = z42.record(
|
|
16539
16548
|
schematicPinLabel,
|
|
16540
|
-
schematicPinLabel.or(
|
|
16549
|
+
schematicPinLabel.or(z42.array(schematicPinLabel).readonly()).or(z42.array(schematicPinLabel))
|
|
16541
16550
|
);
|
|
16542
16551
|
expectTypesMatch(true);
|
|
16543
|
-
var pinCompatibleVariant =
|
|
16544
|
-
manufacturerPartNumber:
|
|
16545
|
-
supplierPartNumber:
|
|
16552
|
+
var pinCompatibleVariant = z42.object({
|
|
16553
|
+
manufacturerPartNumber: z42.string().optional(),
|
|
16554
|
+
supplierPartNumber: z42.record(supplier_name2, z42.array(z42.string())).optional()
|
|
16546
16555
|
});
|
|
16547
16556
|
var chipProps = commonComponentProps.extend({
|
|
16548
|
-
manufacturerPartNumber:
|
|
16557
|
+
manufacturerPartNumber: z42.string().optional(),
|
|
16549
16558
|
pinLabels: pinLabelsProp.optional(),
|
|
16550
|
-
showPinAliases:
|
|
16551
|
-
pcbPinLabels:
|
|
16552
|
-
internallyConnectedPins:
|
|
16553
|
-
externallyConnectedPins:
|
|
16559
|
+
showPinAliases: z42.boolean().optional(),
|
|
16560
|
+
pcbPinLabels: z42.record(z42.string(), z42.string()).optional(),
|
|
16561
|
+
internallyConnectedPins: z42.array(z42.array(z42.union([z42.string(), z42.number()]))).optional(),
|
|
16562
|
+
externallyConnectedPins: z42.array(z42.array(z42.string())).optional(),
|
|
16554
16563
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
16555
16564
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16556
|
-
pinCompatibleVariants:
|
|
16565
|
+
pinCompatibleVariants: z42.array(pinCompatibleVariant).optional(),
|
|
16557
16566
|
schPinStyle: schematicPinStyle.optional(),
|
|
16558
16567
|
schPinSpacing: distance13.optional(),
|
|
16559
16568
|
schWidth: distance13.optional(),
|
|
16560
16569
|
schHeight: distance13.optional(),
|
|
16561
|
-
noSchematicRepresentation:
|
|
16570
|
+
noSchematicRepresentation: z42.boolean().optional(),
|
|
16562
16571
|
noConnect: noConnectProp.optional(),
|
|
16563
|
-
connections: connectionsProp.optional()
|
|
16572
|
+
connections: connectionsProp.optional(),
|
|
16573
|
+
spiceModel: spicemodelElement.optional()
|
|
16564
16574
|
});
|
|
16565
16575
|
var bugProps = chipProps;
|
|
16566
16576
|
expectTypesMatch(true);
|
|
@@ -16571,75 +16581,75 @@ expectTypesMatch(true);
|
|
|
16571
16581
|
|
|
16572
16582
|
// lib/components/jumper.ts
|
|
16573
16583
|
import { distance as distance14 } from "circuit-json";
|
|
16574
|
-
import { z as
|
|
16584
|
+
import { z as z43 } from "zod";
|
|
16575
16585
|
var jumperProps = commonComponentProps.extend({
|
|
16576
|
-
manufacturerPartNumber:
|
|
16577
|
-
pinLabels:
|
|
16578
|
-
|
|
16579
|
-
schematicPinLabel.or(
|
|
16586
|
+
manufacturerPartNumber: z43.string().optional(),
|
|
16587
|
+
pinLabels: z43.record(
|
|
16588
|
+
z43.number().or(schematicPinLabel),
|
|
16589
|
+
schematicPinLabel.or(z43.array(schematicPinLabel))
|
|
16580
16590
|
).optional(),
|
|
16581
16591
|
schPinStyle: schematicPinStyle.optional(),
|
|
16582
16592
|
schPinSpacing: distance14.optional(),
|
|
16583
16593
|
schWidth: distance14.optional(),
|
|
16584
16594
|
schHeight: distance14.optional(),
|
|
16585
|
-
schDirection:
|
|
16595
|
+
schDirection: z43.enum(["left", "right"]).optional(),
|
|
16586
16596
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16587
16597
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16588
|
-
pcbPinLabels:
|
|
16589
|
-
pinCount:
|
|
16590
|
-
internallyConnectedPins:
|
|
16591
|
-
connections:
|
|
16598
|
+
pcbPinLabels: z43.record(z43.string(), z43.string()).optional(),
|
|
16599
|
+
pinCount: z43.union([z43.literal(2), z43.literal(3)]).optional(),
|
|
16600
|
+
internallyConnectedPins: z43.array(z43.array(z43.union([z43.string(), z43.number()]))).optional(),
|
|
16601
|
+
connections: z43.custom().pipe(z43.record(z43.string(), connectionTarget)).optional()
|
|
16592
16602
|
});
|
|
16593
16603
|
expectTypesMatch(true);
|
|
16594
16604
|
|
|
16595
16605
|
// lib/components/solderjumper.ts
|
|
16596
|
-
import { z as
|
|
16606
|
+
import { z as z44 } from "zod";
|
|
16597
16607
|
var solderjumperProps = jumperProps.extend({
|
|
16598
|
-
bridgedPins:
|
|
16599
|
-
bridged:
|
|
16608
|
+
bridgedPins: z44.array(z44.array(z44.string())).optional(),
|
|
16609
|
+
bridged: z44.boolean().optional()
|
|
16600
16610
|
});
|
|
16601
16611
|
expectTypesMatch(true);
|
|
16602
16612
|
|
|
16603
16613
|
// lib/components/connector.ts
|
|
16604
|
-
import { z as
|
|
16614
|
+
import { z as z45 } from "zod";
|
|
16605
16615
|
var connectorProps = chipProps.extend({
|
|
16606
|
-
standard:
|
|
16616
|
+
standard: z45.enum(["usb_c", "m2"]).optional()
|
|
16607
16617
|
});
|
|
16608
16618
|
expectTypesMatch(true);
|
|
16609
16619
|
|
|
16610
16620
|
// lib/components/interconnect.ts
|
|
16611
|
-
import { z as
|
|
16621
|
+
import { z as z46 } from "zod";
|
|
16612
16622
|
var interconnectProps = commonComponentProps.extend({
|
|
16613
|
-
standard:
|
|
16614
|
-
pinLabels:
|
|
16615
|
-
|
|
16616
|
-
schematicPinLabel.or(
|
|
16623
|
+
standard: z46.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
|
|
16624
|
+
pinLabels: z46.record(
|
|
16625
|
+
z46.number().or(schematicPinLabel),
|
|
16626
|
+
schematicPinLabel.or(z46.array(schematicPinLabel))
|
|
16617
16627
|
).optional(),
|
|
16618
|
-
internallyConnectedPins:
|
|
16628
|
+
internallyConnectedPins: z46.array(z46.array(z46.union([z46.string(), z46.number()]))).optional()
|
|
16619
16629
|
});
|
|
16620
16630
|
expectTypesMatch(true);
|
|
16621
16631
|
|
|
16622
16632
|
// lib/components/fuse.ts
|
|
16623
|
-
import { z as
|
|
16633
|
+
import { z as z47 } from "zod";
|
|
16624
16634
|
var fusePinLabels = ["pin1", "pin2"];
|
|
16625
16635
|
var fuseProps = commonComponentProps.extend({
|
|
16626
|
-
currentRating:
|
|
16627
|
-
voltageRating:
|
|
16628
|
-
schShowRatings:
|
|
16636
|
+
currentRating: z47.union([z47.number(), z47.string()]),
|
|
16637
|
+
voltageRating: z47.union([z47.number(), z47.string()]).optional(),
|
|
16638
|
+
schShowRatings: z47.boolean().optional(),
|
|
16629
16639
|
schOrientation: schematicOrientation.optional(),
|
|
16630
|
-
connections:
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16640
|
+
connections: z47.record(
|
|
16641
|
+
z47.string(),
|
|
16642
|
+
z47.union([
|
|
16643
|
+
z47.string(),
|
|
16644
|
+
z47.array(z47.string()).readonly(),
|
|
16645
|
+
z47.array(z47.string())
|
|
16636
16646
|
])
|
|
16637
16647
|
).optional()
|
|
16638
16648
|
});
|
|
16639
16649
|
|
|
16640
16650
|
// lib/components/platedhole.ts
|
|
16641
16651
|
import { distance as distance15 } from "circuit-json";
|
|
16642
|
-
import { z as
|
|
16652
|
+
import { z as z48 } from "zod";
|
|
16643
16653
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
16644
16654
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
16645
16655
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -16671,26 +16681,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
16671
16681
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
16672
16682
|
return props;
|
|
16673
16683
|
};
|
|
16674
|
-
var distanceHiddenUndefined =
|
|
16684
|
+
var distanceHiddenUndefined = z48.custom().transform((a) => {
|
|
16675
16685
|
if (a === void 0) return void 0;
|
|
16676
16686
|
return distance15.parse(a);
|
|
16677
16687
|
});
|
|
16678
|
-
var platedHolePropsByShape =
|
|
16688
|
+
var platedHolePropsByShape = z48.discriminatedUnion("shape", [
|
|
16679
16689
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16680
|
-
name:
|
|
16681
|
-
connectsTo:
|
|
16682
|
-
shape:
|
|
16690
|
+
name: z48.string().optional(),
|
|
16691
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16692
|
+
shape: z48.literal("circle"),
|
|
16683
16693
|
holeDiameter: distance15,
|
|
16684
16694
|
outerDiameter: distance15,
|
|
16685
16695
|
padDiameter: distance15.optional().describe("Diameter of the copper pad"),
|
|
16686
16696
|
portHints: portHints.optional(),
|
|
16687
16697
|
solderMaskMargin: distance15.optional(),
|
|
16688
|
-
coveredWithSolderMask:
|
|
16698
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16689
16699
|
}),
|
|
16690
16700
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16691
|
-
name:
|
|
16692
|
-
connectsTo:
|
|
16693
|
-
shape:
|
|
16701
|
+
name: z48.string().optional(),
|
|
16702
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16703
|
+
shape: z48.literal("oval"),
|
|
16694
16704
|
outerWidth: distance15,
|
|
16695
16705
|
outerHeight: distance15,
|
|
16696
16706
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16699,13 +16709,13 @@ var platedHolePropsByShape = z47.discriminatedUnion("shape", [
|
|
|
16699
16709
|
innerHeight: distance15.optional().describe("DEPRECATED use holeHeight"),
|
|
16700
16710
|
portHints: portHints.optional(),
|
|
16701
16711
|
solderMaskMargin: distance15.optional(),
|
|
16702
|
-
coveredWithSolderMask:
|
|
16712
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16703
16713
|
}),
|
|
16704
16714
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16705
|
-
name:
|
|
16706
|
-
connectsTo:
|
|
16707
|
-
shape:
|
|
16708
|
-
rectPad:
|
|
16715
|
+
name: z48.string().optional(),
|
|
16716
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16717
|
+
shape: z48.literal("pill"),
|
|
16718
|
+
rectPad: z48.boolean().optional(),
|
|
16709
16719
|
outerWidth: distance15,
|
|
16710
16720
|
outerHeight: distance15,
|
|
16711
16721
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16716,30 +16726,30 @@ var platedHolePropsByShape = z47.discriminatedUnion("shape", [
|
|
|
16716
16726
|
holeOffsetX: distance15.optional(),
|
|
16717
16727
|
holeOffsetY: distance15.optional(),
|
|
16718
16728
|
solderMaskMargin: distance15.optional(),
|
|
16719
|
-
coveredWithSolderMask:
|
|
16729
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16720
16730
|
}),
|
|
16721
16731
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16722
|
-
name:
|
|
16723
|
-
connectsTo:
|
|
16724
|
-
shape:
|
|
16732
|
+
name: z48.string().optional(),
|
|
16733
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16734
|
+
shape: z48.literal("circular_hole_with_rect_pad"),
|
|
16725
16735
|
holeDiameter: distance15,
|
|
16726
16736
|
rectPadWidth: distance15,
|
|
16727
16737
|
rectPadHeight: distance15,
|
|
16728
16738
|
rectBorderRadius: distance15.optional(),
|
|
16729
|
-
holeShape:
|
|
16730
|
-
padShape:
|
|
16739
|
+
holeShape: z48.literal("circle").optional(),
|
|
16740
|
+
padShape: z48.literal("rect").optional(),
|
|
16731
16741
|
portHints: portHints.optional(),
|
|
16732
16742
|
holeOffsetX: distance15.optional(),
|
|
16733
16743
|
holeOffsetY: distance15.optional(),
|
|
16734
16744
|
solderMaskMargin: distance15.optional(),
|
|
16735
|
-
coveredWithSolderMask:
|
|
16745
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16736
16746
|
}),
|
|
16737
16747
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16738
|
-
name:
|
|
16739
|
-
connectsTo:
|
|
16740
|
-
shape:
|
|
16741
|
-
holeShape:
|
|
16742
|
-
padShape:
|
|
16748
|
+
name: z48.string().optional(),
|
|
16749
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16750
|
+
shape: z48.literal("pill_hole_with_rect_pad"),
|
|
16751
|
+
holeShape: z48.literal("pill").optional(),
|
|
16752
|
+
padShape: z48.literal("rect").optional(),
|
|
16743
16753
|
holeWidth: distance15,
|
|
16744
16754
|
holeHeight: distance15,
|
|
16745
16755
|
rectPadWidth: distance15,
|
|
@@ -16749,22 +16759,22 @@ var platedHolePropsByShape = z47.discriminatedUnion("shape", [
|
|
|
16749
16759
|
holeOffsetX: distance15.optional(),
|
|
16750
16760
|
holeOffsetY: distance15.optional(),
|
|
16751
16761
|
solderMaskMargin: distance15.optional(),
|
|
16752
|
-
coveredWithSolderMask:
|
|
16762
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16753
16763
|
}),
|
|
16754
16764
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16755
|
-
name:
|
|
16756
|
-
connectsTo:
|
|
16757
|
-
shape:
|
|
16758
|
-
holeShape:
|
|
16765
|
+
name: z48.string().optional(),
|
|
16766
|
+
connectsTo: z48.string().or(z48.array(z48.string())).optional(),
|
|
16767
|
+
shape: z48.literal("hole_with_polygon_pad"),
|
|
16768
|
+
holeShape: z48.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
16759
16769
|
holeDiameter: distance15.optional(),
|
|
16760
16770
|
holeWidth: distance15.optional(),
|
|
16761
16771
|
holeHeight: distance15.optional(),
|
|
16762
|
-
padOutline:
|
|
16772
|
+
padOutline: z48.array(point),
|
|
16763
16773
|
holeOffsetX: distance15,
|
|
16764
16774
|
holeOffsetY: distance15,
|
|
16765
16775
|
portHints: portHints.optional(),
|
|
16766
16776
|
solderMaskMargin: distance15.optional(),
|
|
16767
|
-
coveredWithSolderMask:
|
|
16777
|
+
coveredWithSolderMask: z48.boolean().optional()
|
|
16768
16778
|
})
|
|
16769
16779
|
]).transform((a) => {
|
|
16770
16780
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -16775,7 +16785,7 @@ var platedHolePropsByShape = z47.discriminatedUnion("shape", [
|
|
|
16775
16785
|
}
|
|
16776
16786
|
return a;
|
|
16777
16787
|
});
|
|
16778
|
-
var platedHoleProps =
|
|
16788
|
+
var platedHoleProps = z48.preprocess(
|
|
16779
16789
|
inferPlatedHoleShapeAndDefaults,
|
|
16780
16790
|
platedHolePropsByShape
|
|
16781
16791
|
);
|
|
@@ -16783,7 +16793,7 @@ expectTypesMatch(true);
|
|
|
16783
16793
|
|
|
16784
16794
|
// lib/components/resistor.ts
|
|
16785
16795
|
import { resistance } from "circuit-json";
|
|
16786
|
-
import { z as
|
|
16796
|
+
import { z as z49 } from "zod";
|
|
16787
16797
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
16788
16798
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
16789
16799
|
"01005",
|
|
@@ -16807,7 +16817,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
16807
16817
|
var resistorProps = commonComponentProps.extend({
|
|
16808
16818
|
footprint: resistorFootprintProp,
|
|
16809
16819
|
resistance,
|
|
16810
|
-
tolerance:
|
|
16820
|
+
tolerance: z49.union([z49.string(), z49.number()]).transform((val) => {
|
|
16811
16821
|
if (typeof val === "string") {
|
|
16812
16822
|
if (val.endsWith("%")) {
|
|
16813
16823
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -16816,12 +16826,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
16816
16826
|
}
|
|
16817
16827
|
return val;
|
|
16818
16828
|
}).pipe(
|
|
16819
|
-
|
|
16829
|
+
z49.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
16820
16830
|
).optional(),
|
|
16821
|
-
pullupFor:
|
|
16822
|
-
pullupTo:
|
|
16823
|
-
pulldownFor:
|
|
16824
|
-
pulldownTo:
|
|
16831
|
+
pullupFor: z49.string().optional(),
|
|
16832
|
+
pullupTo: z49.string().optional(),
|
|
16833
|
+
pulldownFor: z49.string().optional(),
|
|
16834
|
+
pulldownTo: z49.string().optional(),
|
|
16825
16835
|
schOrientation: schematicOrientation.optional(),
|
|
16826
16836
|
schSize: schematicSymbolSize.optional(),
|
|
16827
16837
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -16831,25 +16841,25 @@ expectTypesMatch(true);
|
|
|
16831
16841
|
|
|
16832
16842
|
// lib/components/potentiometer.ts
|
|
16833
16843
|
import { resistance as resistance2 } from "circuit-json";
|
|
16834
|
-
import { z as
|
|
16844
|
+
import { z as z50 } from "zod";
|
|
16835
16845
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
16836
16846
|
var potentiometerProps = commonComponentProps.extend({
|
|
16837
16847
|
maxResistance: resistance2,
|
|
16838
|
-
pinVariant:
|
|
16848
|
+
pinVariant: z50.enum(["two_pin", "three_pin"]).optional(),
|
|
16839
16849
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
16840
16850
|
});
|
|
16841
16851
|
expectTypesMatch(true);
|
|
16842
16852
|
|
|
16843
16853
|
// lib/components/crystal.ts
|
|
16844
16854
|
import { frequency, capacitance } from "circuit-json";
|
|
16845
|
-
import { z as
|
|
16855
|
+
import { z as z51 } from "zod";
|
|
16846
16856
|
var crystalPins = lrPins;
|
|
16847
16857
|
var crystalProps = commonComponentProps.extend({
|
|
16848
16858
|
frequency,
|
|
16849
16859
|
loadCapacitance: capacitance,
|
|
16850
|
-
manufacturerPartNumber:
|
|
16851
|
-
mpn:
|
|
16852
|
-
pinVariant:
|
|
16860
|
+
manufacturerPartNumber: z51.string().optional(),
|
|
16861
|
+
mpn: z51.string().optional(),
|
|
16862
|
+
pinVariant: z51.enum(["two_pin", "four_pin"]).optional(),
|
|
16853
16863
|
schOrientation: schematicOrientation.optional(),
|
|
16854
16864
|
connections: createConnectionsProp(crystalPins).optional()
|
|
16855
16865
|
});
|
|
@@ -16857,34 +16867,34 @@ expectTypesMatch(true);
|
|
|
16857
16867
|
|
|
16858
16868
|
// lib/components/resonator.ts
|
|
16859
16869
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
16860
|
-
import { z as
|
|
16870
|
+
import { z as z52 } from "zod";
|
|
16861
16871
|
var resonatorProps = commonComponentProps.extend({
|
|
16862
16872
|
frequency: frequency2,
|
|
16863
16873
|
loadCapacitance: capacitance2,
|
|
16864
|
-
pinVariant:
|
|
16874
|
+
pinVariant: z52.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
16865
16875
|
});
|
|
16866
16876
|
expectTypesMatch(true);
|
|
16867
16877
|
|
|
16868
16878
|
// lib/components/stampboard.ts
|
|
16869
16879
|
import { distance as distance16 } from "circuit-json";
|
|
16870
|
-
import { z as
|
|
16880
|
+
import { z as z53 } from "zod";
|
|
16871
16881
|
var stampboardProps = boardProps.extend({
|
|
16872
|
-
leftPinCount:
|
|
16873
|
-
rightPinCount:
|
|
16874
|
-
topPinCount:
|
|
16875
|
-
bottomPinCount:
|
|
16876
|
-
leftPins:
|
|
16877
|
-
rightPins:
|
|
16878
|
-
topPins:
|
|
16879
|
-
bottomPins:
|
|
16882
|
+
leftPinCount: z53.number().optional(),
|
|
16883
|
+
rightPinCount: z53.number().optional(),
|
|
16884
|
+
topPinCount: z53.number().optional(),
|
|
16885
|
+
bottomPinCount: z53.number().optional(),
|
|
16886
|
+
leftPins: z53.array(z53.string()).optional(),
|
|
16887
|
+
rightPins: z53.array(z53.string()).optional(),
|
|
16888
|
+
topPins: z53.array(z53.string()).optional(),
|
|
16889
|
+
bottomPins: z53.array(z53.string()).optional(),
|
|
16880
16890
|
pinPitch: distance16.optional(),
|
|
16881
|
-
innerHoles:
|
|
16891
|
+
innerHoles: z53.boolean().optional()
|
|
16882
16892
|
});
|
|
16883
16893
|
expectTypesMatch(true);
|
|
16884
16894
|
|
|
16885
16895
|
// lib/components/capacitor.ts
|
|
16886
16896
|
import { capacitance as capacitance3, voltage } from "circuit-json";
|
|
16887
|
-
import { z as
|
|
16897
|
+
import { z as z54 } from "zod";
|
|
16888
16898
|
var capacitorPinLabels = [
|
|
16889
16899
|
"pin1",
|
|
16890
16900
|
"pin2",
|
|
@@ -16896,13 +16906,13 @@ var capacitorPinLabels = [
|
|
|
16896
16906
|
var capacitorProps = commonComponentProps.extend({
|
|
16897
16907
|
capacitance: capacitance3,
|
|
16898
16908
|
maxVoltageRating: voltage.optional(),
|
|
16899
|
-
schShowRatings:
|
|
16900
|
-
polarized:
|
|
16901
|
-
decouplingFor:
|
|
16902
|
-
decouplingTo:
|
|
16903
|
-
bypassFor:
|
|
16904
|
-
bypassTo:
|
|
16905
|
-
maxDecouplingTraceLength:
|
|
16909
|
+
schShowRatings: z54.boolean().optional().default(false),
|
|
16910
|
+
polarized: z54.boolean().optional().default(false),
|
|
16911
|
+
decouplingFor: z54.string().optional(),
|
|
16912
|
+
decouplingTo: z54.string().optional(),
|
|
16913
|
+
bypassFor: z54.string().optional(),
|
|
16914
|
+
bypassTo: z54.string().optional(),
|
|
16915
|
+
maxDecouplingTraceLength: z54.number().optional(),
|
|
16906
16916
|
schOrientation: schematicOrientation.optional(),
|
|
16907
16917
|
schSize: schematicSymbolSize.optional(),
|
|
16908
16918
|
connections: createConnectionsProp(capacitorPinLabels).optional()
|
|
@@ -16912,14 +16922,14 @@ expectTypesMatch(true);
|
|
|
16912
16922
|
|
|
16913
16923
|
// lib/components/net.ts
|
|
16914
16924
|
import { distance as distance17 } from "circuit-json";
|
|
16915
|
-
import { z as
|
|
16916
|
-
var netProps =
|
|
16917
|
-
name:
|
|
16918
|
-
connectsTo:
|
|
16919
|
-
routingPhaseIndex:
|
|
16920
|
-
highlightColor:
|
|
16921
|
-
isPowerNet:
|
|
16922
|
-
isGroundNet:
|
|
16925
|
+
import { z as z55 } from "zod";
|
|
16926
|
+
var netProps = z55.object({
|
|
16927
|
+
name: z55.string(),
|
|
16928
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
16929
|
+
routingPhaseIndex: z55.number().nullable().optional(),
|
|
16930
|
+
highlightColor: z55.string().optional(),
|
|
16931
|
+
isPowerNet: z55.boolean().optional(),
|
|
16932
|
+
isGroundNet: z55.boolean().optional(),
|
|
16923
16933
|
nominalTraceWidth: distance17.optional()
|
|
16924
16934
|
});
|
|
16925
16935
|
expectTypesMatch(true);
|
|
@@ -16933,55 +16943,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
16933
16943
|
expectTypesMatch(true);
|
|
16934
16944
|
|
|
16935
16945
|
// lib/components/constrainedlayout.ts
|
|
16936
|
-
import { z as
|
|
16937
|
-
var constrainedLayoutProps =
|
|
16938
|
-
name:
|
|
16939
|
-
pcbOnly:
|
|
16940
|
-
schOnly:
|
|
16946
|
+
import { z as z57 } from "zod";
|
|
16947
|
+
var constrainedLayoutProps = z57.object({
|
|
16948
|
+
name: z57.string().optional(),
|
|
16949
|
+
pcbOnly: z57.boolean().optional(),
|
|
16950
|
+
schOnly: z57.boolean().optional()
|
|
16941
16951
|
});
|
|
16942
16952
|
expectTypesMatch(true);
|
|
16943
16953
|
|
|
16944
16954
|
// lib/components/constraint.ts
|
|
16945
|
-
import { z as
|
|
16946
|
-
var pcbXDistConstraintProps =
|
|
16947
|
-
pcb:
|
|
16955
|
+
import { z as z58 } from "zod";
|
|
16956
|
+
var pcbXDistConstraintProps = z58.object({
|
|
16957
|
+
pcb: z58.literal(true).optional(),
|
|
16948
16958
|
xDist: distance,
|
|
16949
|
-
left:
|
|
16950
|
-
right:
|
|
16951
|
-
edgeToEdge:
|
|
16952
|
-
centerToCenter:
|
|
16959
|
+
left: z58.string(),
|
|
16960
|
+
right: z58.string(),
|
|
16961
|
+
edgeToEdge: z58.literal(true).optional(),
|
|
16962
|
+
centerToCenter: z58.literal(true).optional()
|
|
16953
16963
|
});
|
|
16954
16964
|
expectTypesMatch(
|
|
16955
16965
|
true
|
|
16956
16966
|
);
|
|
16957
|
-
var pcbYDistConstraintProps =
|
|
16958
|
-
pcb:
|
|
16967
|
+
var pcbYDistConstraintProps = z58.object({
|
|
16968
|
+
pcb: z58.literal(true).optional(),
|
|
16959
16969
|
yDist: distance,
|
|
16960
|
-
top:
|
|
16961
|
-
bottom:
|
|
16962
|
-
edgeToEdge:
|
|
16963
|
-
centerToCenter:
|
|
16970
|
+
top: z58.string(),
|
|
16971
|
+
bottom: z58.string(),
|
|
16972
|
+
edgeToEdge: z58.literal(true).optional(),
|
|
16973
|
+
centerToCenter: z58.literal(true).optional()
|
|
16964
16974
|
});
|
|
16965
16975
|
expectTypesMatch(
|
|
16966
16976
|
true
|
|
16967
16977
|
);
|
|
16968
|
-
var pcbSameYConstraintProps =
|
|
16969
|
-
pcb:
|
|
16970
|
-
sameY:
|
|
16971
|
-
for:
|
|
16978
|
+
var pcbSameYConstraintProps = z58.object({
|
|
16979
|
+
pcb: z58.literal(true).optional(),
|
|
16980
|
+
sameY: z58.literal(true).optional(),
|
|
16981
|
+
for: z58.array(z58.string())
|
|
16972
16982
|
});
|
|
16973
16983
|
expectTypesMatch(
|
|
16974
16984
|
true
|
|
16975
16985
|
);
|
|
16976
|
-
var pcbSameXConstraintProps =
|
|
16977
|
-
pcb:
|
|
16978
|
-
sameX:
|
|
16979
|
-
for:
|
|
16986
|
+
var pcbSameXConstraintProps = z58.object({
|
|
16987
|
+
pcb: z58.literal(true).optional(),
|
|
16988
|
+
sameX: z58.literal(true).optional(),
|
|
16989
|
+
for: z58.array(z58.string())
|
|
16980
16990
|
});
|
|
16981
16991
|
expectTypesMatch(
|
|
16982
16992
|
true
|
|
16983
16993
|
);
|
|
16984
|
-
var constraintProps =
|
|
16994
|
+
var constraintProps = z58.union([
|
|
16985
16995
|
pcbXDistConstraintProps,
|
|
16986
16996
|
pcbYDistConstraintProps,
|
|
16987
16997
|
pcbSameYConstraintProps,
|
|
@@ -16990,13 +17000,13 @@ var constraintProps = z57.union([
|
|
|
16990
17000
|
expectTypesMatch(true);
|
|
16991
17001
|
|
|
16992
17002
|
// lib/components/cutout.ts
|
|
16993
|
-
import { z as
|
|
17003
|
+
import { z as z59 } from "zod";
|
|
16994
17004
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
16995
17005
|
layer: true,
|
|
16996
17006
|
pcbRotation: true
|
|
16997
17007
|
}).extend({
|
|
16998
|
-
name:
|
|
16999
|
-
shape:
|
|
17008
|
+
name: z59.string().optional(),
|
|
17009
|
+
shape: z59.literal("rect"),
|
|
17000
17010
|
width: distance,
|
|
17001
17011
|
height: distance
|
|
17002
17012
|
});
|
|
@@ -17005,8 +17015,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17005
17015
|
layer: true,
|
|
17006
17016
|
pcbRotation: true
|
|
17007
17017
|
}).extend({
|
|
17008
|
-
name:
|
|
17009
|
-
shape:
|
|
17018
|
+
name: z59.string().optional(),
|
|
17019
|
+
shape: z59.literal("circle"),
|
|
17010
17020
|
radius: distance
|
|
17011
17021
|
});
|
|
17012
17022
|
expectTypesMatch(true);
|
|
@@ -17014,28 +17024,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17014
17024
|
layer: true,
|
|
17015
17025
|
pcbRotation: true
|
|
17016
17026
|
}).extend({
|
|
17017
|
-
name:
|
|
17018
|
-
shape:
|
|
17019
|
-
points:
|
|
17027
|
+
name: z59.string().optional(),
|
|
17028
|
+
shape: z59.literal("polygon"),
|
|
17029
|
+
points: z59.array(point)
|
|
17020
17030
|
});
|
|
17021
17031
|
expectTypesMatch(true);
|
|
17022
|
-
var cutoutProps =
|
|
17032
|
+
var cutoutProps = z59.discriminatedUnion("shape", [
|
|
17023
17033
|
rectCutoutProps,
|
|
17024
17034
|
circleCutoutProps,
|
|
17025
17035
|
polygonCutoutProps
|
|
17026
17036
|
]);
|
|
17027
17037
|
|
|
17038
|
+
// lib/components/drc-check.ts
|
|
17039
|
+
import { z as z60 } from "zod";
|
|
17040
|
+
var drcCheckProps = z60.object({
|
|
17041
|
+
name: z60.string().optional(),
|
|
17042
|
+
checkFn: customDrcCheckFn
|
|
17043
|
+
});
|
|
17044
|
+
expectTypesMatch(true);
|
|
17045
|
+
|
|
17028
17046
|
// lib/components/smtpad.ts
|
|
17029
|
-
import { z as
|
|
17047
|
+
import { z as z61 } from "zod";
|
|
17030
17048
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17031
|
-
name:
|
|
17032
|
-
shape:
|
|
17049
|
+
name: z61.string().optional(),
|
|
17050
|
+
shape: z61.literal("rect"),
|
|
17033
17051
|
width: distance,
|
|
17034
17052
|
height: distance,
|
|
17035
17053
|
rectBorderRadius: distance.optional(),
|
|
17036
17054
|
cornerRadius: distance.optional(),
|
|
17037
17055
|
portHints: portHints.optional(),
|
|
17038
|
-
coveredWithSolderMask:
|
|
17056
|
+
coveredWithSolderMask: z61.boolean().optional(),
|
|
17039
17057
|
solderMaskMargin: distance.optional(),
|
|
17040
17058
|
solderMaskMarginLeft: distance.optional(),
|
|
17041
17059
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17044,14 +17062,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17044
17062
|
});
|
|
17045
17063
|
expectTypesMatch(true);
|
|
17046
17064
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17047
|
-
name:
|
|
17048
|
-
shape:
|
|
17065
|
+
name: z61.string().optional(),
|
|
17066
|
+
shape: z61.literal("rotated_rect"),
|
|
17049
17067
|
width: distance,
|
|
17050
17068
|
height: distance,
|
|
17051
|
-
ccwRotation:
|
|
17069
|
+
ccwRotation: z61.number(),
|
|
17052
17070
|
cornerRadius: distance.optional(),
|
|
17053
17071
|
portHints: portHints.optional(),
|
|
17054
|
-
coveredWithSolderMask:
|
|
17072
|
+
coveredWithSolderMask: z61.boolean().optional(),
|
|
17055
17073
|
solderMaskMargin: distance.optional(),
|
|
17056
17074
|
solderMaskMarginLeft: distance.optional(),
|
|
17057
17075
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17060,35 +17078,35 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17060
17078
|
});
|
|
17061
17079
|
expectTypesMatch(true);
|
|
17062
17080
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17063
|
-
name:
|
|
17064
|
-
shape:
|
|
17081
|
+
name: z61.string().optional(),
|
|
17082
|
+
shape: z61.literal("circle"),
|
|
17065
17083
|
radius: distance,
|
|
17066
17084
|
portHints: portHints.optional(),
|
|
17067
|
-
coveredWithSolderMask:
|
|
17085
|
+
coveredWithSolderMask: z61.boolean().optional(),
|
|
17068
17086
|
solderMaskMargin: distance.optional()
|
|
17069
17087
|
});
|
|
17070
17088
|
expectTypesMatch(true);
|
|
17071
17089
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17072
|
-
name:
|
|
17073
|
-
shape:
|
|
17090
|
+
name: z61.string().optional(),
|
|
17091
|
+
shape: z61.literal("pill"),
|
|
17074
17092
|
width: distance,
|
|
17075
17093
|
height: distance,
|
|
17076
17094
|
radius: distance,
|
|
17077
17095
|
portHints: portHints.optional(),
|
|
17078
|
-
coveredWithSolderMask:
|
|
17096
|
+
coveredWithSolderMask: z61.boolean().optional(),
|
|
17079
17097
|
solderMaskMargin: distance.optional()
|
|
17080
17098
|
});
|
|
17081
17099
|
expectTypesMatch(true);
|
|
17082
17100
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17083
|
-
name:
|
|
17084
|
-
shape:
|
|
17085
|
-
points:
|
|
17101
|
+
name: z61.string().optional(),
|
|
17102
|
+
shape: z61.literal("polygon"),
|
|
17103
|
+
points: z61.array(point),
|
|
17086
17104
|
portHints: portHints.optional(),
|
|
17087
|
-
coveredWithSolderMask:
|
|
17105
|
+
coveredWithSolderMask: z61.boolean().optional(),
|
|
17088
17106
|
solderMaskMargin: distance.optional()
|
|
17089
17107
|
});
|
|
17090
17108
|
expectTypesMatch(true);
|
|
17091
|
-
var smtPadProps =
|
|
17109
|
+
var smtPadProps = z61.discriminatedUnion("shape", [
|
|
17092
17110
|
circleSmtPadProps,
|
|
17093
17111
|
rectSmtPadProps,
|
|
17094
17112
|
rotatedRectSmtPadProps,
|
|
@@ -17098,55 +17116,55 @@ var smtPadProps = z59.discriminatedUnion("shape", [
|
|
|
17098
17116
|
expectTypesMatch(true);
|
|
17099
17117
|
|
|
17100
17118
|
// lib/components/solderpaste.ts
|
|
17101
|
-
import { z as
|
|
17119
|
+
import { z as z62 } from "zod";
|
|
17102
17120
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17103
|
-
shape:
|
|
17121
|
+
shape: z62.literal("rect"),
|
|
17104
17122
|
width: distance,
|
|
17105
17123
|
height: distance
|
|
17106
17124
|
});
|
|
17107
17125
|
expectTypesMatch(true);
|
|
17108
17126
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17109
|
-
shape:
|
|
17127
|
+
shape: z62.literal("circle"),
|
|
17110
17128
|
radius: distance
|
|
17111
17129
|
});
|
|
17112
17130
|
expectTypesMatch(true);
|
|
17113
|
-
var solderPasteProps =
|
|
17131
|
+
var solderPasteProps = z62.union([
|
|
17114
17132
|
circleSolderPasteProps,
|
|
17115
17133
|
rectSolderPasteProps
|
|
17116
17134
|
]);
|
|
17117
17135
|
expectTypesMatch(true);
|
|
17118
17136
|
|
|
17119
17137
|
// lib/components/hole.ts
|
|
17120
|
-
import { z as
|
|
17138
|
+
import { z as z63 } from "zod";
|
|
17121
17139
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17122
|
-
name:
|
|
17123
|
-
shape:
|
|
17140
|
+
name: z63.string().optional(),
|
|
17141
|
+
shape: z63.literal("circle").optional(),
|
|
17124
17142
|
diameter: distance.optional(),
|
|
17125
17143
|
radius: distance.optional(),
|
|
17126
17144
|
solderMaskMargin: distance.optional(),
|
|
17127
|
-
coveredWithSolderMask:
|
|
17145
|
+
coveredWithSolderMask: z63.boolean().optional()
|
|
17128
17146
|
}).transform((d) => ({
|
|
17129
17147
|
...d,
|
|
17130
17148
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17131
17149
|
radius: d.radius ?? d.diameter / 2
|
|
17132
17150
|
}));
|
|
17133
17151
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17134
|
-
name:
|
|
17135
|
-
shape:
|
|
17152
|
+
name: z63.string().optional(),
|
|
17153
|
+
shape: z63.literal("pill"),
|
|
17136
17154
|
width: distance,
|
|
17137
17155
|
height: distance,
|
|
17138
17156
|
solderMaskMargin: distance.optional(),
|
|
17139
|
-
coveredWithSolderMask:
|
|
17157
|
+
coveredWithSolderMask: z63.boolean().optional()
|
|
17140
17158
|
});
|
|
17141
17159
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17142
|
-
name:
|
|
17143
|
-
shape:
|
|
17160
|
+
name: z63.string().optional(),
|
|
17161
|
+
shape: z63.literal("rect"),
|
|
17144
17162
|
width: distance,
|
|
17145
17163
|
height: distance,
|
|
17146
17164
|
solderMaskMargin: distance.optional(),
|
|
17147
|
-
coveredWithSolderMask:
|
|
17165
|
+
coveredWithSolderMask: z63.boolean().optional()
|
|
17148
17166
|
});
|
|
17149
|
-
var holeProps =
|
|
17167
|
+
var holeProps = z63.union([
|
|
17150
17168
|
circleHoleProps,
|
|
17151
17169
|
pillHoleProps,
|
|
17152
17170
|
rectHoleProps
|
|
@@ -17155,55 +17173,55 @@ expectTypesMatch(true);
|
|
|
17155
17173
|
|
|
17156
17174
|
// lib/components/trace.ts
|
|
17157
17175
|
import { distance as distance18, layer_ref as layer_ref4, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17158
|
-
import { z as
|
|
17159
|
-
var portRef =
|
|
17160
|
-
|
|
17161
|
-
|
|
17176
|
+
import { z as z64 } from "zod";
|
|
17177
|
+
var portRef = z64.union([
|
|
17178
|
+
z64.string(),
|
|
17179
|
+
z64.custom(
|
|
17162
17180
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17163
17181
|
)
|
|
17164
17182
|
]);
|
|
17165
17183
|
var pcbPathPoint = point.extend({
|
|
17166
|
-
via:
|
|
17184
|
+
via: z64.boolean().optional(),
|
|
17167
17185
|
fromLayer: layer_ref4.optional(),
|
|
17168
17186
|
toLayer: layer_ref4.optional()
|
|
17169
17187
|
}).superRefine((value, ctx) => {
|
|
17170
17188
|
if (value.via) {
|
|
17171
17189
|
if (!value.toLayer) {
|
|
17172
17190
|
ctx.addIssue({
|
|
17173
|
-
code:
|
|
17191
|
+
code: z64.ZodIssueCode.custom,
|
|
17174
17192
|
message: "toLayer is required when via is true",
|
|
17175
17193
|
path: ["toLayer"]
|
|
17176
17194
|
});
|
|
17177
17195
|
}
|
|
17178
17196
|
} else if (value.fromLayer || value.toLayer) {
|
|
17179
17197
|
ctx.addIssue({
|
|
17180
|
-
code:
|
|
17198
|
+
code: z64.ZodIssueCode.custom,
|
|
17181
17199
|
message: "fromLayer/toLayer are only allowed when via is true",
|
|
17182
17200
|
path: ["via"]
|
|
17183
17201
|
});
|
|
17184
17202
|
}
|
|
17185
17203
|
});
|
|
17186
|
-
var pcbPath =
|
|
17187
|
-
var baseTraceProps =
|
|
17188
|
-
key:
|
|
17204
|
+
var pcbPath = z64.array(z64.union([pcbPathPoint, z64.string()]));
|
|
17205
|
+
var baseTraceProps = z64.object({
|
|
17206
|
+
key: z64.string().optional(),
|
|
17189
17207
|
thickness: distance18.optional(),
|
|
17190
17208
|
width: distance18.optional().describe("Alias for trace thickness"),
|
|
17191
|
-
schematicRouteHints:
|
|
17192
|
-
pcbRouteHints:
|
|
17193
|
-
pcbPathRelativeTo:
|
|
17209
|
+
schematicRouteHints: z64.array(point).optional(),
|
|
17210
|
+
pcbRouteHints: z64.array(route_hint_point2).optional(),
|
|
17211
|
+
pcbPathRelativeTo: z64.string().optional(),
|
|
17194
17212
|
pcbPath: pcbPath.optional(),
|
|
17195
|
-
pcbPaths:
|
|
17196
|
-
routingPhaseIndex:
|
|
17197
|
-
pcbStraightLine:
|
|
17198
|
-
schDisplayLabel:
|
|
17199
|
-
schStroke:
|
|
17200
|
-
highlightColor:
|
|
17213
|
+
pcbPaths: z64.array(pcbPath).optional(),
|
|
17214
|
+
routingPhaseIndex: z64.number().nullable().optional(),
|
|
17215
|
+
pcbStraightLine: z64.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
|
|
17216
|
+
schDisplayLabel: z64.string().optional(),
|
|
17217
|
+
schStroke: z64.string().optional(),
|
|
17218
|
+
highlightColor: z64.string().optional(),
|
|
17201
17219
|
maxLength: distance18.optional(),
|
|
17202
|
-
connectsTo:
|
|
17220
|
+
connectsTo: z64.string().or(z64.array(z64.string())).optional()
|
|
17203
17221
|
});
|
|
17204
|
-
var traceProps =
|
|
17222
|
+
var traceProps = z64.union([
|
|
17205
17223
|
baseTraceProps.extend({
|
|
17206
|
-
path:
|
|
17224
|
+
path: z64.array(portRef)
|
|
17207
17225
|
}),
|
|
17208
17226
|
baseTraceProps.extend({
|
|
17209
17227
|
from: portRef,
|
|
@@ -17217,8 +17235,8 @@ var traceProps = z62.union([
|
|
|
17217
17235
|
|
|
17218
17236
|
// lib/components/footprint.ts
|
|
17219
17237
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
17220
|
-
import { z as
|
|
17221
|
-
var footprintInsertionDirection =
|
|
17238
|
+
import { z as z65 } from "zod";
|
|
17239
|
+
var footprintInsertionDirection = z65.enum([
|
|
17222
17240
|
"from_above",
|
|
17223
17241
|
"from_left",
|
|
17224
17242
|
"from_right",
|
|
@@ -17226,10 +17244,10 @@ var footprintInsertionDirection = z63.enum([
|
|
|
17226
17244
|
"from_back"
|
|
17227
17245
|
]);
|
|
17228
17246
|
expectTypesMatch(true);
|
|
17229
|
-
var footprintProps =
|
|
17230
|
-
children:
|
|
17247
|
+
var footprintProps = z65.object({
|
|
17248
|
+
children: z65.any().optional(),
|
|
17231
17249
|
originalLayer: layer_ref5.default("top").optional(),
|
|
17232
|
-
circuitJson:
|
|
17250
|
+
circuitJson: z65.array(z65.any()).optional(),
|
|
17233
17251
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17234
17252
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17235
17253
|
"Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
|
|
@@ -17238,19 +17256,19 @@ var footprintProps = z63.object({
|
|
|
17238
17256
|
expectTypesMatch(true);
|
|
17239
17257
|
|
|
17240
17258
|
// lib/components/symbol.ts
|
|
17241
|
-
import { z as
|
|
17242
|
-
var symbolProps =
|
|
17243
|
-
originalFacingDirection:
|
|
17259
|
+
import { z as z66 } from "zod";
|
|
17260
|
+
var symbolProps = z66.object({
|
|
17261
|
+
originalFacingDirection: z66.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17244
17262
|
width: distance.optional(),
|
|
17245
17263
|
height: distance.optional(),
|
|
17246
|
-
name:
|
|
17264
|
+
name: z66.string().optional()
|
|
17247
17265
|
});
|
|
17248
17266
|
expectTypesMatch(true);
|
|
17249
17267
|
|
|
17250
17268
|
// lib/components/battery.ts
|
|
17251
17269
|
import { voltage as voltage2 } from "circuit-json";
|
|
17252
|
-
import { z as
|
|
17253
|
-
var capacity =
|
|
17270
|
+
import { z as z67 } from "zod";
|
|
17271
|
+
var capacity = z67.number().or(z67.string().endsWith("mAh")).transform((v) => {
|
|
17254
17272
|
if (typeof v === "string") {
|
|
17255
17273
|
const valString = v.replace("mAh", "");
|
|
17256
17274
|
const num = Number.parseFloat(valString);
|
|
@@ -17264,14 +17282,14 @@ var capacity = z65.number().or(z65.string().endsWith("mAh")).transform((v) => {
|
|
|
17264
17282
|
var batteryProps = commonComponentProps.extend({
|
|
17265
17283
|
capacity: capacity.optional(),
|
|
17266
17284
|
voltage: voltage2.optional(),
|
|
17267
|
-
standard:
|
|
17285
|
+
standard: z67.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17268
17286
|
schOrientation: schematicOrientation.optional()
|
|
17269
17287
|
});
|
|
17270
17288
|
var batteryPins = lrPolarPins;
|
|
17271
17289
|
expectTypesMatch(true);
|
|
17272
17290
|
|
|
17273
17291
|
// lib/components/mountedboard.ts
|
|
17274
|
-
import { z as
|
|
17292
|
+
import { z as z68 } from "zod";
|
|
17275
17293
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17276
17294
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17277
17295
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17283,7 +17301,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17283
17301
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17284
17302
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17285
17303
|
boardToBoardDistance: distance.optional(),
|
|
17286
|
-
mountOrientation:
|
|
17304
|
+
mountOrientation: z68.enum(["faceDown", "faceUp"]).optional()
|
|
17287
17305
|
});
|
|
17288
17306
|
expectTypesMatch(true);
|
|
17289
17307
|
|
|
@@ -17291,29 +17309,29 @@ expectTypesMatch(true);
|
|
|
17291
17309
|
import { distance as distance19 } from "circuit-json";
|
|
17292
17310
|
|
|
17293
17311
|
// lib/common/pcbOrientation.ts
|
|
17294
|
-
import { z as
|
|
17295
|
-
var pcbOrientation =
|
|
17312
|
+
import { z as z69 } from "zod";
|
|
17313
|
+
var pcbOrientation = z69.enum(["vertical", "horizontal"]).describe(
|
|
17296
17314
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17297
17315
|
);
|
|
17298
17316
|
expectTypesMatch(true);
|
|
17299
17317
|
|
|
17300
17318
|
// lib/components/pin-header.ts
|
|
17301
|
-
import { z as
|
|
17319
|
+
import { z as z70 } from "zod";
|
|
17302
17320
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17303
|
-
pinCount:
|
|
17321
|
+
pinCount: z70.number(),
|
|
17304
17322
|
pitch: distance19.optional(),
|
|
17305
|
-
schFacingDirection:
|
|
17306
|
-
gender:
|
|
17307
|
-
showSilkscreenPinLabels:
|
|
17308
|
-
pcbPinLabels:
|
|
17309
|
-
doubleRow:
|
|
17310
|
-
rightAngle:
|
|
17323
|
+
schFacingDirection: z70.enum(["up", "down", "left", "right"]).optional(),
|
|
17324
|
+
gender: z70.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17325
|
+
showSilkscreenPinLabels: z70.boolean().optional(),
|
|
17326
|
+
pcbPinLabels: z70.record(z70.string(), z70.string()).optional(),
|
|
17327
|
+
doubleRow: z70.boolean().optional(),
|
|
17328
|
+
rightAngle: z70.boolean().optional(),
|
|
17311
17329
|
pcbOrientation: pcbOrientation.optional(),
|
|
17312
17330
|
holeDiameter: distance19.optional(),
|
|
17313
17331
|
platedDiameter: distance19.optional(),
|
|
17314
|
-
pinLabels:
|
|
17315
|
-
connections:
|
|
17316
|
-
facingDirection:
|
|
17332
|
+
pinLabels: z70.record(z70.string(), schematicPinLabel).or(z70.array(schematicPinLabel)).optional(),
|
|
17333
|
+
connections: z70.custom().pipe(z70.record(z70.string(), connectionTarget)).optional(),
|
|
17334
|
+
facingDirection: z70.enum(["left", "right"]).optional(),
|
|
17317
17335
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17318
17336
|
schPinStyle: schematicPinStyle.optional(),
|
|
17319
17337
|
schPinSpacing: distance19.optional(),
|
|
@@ -17323,29 +17341,29 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17323
17341
|
expectTypesMatch(true);
|
|
17324
17342
|
|
|
17325
17343
|
// lib/components/netalias.ts
|
|
17326
|
-
import { z as
|
|
17344
|
+
import { z as z71 } from "zod";
|
|
17327
17345
|
import { rotation as rotation3 } from "circuit-json";
|
|
17328
|
-
var netAliasProps =
|
|
17329
|
-
net:
|
|
17330
|
-
connection:
|
|
17346
|
+
var netAliasProps = z71.object({
|
|
17347
|
+
net: z71.string().optional(),
|
|
17348
|
+
connection: z71.string().optional(),
|
|
17331
17349
|
schX: distance.optional(),
|
|
17332
17350
|
schY: distance.optional(),
|
|
17333
17351
|
schRotation: rotation3.optional(),
|
|
17334
|
-
anchorSide:
|
|
17352
|
+
anchorSide: z71.enum(["left", "top", "right", "bottom"]).optional()
|
|
17335
17353
|
});
|
|
17336
17354
|
expectTypesMatch(true);
|
|
17337
17355
|
|
|
17338
17356
|
// lib/components/netlabel.ts
|
|
17339
|
-
import { z as
|
|
17357
|
+
import { z as z72 } from "zod";
|
|
17340
17358
|
import { rotation as rotation4 } from "circuit-json";
|
|
17341
|
-
var netLabelProps =
|
|
17342
|
-
net:
|
|
17343
|
-
connection:
|
|
17344
|
-
connectsTo:
|
|
17359
|
+
var netLabelProps = z72.object({
|
|
17360
|
+
net: z72.string().optional(),
|
|
17361
|
+
connection: z72.string().optional(),
|
|
17362
|
+
connectsTo: z72.string().or(z72.array(z72.string())).optional(),
|
|
17345
17363
|
schX: distance.optional(),
|
|
17346
17364
|
schY: distance.optional(),
|
|
17347
17365
|
schRotation: rotation4.optional(),
|
|
17348
|
-
anchorSide:
|
|
17366
|
+
anchorSide: z72.enum(["left", "top", "right", "bottom"]).optional()
|
|
17349
17367
|
});
|
|
17350
17368
|
expectTypesMatch(true);
|
|
17351
17369
|
|
|
@@ -17360,12 +17378,12 @@ expectTypesMatch(true);
|
|
|
17360
17378
|
|
|
17361
17379
|
// lib/components/analogsimulation.ts
|
|
17362
17380
|
import { ms } from "circuit-json";
|
|
17363
|
-
import { z as
|
|
17364
|
-
var spiceEngine =
|
|
17381
|
+
import { z as z74 } from "zod";
|
|
17382
|
+
var spiceEngine = z74.custom(
|
|
17365
17383
|
(value) => typeof value === "string"
|
|
17366
17384
|
);
|
|
17367
|
-
var analogSimulationProps =
|
|
17368
|
-
simulationType:
|
|
17385
|
+
var analogSimulationProps = z74.object({
|
|
17386
|
+
simulationType: z74.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17369
17387
|
duration: ms.optional(),
|
|
17370
17388
|
timePerStep: ms.optional(),
|
|
17371
17389
|
spiceEngine: spiceEngine.optional()
|
|
@@ -17375,26 +17393,26 @@ expectTypesMatch(
|
|
|
17375
17393
|
);
|
|
17376
17394
|
|
|
17377
17395
|
// lib/components/autoroutingphase.ts
|
|
17378
|
-
import { z as
|
|
17379
|
-
var autoroutingPhaseProps =
|
|
17380
|
-
key:
|
|
17396
|
+
import { z as z75 } from "zod";
|
|
17397
|
+
var autoroutingPhaseProps = z75.object({
|
|
17398
|
+
key: z75.any().optional(),
|
|
17381
17399
|
autorouter: autorouterProp.optional(),
|
|
17382
|
-
phaseIndex:
|
|
17400
|
+
phaseIndex: z75.number().optional(),
|
|
17383
17401
|
...routingTolerances.shape,
|
|
17384
|
-
region:
|
|
17385
|
-
shape:
|
|
17386
|
-
minX:
|
|
17387
|
-
maxX:
|
|
17388
|
-
minY:
|
|
17389
|
-
maxY:
|
|
17402
|
+
region: z75.object({
|
|
17403
|
+
shape: z75.literal("rect").optional(),
|
|
17404
|
+
minX: z75.number(),
|
|
17405
|
+
maxX: z75.number(),
|
|
17406
|
+
minY: z75.number(),
|
|
17407
|
+
maxY: z75.number()
|
|
17390
17408
|
}).optional(),
|
|
17391
|
-
connection:
|
|
17392
|
-
connections:
|
|
17393
|
-
reroute:
|
|
17409
|
+
connection: z75.string().optional(),
|
|
17410
|
+
connections: z75.array(z75.string()).optional(),
|
|
17411
|
+
reroute: z75.boolean().optional()
|
|
17394
17412
|
}).superRefine((value, ctx) => {
|
|
17395
17413
|
if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
17396
17414
|
ctx.addIssue({
|
|
17397
|
-
code:
|
|
17415
|
+
code: z75.ZodIssueCode.custom,
|
|
17398
17416
|
message: "region, connection, or connections is required when reroute is provided",
|
|
17399
17417
|
path: ["region"]
|
|
17400
17418
|
});
|
|
@@ -17402,8 +17420,16 @@ var autoroutingPhaseProps = z73.object({
|
|
|
17402
17420
|
});
|
|
17403
17421
|
expectTypesMatch(true);
|
|
17404
17422
|
|
|
17423
|
+
// lib/components/spicemodel.ts
|
|
17424
|
+
import { z as z76 } from "zod";
|
|
17425
|
+
var spicemodelProps = z76.object({
|
|
17426
|
+
source: z76.string(),
|
|
17427
|
+
spicePinMapping: z76.record(z76.string(), z76.string()).optional()
|
|
17428
|
+
});
|
|
17429
|
+
expectTypesMatch(true);
|
|
17430
|
+
|
|
17405
17431
|
// lib/components/transistor.ts
|
|
17406
|
-
import { z as
|
|
17432
|
+
import { z as z77 } from "zod";
|
|
17407
17433
|
var transistorPinsLabels = [
|
|
17408
17434
|
"pin1",
|
|
17409
17435
|
"pin2",
|
|
@@ -17416,7 +17442,7 @@ var transistorPinsLabels = [
|
|
|
17416
17442
|
"drain"
|
|
17417
17443
|
];
|
|
17418
17444
|
var transistorProps = commonComponentProps.extend({
|
|
17419
|
-
type:
|
|
17445
|
+
type: z77.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
17420
17446
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
17421
17447
|
});
|
|
17422
17448
|
var transistorPins = [
|
|
@@ -17430,10 +17456,10 @@ var transistorPins = [
|
|
|
17430
17456
|
expectTypesMatch(true);
|
|
17431
17457
|
|
|
17432
17458
|
// lib/components/mosfet.ts
|
|
17433
|
-
import { z as
|
|
17459
|
+
import { z as z78 } from "zod";
|
|
17434
17460
|
var mosfetProps = commonComponentProps.extend({
|
|
17435
|
-
channelType:
|
|
17436
|
-
mosfetMode:
|
|
17461
|
+
channelType: z78.enum(["n", "p"]),
|
|
17462
|
+
mosfetMode: z78.enum(["enhancement", "depletion"])
|
|
17437
17463
|
});
|
|
17438
17464
|
var mosfetPins = [
|
|
17439
17465
|
"pin1",
|
|
@@ -17462,19 +17488,19 @@ expectTypesMatch(true);
|
|
|
17462
17488
|
|
|
17463
17489
|
// lib/components/inductor.ts
|
|
17464
17490
|
import { inductance } from "circuit-json";
|
|
17465
|
-
import { z as
|
|
17491
|
+
import { z as z80 } from "zod";
|
|
17466
17492
|
var inductorPins = lrPins;
|
|
17467
17493
|
var inductorProps = commonComponentProps.extend({
|
|
17468
17494
|
inductance,
|
|
17469
|
-
maxCurrentRating:
|
|
17495
|
+
maxCurrentRating: z80.union([z80.string(), z80.number()]).optional(),
|
|
17470
17496
|
schOrientation: schematicOrientation.optional(),
|
|
17471
17497
|
connections: createConnectionsProp(inductorPins).optional()
|
|
17472
17498
|
});
|
|
17473
17499
|
expectTypesMatch(true);
|
|
17474
17500
|
|
|
17475
17501
|
// lib/components/diode.ts
|
|
17476
|
-
import { z as
|
|
17477
|
-
var diodeConnectionKeys =
|
|
17502
|
+
import { z as z81 } from "zod";
|
|
17503
|
+
var diodeConnectionKeys = z81.enum([
|
|
17478
17504
|
"anode",
|
|
17479
17505
|
"cathode",
|
|
17480
17506
|
"pin1",
|
|
@@ -17482,9 +17508,9 @@ var diodeConnectionKeys = z78.enum([
|
|
|
17482
17508
|
"pos",
|
|
17483
17509
|
"neg"
|
|
17484
17510
|
]);
|
|
17485
|
-
var connectionTarget3 =
|
|
17486
|
-
var connectionsProp2 =
|
|
17487
|
-
var diodeVariant =
|
|
17511
|
+
var connectionTarget3 = z81.string().or(z81.array(z81.string()).readonly()).or(z81.array(z81.string()));
|
|
17512
|
+
var connectionsProp2 = z81.record(diodeConnectionKeys, connectionTarget3);
|
|
17513
|
+
var diodeVariant = z81.enum([
|
|
17488
17514
|
"standard",
|
|
17489
17515
|
"schottky",
|
|
17490
17516
|
"zener",
|
|
@@ -17495,12 +17521,12 @@ var diodeVariant = z78.enum([
|
|
|
17495
17521
|
var diodeProps = commonComponentProps.extend({
|
|
17496
17522
|
connections: connectionsProp2.optional(),
|
|
17497
17523
|
variant: diodeVariant.optional().default("standard"),
|
|
17498
|
-
standard:
|
|
17499
|
-
schottky:
|
|
17500
|
-
zener:
|
|
17501
|
-
avalanche:
|
|
17502
|
-
photo:
|
|
17503
|
-
tvs:
|
|
17524
|
+
standard: z81.boolean().optional(),
|
|
17525
|
+
schottky: z81.boolean().optional(),
|
|
17526
|
+
zener: z81.boolean().optional(),
|
|
17527
|
+
avalanche: z81.boolean().optional(),
|
|
17528
|
+
photo: z81.boolean().optional(),
|
|
17529
|
+
tvs: z81.boolean().optional(),
|
|
17504
17530
|
schOrientation: schematicOrientation.optional()
|
|
17505
17531
|
}).superRefine((data, ctx) => {
|
|
17506
17532
|
const enabledFlags = [
|
|
@@ -17513,11 +17539,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17513
17539
|
].filter(Boolean).length;
|
|
17514
17540
|
if (enabledFlags > 1) {
|
|
17515
17541
|
ctx.addIssue({
|
|
17516
|
-
code:
|
|
17542
|
+
code: z81.ZodIssueCode.custom,
|
|
17517
17543
|
message: "Exactly one diode variant must be enabled",
|
|
17518
17544
|
path: []
|
|
17519
17545
|
});
|
|
17520
|
-
return
|
|
17546
|
+
return z81.INVALID;
|
|
17521
17547
|
}
|
|
17522
17548
|
}).transform((data) => {
|
|
17523
17549
|
const result = {
|
|
@@ -17564,33 +17590,33 @@ var diodePins = lrPolarPins;
|
|
|
17564
17590
|
expectTypesMatch(true);
|
|
17565
17591
|
|
|
17566
17592
|
// lib/components/led.ts
|
|
17567
|
-
import { z as
|
|
17593
|
+
import { z as z82 } from "zod";
|
|
17568
17594
|
var ledProps = commonComponentProps.extend({
|
|
17569
|
-
color:
|
|
17570
|
-
wavelength:
|
|
17571
|
-
schDisplayValue:
|
|
17595
|
+
color: z82.string().optional(),
|
|
17596
|
+
wavelength: z82.string().optional(),
|
|
17597
|
+
schDisplayValue: z82.string().optional(),
|
|
17572
17598
|
schOrientation: schematicOrientation.optional(),
|
|
17573
17599
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
17574
|
-
laser:
|
|
17600
|
+
laser: z82.boolean().optional()
|
|
17575
17601
|
});
|
|
17576
17602
|
var ledPins = lrPolarPins;
|
|
17577
17603
|
|
|
17578
17604
|
// lib/components/switch.ts
|
|
17579
17605
|
import { ms as ms2, frequency as frequency3 } from "circuit-json";
|
|
17580
|
-
import { z as
|
|
17606
|
+
import { z as z83 } from "zod";
|
|
17581
17607
|
var switchProps = commonComponentProps.extend({
|
|
17582
|
-
type:
|
|
17583
|
-
isNormallyClosed:
|
|
17584
|
-
spst:
|
|
17585
|
-
spdt:
|
|
17586
|
-
dpst:
|
|
17587
|
-
dpdt:
|
|
17608
|
+
type: z83.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
17609
|
+
isNormallyClosed: z83.boolean().optional().default(false),
|
|
17610
|
+
spst: z83.boolean().optional(),
|
|
17611
|
+
spdt: z83.boolean().optional(),
|
|
17612
|
+
dpst: z83.boolean().optional(),
|
|
17613
|
+
dpdt: z83.boolean().optional(),
|
|
17588
17614
|
simSwitchFrequency: frequency3.optional(),
|
|
17589
17615
|
simCloseAt: ms2.optional(),
|
|
17590
17616
|
simOpenAt: ms2.optional(),
|
|
17591
|
-
simStartClosed:
|
|
17592
|
-
simStartOpen:
|
|
17593
|
-
connections:
|
|
17617
|
+
simStartClosed: z83.boolean().optional(),
|
|
17618
|
+
simStartOpen: z83.boolean().optional(),
|
|
17619
|
+
connections: z83.custom().pipe(z83.record(z83.string(), connectionTarget)).optional()
|
|
17594
17620
|
}).transform((props) => {
|
|
17595
17621
|
const updatedProps = { ...props };
|
|
17596
17622
|
if (updatedProps.dpdt) {
|
|
@@ -17622,33 +17648,33 @@ expectTypesMatch(true);
|
|
|
17622
17648
|
|
|
17623
17649
|
// lib/components/fabrication-note-text.ts
|
|
17624
17650
|
import { length as length4 } from "circuit-json";
|
|
17625
|
-
import { z as
|
|
17651
|
+
import { z as z84 } from "zod";
|
|
17626
17652
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
17627
|
-
text:
|
|
17628
|
-
anchorAlignment:
|
|
17629
|
-
font:
|
|
17653
|
+
text: z84.string(),
|
|
17654
|
+
anchorAlignment: z84.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
17655
|
+
font: z84.enum(["tscircuit2024"]).optional(),
|
|
17630
17656
|
fontSize: length4.optional(),
|
|
17631
|
-
color:
|
|
17657
|
+
color: z84.string().optional()
|
|
17632
17658
|
});
|
|
17633
17659
|
expectTypesMatch(true);
|
|
17634
17660
|
|
|
17635
17661
|
// lib/components/fabrication-note-rect.ts
|
|
17636
17662
|
import { distance as distance20 } from "circuit-json";
|
|
17637
|
-
import { z as
|
|
17663
|
+
import { z as z85 } from "zod";
|
|
17638
17664
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17639
17665
|
width: distance20,
|
|
17640
17666
|
height: distance20,
|
|
17641
17667
|
strokeWidth: distance20.optional(),
|
|
17642
|
-
isFilled:
|
|
17643
|
-
hasStroke:
|
|
17644
|
-
isStrokeDashed:
|
|
17645
|
-
color:
|
|
17668
|
+
isFilled: z85.boolean().optional(),
|
|
17669
|
+
hasStroke: z85.boolean().optional(),
|
|
17670
|
+
isStrokeDashed: z85.boolean().optional(),
|
|
17671
|
+
color: z85.string().optional(),
|
|
17646
17672
|
cornerRadius: distance20.optional()
|
|
17647
17673
|
});
|
|
17648
17674
|
|
|
17649
17675
|
// lib/components/fabrication-note-path.ts
|
|
17650
17676
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
17651
|
-
import { z as
|
|
17677
|
+
import { z as z86 } from "zod";
|
|
17652
17678
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
17653
17679
|
pcbLeftEdgeX: true,
|
|
17654
17680
|
pcbRightEdgeX: true,
|
|
@@ -17660,15 +17686,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
17660
17686
|
pcbOffsetY: true,
|
|
17661
17687
|
pcbRotation: true
|
|
17662
17688
|
}).extend({
|
|
17663
|
-
route:
|
|
17689
|
+
route: z86.array(route_hint_point3),
|
|
17664
17690
|
strokeWidth: length5.optional(),
|
|
17665
|
-
color:
|
|
17691
|
+
color: z86.string().optional()
|
|
17666
17692
|
});
|
|
17667
17693
|
|
|
17668
17694
|
// lib/components/fabrication-note-dimension.ts
|
|
17669
17695
|
import { distance as distance21, length as length6 } from "circuit-json";
|
|
17670
|
-
import { z as
|
|
17671
|
-
var dimensionTarget =
|
|
17696
|
+
import { z as z87 } from "zod";
|
|
17697
|
+
var dimensionTarget = z87.union([z87.string(), point]);
|
|
17672
17698
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
17673
17699
|
pcbLeftEdgeX: true,
|
|
17674
17700
|
pcbRightEdgeX: true,
|
|
@@ -17682,54 +17708,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
17682
17708
|
}).extend({
|
|
17683
17709
|
from: dimensionTarget,
|
|
17684
17710
|
to: dimensionTarget,
|
|
17685
|
-
text:
|
|
17711
|
+
text: z87.string().optional(),
|
|
17686
17712
|
offset: distance21.optional(),
|
|
17687
|
-
font:
|
|
17713
|
+
font: z87.enum(["tscircuit2024"]).optional(),
|
|
17688
17714
|
fontSize: length6.optional(),
|
|
17689
|
-
color:
|
|
17715
|
+
color: z87.string().optional(),
|
|
17690
17716
|
arrowSize: distance21.optional(),
|
|
17691
|
-
units:
|
|
17692
|
-
outerEdgeToEdge:
|
|
17693
|
-
centerToCenter:
|
|
17694
|
-
innerEdgeToEdge:
|
|
17717
|
+
units: z87.enum(["in", "mm"]).optional(),
|
|
17718
|
+
outerEdgeToEdge: z87.literal(true).optional(),
|
|
17719
|
+
centerToCenter: z87.literal(true).optional(),
|
|
17720
|
+
innerEdgeToEdge: z87.literal(true).optional()
|
|
17695
17721
|
});
|
|
17696
17722
|
expectTypesMatch(true);
|
|
17697
17723
|
|
|
17698
17724
|
// lib/components/pcb-trace.ts
|
|
17699
17725
|
import { distance as distance22, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
17700
|
-
import { z as
|
|
17701
|
-
var pcbTraceProps =
|
|
17702
|
-
layer:
|
|
17726
|
+
import { z as z88 } from "zod";
|
|
17727
|
+
var pcbTraceProps = z88.object({
|
|
17728
|
+
layer: z88.string().optional(),
|
|
17703
17729
|
thickness: distance22.optional(),
|
|
17704
|
-
route:
|
|
17730
|
+
route: z88.array(route_hint_point4)
|
|
17705
17731
|
});
|
|
17706
17732
|
|
|
17707
17733
|
// lib/components/via.ts
|
|
17708
17734
|
import { distance as distance23, layer_ref as layer_ref6 } from "circuit-json";
|
|
17709
|
-
import { z as
|
|
17735
|
+
import { z as z89 } from "zod";
|
|
17710
17736
|
var viaProps = commonLayoutProps.extend({
|
|
17711
|
-
name:
|
|
17737
|
+
name: z89.string().optional(),
|
|
17712
17738
|
fromLayer: layer_ref6.optional(),
|
|
17713
17739
|
toLayer: layer_ref6.optional(),
|
|
17714
17740
|
holeDiameter: distance23.optional(),
|
|
17715
17741
|
outerDiameter: distance23.optional(),
|
|
17716
|
-
layers:
|
|
17717
|
-
connectsTo:
|
|
17718
|
-
netIsAssignable:
|
|
17742
|
+
layers: z89.array(layer_ref6).optional(),
|
|
17743
|
+
connectsTo: z89.string().or(z89.array(z89.string())).optional(),
|
|
17744
|
+
netIsAssignable: z89.boolean().optional()
|
|
17719
17745
|
});
|
|
17720
17746
|
expectTypesMatch(true);
|
|
17721
17747
|
|
|
17722
17748
|
// lib/components/testpoint.ts
|
|
17723
17749
|
import { distance as distance24 } from "circuit-json";
|
|
17724
|
-
import { z as
|
|
17750
|
+
import { z as z90 } from "zod";
|
|
17725
17751
|
var testpointPins = ["pin1"];
|
|
17726
|
-
var testpointConnectionsProp =
|
|
17752
|
+
var testpointConnectionsProp = z90.object({
|
|
17727
17753
|
pin1: connectionTarget
|
|
17728
17754
|
}).strict();
|
|
17729
17755
|
var testpointProps = commonComponentProps.extend({
|
|
17730
17756
|
connections: testpointConnectionsProp.optional(),
|
|
17731
|
-
footprintVariant:
|
|
17732
|
-
padShape:
|
|
17757
|
+
footprintVariant: z90.enum(["pad", "through_hole"]).optional(),
|
|
17758
|
+
padShape: z90.enum(["rect", "circle"]).optional().default("circle"),
|
|
17733
17759
|
padDiameter: distance24.optional(),
|
|
17734
17760
|
holeDiameter: distance24.optional(),
|
|
17735
17761
|
width: distance24.optional(),
|
|
@@ -17741,45 +17767,45 @@ var testpointProps = commonComponentProps.extend({
|
|
|
17741
17767
|
expectTypesMatch(true);
|
|
17742
17768
|
|
|
17743
17769
|
// lib/components/breakoutpoint.ts
|
|
17744
|
-
import { z as
|
|
17770
|
+
import { z as z91 } from "zod";
|
|
17745
17771
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17746
|
-
connection:
|
|
17772
|
+
connection: z91.string()
|
|
17747
17773
|
});
|
|
17748
17774
|
expectTypesMatch(true);
|
|
17749
17775
|
|
|
17750
17776
|
// lib/components/pcb-keepout.ts
|
|
17751
17777
|
import { distance as distance25, layer_ref as layer_ref7 } from "circuit-json";
|
|
17752
|
-
import { z as
|
|
17753
|
-
var pcbKeepoutProps =
|
|
17778
|
+
import { z as z92 } from "zod";
|
|
17779
|
+
var pcbKeepoutProps = z92.union([
|
|
17754
17780
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17755
|
-
shape:
|
|
17781
|
+
shape: z92.literal("circle"),
|
|
17756
17782
|
radius: distance25,
|
|
17757
|
-
layers:
|
|
17783
|
+
layers: z92.array(layer_ref7).optional()
|
|
17758
17784
|
}),
|
|
17759
17785
|
pcbLayoutProps.extend({
|
|
17760
|
-
shape:
|
|
17786
|
+
shape: z92.literal("rect"),
|
|
17761
17787
|
width: distance25,
|
|
17762
17788
|
height: distance25,
|
|
17763
|
-
layers:
|
|
17789
|
+
layers: z92.array(layer_ref7).optional()
|
|
17764
17790
|
})
|
|
17765
17791
|
]);
|
|
17766
17792
|
|
|
17767
17793
|
// lib/components/courtyard-rect.ts
|
|
17768
17794
|
import { distance as distance26 } from "circuit-json";
|
|
17769
|
-
import { z as
|
|
17795
|
+
import { z as z93 } from "zod";
|
|
17770
17796
|
var courtyardRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17771
17797
|
width: distance26,
|
|
17772
17798
|
height: distance26,
|
|
17773
17799
|
strokeWidth: distance26.optional(),
|
|
17774
|
-
isFilled:
|
|
17775
|
-
hasStroke:
|
|
17776
|
-
isStrokeDashed:
|
|
17777
|
-
color:
|
|
17800
|
+
isFilled: z93.boolean().optional(),
|
|
17801
|
+
hasStroke: z93.boolean().optional(),
|
|
17802
|
+
isStrokeDashed: z93.boolean().optional(),
|
|
17803
|
+
color: z93.string().optional()
|
|
17778
17804
|
});
|
|
17779
17805
|
|
|
17780
17806
|
// lib/components/courtyard-outline.ts
|
|
17781
17807
|
import { length as length7 } from "circuit-json";
|
|
17782
|
-
import { z as
|
|
17808
|
+
import { z as z94 } from "zod";
|
|
17783
17809
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
17784
17810
|
pcbLeftEdgeX: true,
|
|
17785
17811
|
pcbRightEdgeX: true,
|
|
@@ -17791,11 +17817,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
17791
17817
|
pcbOffsetY: true,
|
|
17792
17818
|
pcbRotation: true
|
|
17793
17819
|
}).extend({
|
|
17794
|
-
outline:
|
|
17820
|
+
outline: z94.array(point),
|
|
17795
17821
|
strokeWidth: length7.optional(),
|
|
17796
|
-
isClosed:
|
|
17797
|
-
isStrokeDashed:
|
|
17798
|
-
color:
|
|
17822
|
+
isClosed: z94.boolean().optional(),
|
|
17823
|
+
isStrokeDashed: z94.boolean().optional(),
|
|
17824
|
+
color: z94.string().optional()
|
|
17799
17825
|
});
|
|
17800
17826
|
|
|
17801
17827
|
// lib/components/courtyard-circle.ts
|
|
@@ -17815,35 +17841,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17815
17841
|
});
|
|
17816
17842
|
|
|
17817
17843
|
// lib/components/copper-pour.ts
|
|
17818
|
-
import { z as
|
|
17844
|
+
import { z as z97 } from "zod";
|
|
17819
17845
|
import { layer_ref as layer_ref8 } from "circuit-json";
|
|
17820
|
-
var copperPourProps =
|
|
17821
|
-
name:
|
|
17846
|
+
var copperPourProps = z97.object({
|
|
17847
|
+
name: z97.string().optional(),
|
|
17822
17848
|
layer: layer_ref8,
|
|
17823
|
-
connectsTo:
|
|
17824
|
-
unbroken:
|
|
17849
|
+
connectsTo: z97.string(),
|
|
17850
|
+
unbroken: z97.boolean().optional(),
|
|
17825
17851
|
padMargin: distance.optional(),
|
|
17826
17852
|
traceMargin: distance.optional(),
|
|
17827
17853
|
clearance: distance.optional(),
|
|
17828
17854
|
boardEdgeMargin: distance.optional(),
|
|
17829
17855
|
cutoutMargin: distance.optional(),
|
|
17830
|
-
outline:
|
|
17831
|
-
coveredWithSolderMask:
|
|
17856
|
+
outline: z97.array(point).optional(),
|
|
17857
|
+
coveredWithSolderMask: z97.boolean().optional().default(true)
|
|
17832
17858
|
});
|
|
17833
17859
|
expectTypesMatch(true);
|
|
17834
17860
|
|
|
17835
17861
|
// lib/components/cadassembly.ts
|
|
17836
17862
|
import { layer_ref as layer_ref9 } from "circuit-json";
|
|
17837
|
-
import { z as
|
|
17838
|
-
var cadassemblyProps =
|
|
17863
|
+
import { z as z98 } from "zod";
|
|
17864
|
+
var cadassemblyProps = z98.object({
|
|
17839
17865
|
originalLayer: layer_ref9.default("top").optional(),
|
|
17840
|
-
children:
|
|
17866
|
+
children: z98.any().optional()
|
|
17841
17867
|
});
|
|
17842
17868
|
expectTypesMatch(true);
|
|
17843
17869
|
|
|
17844
17870
|
// lib/components/cadmodel.ts
|
|
17845
|
-
import { z as
|
|
17846
|
-
var pcbPosition =
|
|
17871
|
+
import { z as z99 } from "zod";
|
|
17872
|
+
var pcbPosition = z99.object({
|
|
17847
17873
|
pcbX: pcbCoordinate.optional(),
|
|
17848
17874
|
pcbY: pcbCoordinate.optional(),
|
|
17849
17875
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -17860,7 +17886,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
17860
17886
|
});
|
|
17861
17887
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
17862
17888
|
expectTypesMatch(true);
|
|
17863
|
-
var cadmodelProps =
|
|
17889
|
+
var cadmodelProps = z99.union([z99.null(), url, cadModelObject]);
|
|
17864
17890
|
|
|
17865
17891
|
// lib/components/power-source.ts
|
|
17866
17892
|
import { voltage as voltage3 } from "circuit-json";
|
|
@@ -17870,9 +17896,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
17870
17896
|
|
|
17871
17897
|
// lib/components/voltagesource.ts
|
|
17872
17898
|
import { frequency as frequency4, rotation as rotation5, voltage as voltage4 } from "circuit-json";
|
|
17873
|
-
import { z as
|
|
17899
|
+
import { z as z100 } from "zod";
|
|
17874
17900
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17875
|
-
var percentage =
|
|
17901
|
+
var percentage = z100.union([z100.string(), z100.number()]).transform((val) => {
|
|
17876
17902
|
if (typeof val === "string") {
|
|
17877
17903
|
if (val.endsWith("%")) {
|
|
17878
17904
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17881,13 +17907,13 @@ var percentage = z97.union([z97.string(), z97.number()]).transform((val) => {
|
|
|
17881
17907
|
}
|
|
17882
17908
|
return val;
|
|
17883
17909
|
}).pipe(
|
|
17884
|
-
|
|
17910
|
+
z100.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17885
17911
|
);
|
|
17886
17912
|
var voltageSourceProps = commonComponentProps.extend({
|
|
17887
17913
|
voltage: voltage4.optional(),
|
|
17888
17914
|
frequency: frequency4.optional(),
|
|
17889
17915
|
peakToPeakVoltage: voltage4.optional(),
|
|
17890
|
-
waveShape:
|
|
17916
|
+
waveShape: z100.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
17891
17917
|
phase: rotation5.optional(),
|
|
17892
17918
|
dutyCycle: percentage.optional(),
|
|
17893
17919
|
connections: createConnectionsProp(voltageSourcePinLabels).optional()
|
|
@@ -17897,9 +17923,9 @@ expectTypesMatch(true);
|
|
|
17897
17923
|
|
|
17898
17924
|
// lib/components/currentsource.ts
|
|
17899
17925
|
import { frequency as frequency5, rotation as rotation6, current } from "circuit-json";
|
|
17900
|
-
import { z as
|
|
17926
|
+
import { z as z101 } from "zod";
|
|
17901
17927
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17902
|
-
var percentage2 =
|
|
17928
|
+
var percentage2 = z101.union([z101.string(), z101.number()]).transform((val) => {
|
|
17903
17929
|
if (typeof val === "string") {
|
|
17904
17930
|
if (val.endsWith("%")) {
|
|
17905
17931
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17908,13 +17934,13 @@ var percentage2 = z98.union([z98.string(), z98.number()]).transform((val) => {
|
|
|
17908
17934
|
}
|
|
17909
17935
|
return val;
|
|
17910
17936
|
}).pipe(
|
|
17911
|
-
|
|
17937
|
+
z101.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17912
17938
|
);
|
|
17913
17939
|
var currentSourceProps = commonComponentProps.extend({
|
|
17914
17940
|
current: current.optional(),
|
|
17915
17941
|
frequency: frequency5.optional(),
|
|
17916
17942
|
peakToPeakCurrent: current.optional(),
|
|
17917
|
-
waveShape:
|
|
17943
|
+
waveShape: z101.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
17918
17944
|
phase: rotation6.optional(),
|
|
17919
17945
|
dutyCycle: percentage2.optional(),
|
|
17920
17946
|
connections: createConnectionsProp(currentSourcePinLabels).optional()
|
|
@@ -17923,57 +17949,57 @@ var currentSourcePins = lrPolarPins;
|
|
|
17923
17949
|
expectTypesMatch(true);
|
|
17924
17950
|
|
|
17925
17951
|
// lib/components/voltageprobe.ts
|
|
17926
|
-
import { z as
|
|
17952
|
+
import { z as z102 } from "zod";
|
|
17927
17953
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
17928
|
-
name:
|
|
17929
|
-
connectsTo:
|
|
17930
|
-
referenceTo:
|
|
17931
|
-
color:
|
|
17954
|
+
name: z102.string().optional(),
|
|
17955
|
+
connectsTo: z102.string(),
|
|
17956
|
+
referenceTo: z102.string().optional(),
|
|
17957
|
+
color: z102.string().optional()
|
|
17932
17958
|
});
|
|
17933
17959
|
expectTypesMatch(true);
|
|
17934
17960
|
|
|
17935
17961
|
// lib/components/schematic-arc.ts
|
|
17936
17962
|
import { distance as distance29, point as point5, rotation as rotation7 } from "circuit-json";
|
|
17937
|
-
import { z as
|
|
17938
|
-
var schematicArcProps =
|
|
17963
|
+
import { z as z103 } from "zod";
|
|
17964
|
+
var schematicArcProps = z103.object({
|
|
17939
17965
|
center: point5,
|
|
17940
17966
|
radius: distance29,
|
|
17941
17967
|
startAngleDegrees: rotation7,
|
|
17942
17968
|
endAngleDegrees: rotation7,
|
|
17943
|
-
direction:
|
|
17969
|
+
direction: z103.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
17944
17970
|
strokeWidth: distance29.optional(),
|
|
17945
|
-
color:
|
|
17946
|
-
isDashed:
|
|
17971
|
+
color: z103.string().optional(),
|
|
17972
|
+
isDashed: z103.boolean().optional().default(false)
|
|
17947
17973
|
});
|
|
17948
17974
|
expectTypesMatch(true);
|
|
17949
17975
|
|
|
17950
17976
|
// lib/components/toolingrail.ts
|
|
17951
|
-
import { z as
|
|
17952
|
-
var toolingrailProps =
|
|
17953
|
-
children:
|
|
17977
|
+
import { z as z104 } from "zod";
|
|
17978
|
+
var toolingrailProps = z104.object({
|
|
17979
|
+
children: z104.any().optional()
|
|
17954
17980
|
});
|
|
17955
17981
|
expectTypesMatch(true);
|
|
17956
17982
|
|
|
17957
17983
|
// lib/components/schematic-box.ts
|
|
17958
17984
|
import { distance as distance30 } from "circuit-json";
|
|
17959
|
-
import { z as
|
|
17960
|
-
var schematicBoxProps =
|
|
17985
|
+
import { z as z105 } from "zod";
|
|
17986
|
+
var schematicBoxProps = z105.object({
|
|
17961
17987
|
schX: distance30.optional(),
|
|
17962
17988
|
schY: distance30.optional(),
|
|
17963
17989
|
width: distance30.optional(),
|
|
17964
17990
|
height: distance30.optional(),
|
|
17965
|
-
overlay:
|
|
17991
|
+
overlay: z105.array(z105.string()).optional(),
|
|
17966
17992
|
padding: distance30.optional(),
|
|
17967
17993
|
paddingLeft: distance30.optional(),
|
|
17968
17994
|
paddingRight: distance30.optional(),
|
|
17969
17995
|
paddingTop: distance30.optional(),
|
|
17970
17996
|
paddingBottom: distance30.optional(),
|
|
17971
|
-
title:
|
|
17997
|
+
title: z105.string().optional(),
|
|
17972
17998
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
17973
|
-
titleColor:
|
|
17999
|
+
titleColor: z105.string().optional(),
|
|
17974
18000
|
titleFontSize: distance30.optional(),
|
|
17975
|
-
titleInside:
|
|
17976
|
-
strokeStyle:
|
|
18001
|
+
titleInside: z105.boolean().default(false),
|
|
18002
|
+
strokeStyle: z105.enum(["solid", "dashed"]).default("solid")
|
|
17977
18003
|
}).refine(
|
|
17978
18004
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
17979
18005
|
{
|
|
@@ -17989,15 +18015,15 @@ expectTypesMatch(true);
|
|
|
17989
18015
|
|
|
17990
18016
|
// lib/components/schematic-circle.ts
|
|
17991
18017
|
import { distance as distance31, point as point6 } from "circuit-json";
|
|
17992
|
-
import { z as
|
|
17993
|
-
var schematicCircleProps =
|
|
18018
|
+
import { z as z106 } from "zod";
|
|
18019
|
+
var schematicCircleProps = z106.object({
|
|
17994
18020
|
center: point6,
|
|
17995
18021
|
radius: distance31,
|
|
17996
18022
|
strokeWidth: distance31.optional(),
|
|
17997
|
-
color:
|
|
17998
|
-
isFilled:
|
|
17999
|
-
fillColor:
|
|
18000
|
-
isDashed:
|
|
18023
|
+
color: z106.string().optional(),
|
|
18024
|
+
isFilled: z106.boolean().optional().default(false),
|
|
18025
|
+
fillColor: z106.string().optional(),
|
|
18026
|
+
isDashed: z106.boolean().optional().default(false)
|
|
18001
18027
|
});
|
|
18002
18028
|
expectTypesMatch(
|
|
18003
18029
|
true
|
|
@@ -18005,43 +18031,43 @@ expectTypesMatch(
|
|
|
18005
18031
|
|
|
18006
18032
|
// lib/components/schematic-rect.ts
|
|
18007
18033
|
import { distance as distance32, rotation as rotation8 } from "circuit-json";
|
|
18008
|
-
import { z as
|
|
18009
|
-
var schematicRectProps =
|
|
18034
|
+
import { z as z107 } from "zod";
|
|
18035
|
+
var schematicRectProps = z107.object({
|
|
18010
18036
|
schX: distance32.optional(),
|
|
18011
18037
|
schY: distance32.optional(),
|
|
18012
18038
|
width: distance32,
|
|
18013
18039
|
height: distance32,
|
|
18014
18040
|
rotation: rotation8.default(0),
|
|
18015
18041
|
strokeWidth: distance32.optional(),
|
|
18016
|
-
color:
|
|
18017
|
-
isFilled:
|
|
18018
|
-
fillColor:
|
|
18019
|
-
isDashed:
|
|
18042
|
+
color: z107.string().optional(),
|
|
18043
|
+
isFilled: z107.boolean().optional().default(false),
|
|
18044
|
+
fillColor: z107.string().optional(),
|
|
18045
|
+
isDashed: z107.boolean().optional().default(false),
|
|
18020
18046
|
cornerRadius: distance32.optional()
|
|
18021
18047
|
});
|
|
18022
18048
|
expectTypesMatch(true);
|
|
18023
18049
|
|
|
18024
18050
|
// lib/components/schematic-line.ts
|
|
18025
18051
|
import { distance as distance33 } from "circuit-json";
|
|
18026
|
-
import { z as
|
|
18027
|
-
var schematicLineProps =
|
|
18052
|
+
import { z as z108 } from "zod";
|
|
18053
|
+
var schematicLineProps = z108.object({
|
|
18028
18054
|
x1: distance33,
|
|
18029
18055
|
y1: distance33,
|
|
18030
18056
|
x2: distance33,
|
|
18031
18057
|
y2: distance33,
|
|
18032
18058
|
strokeWidth: distance33.optional(),
|
|
18033
|
-
color:
|
|
18034
|
-
isDashed:
|
|
18059
|
+
color: z108.string().optional(),
|
|
18060
|
+
isDashed: z108.boolean().optional().default(false)
|
|
18035
18061
|
});
|
|
18036
18062
|
expectTypesMatch(true);
|
|
18037
18063
|
|
|
18038
18064
|
// lib/components/schematic-text.ts
|
|
18039
18065
|
import { distance as distance34, rotation as rotation9 } from "circuit-json";
|
|
18040
|
-
import { z as
|
|
18066
|
+
import { z as z110 } from "zod";
|
|
18041
18067
|
|
|
18042
18068
|
// lib/common/fivePointAnchor.ts
|
|
18043
|
-
import { z as
|
|
18044
|
-
var fivePointAnchor =
|
|
18069
|
+
import { z as z109 } from "zod";
|
|
18070
|
+
var fivePointAnchor = z109.enum([
|
|
18045
18071
|
"center",
|
|
18046
18072
|
"left",
|
|
18047
18073
|
"right",
|
|
@@ -18050,37 +18076,37 @@ var fivePointAnchor = z106.enum([
|
|
|
18050
18076
|
]);
|
|
18051
18077
|
|
|
18052
18078
|
// lib/components/schematic-text.ts
|
|
18053
|
-
var schematicTextProps =
|
|
18079
|
+
var schematicTextProps = z110.object({
|
|
18054
18080
|
schX: distance34.optional(),
|
|
18055
18081
|
schY: distance34.optional(),
|
|
18056
|
-
text:
|
|
18057
|
-
fontSize:
|
|
18058
|
-
anchor:
|
|
18059
|
-
color:
|
|
18082
|
+
text: z110.string(),
|
|
18083
|
+
fontSize: z110.number().default(1),
|
|
18084
|
+
anchor: z110.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18085
|
+
color: z110.string().default("#000000"),
|
|
18060
18086
|
schRotation: rotation9.default(0)
|
|
18061
18087
|
});
|
|
18062
18088
|
expectTypesMatch(true);
|
|
18063
18089
|
|
|
18064
18090
|
// lib/components/schematic-path.ts
|
|
18065
18091
|
import { distance as distance35, point as point8 } from "circuit-json";
|
|
18066
|
-
import { z as
|
|
18067
|
-
var schematicPathProps =
|
|
18068
|
-
points:
|
|
18069
|
-
svgPath:
|
|
18092
|
+
import { z as z111 } from "zod";
|
|
18093
|
+
var schematicPathProps = z111.object({
|
|
18094
|
+
points: z111.array(point8).optional(),
|
|
18095
|
+
svgPath: z111.string().optional(),
|
|
18070
18096
|
strokeWidth: distance35.optional(),
|
|
18071
|
-
strokeColor:
|
|
18072
|
-
isFilled:
|
|
18073
|
-
fillColor:
|
|
18097
|
+
strokeColor: z111.string().optional(),
|
|
18098
|
+
isFilled: z111.boolean().optional().default(false),
|
|
18099
|
+
fillColor: z111.string().optional()
|
|
18074
18100
|
});
|
|
18075
18101
|
expectTypesMatch(true);
|
|
18076
18102
|
|
|
18077
18103
|
// lib/components/schematic-table.ts
|
|
18078
18104
|
import { distance as distance36 } from "circuit-json";
|
|
18079
|
-
import { z as
|
|
18080
|
-
var schematicTableProps =
|
|
18105
|
+
import { z as z112 } from "zod";
|
|
18106
|
+
var schematicTableProps = z112.object({
|
|
18081
18107
|
schX: distance36.optional(),
|
|
18082
18108
|
schY: distance36.optional(),
|
|
18083
|
-
children:
|
|
18109
|
+
children: z112.any().optional(),
|
|
18084
18110
|
cellPadding: distance36.optional(),
|
|
18085
18111
|
borderWidth: distance36.optional(),
|
|
18086
18112
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18090,33 +18116,33 @@ expectTypesMatch(true);
|
|
|
18090
18116
|
|
|
18091
18117
|
// lib/components/schematic-row.ts
|
|
18092
18118
|
import { distance as distance37 } from "circuit-json";
|
|
18093
|
-
import { z as
|
|
18094
|
-
var schematicRowProps =
|
|
18095
|
-
children:
|
|
18119
|
+
import { z as z113 } from "zod";
|
|
18120
|
+
var schematicRowProps = z113.object({
|
|
18121
|
+
children: z113.any().optional(),
|
|
18096
18122
|
height: distance37.optional()
|
|
18097
18123
|
});
|
|
18098
18124
|
expectTypesMatch(true);
|
|
18099
18125
|
|
|
18100
18126
|
// lib/components/schematic-cell.ts
|
|
18101
18127
|
import { distance as distance38 } from "circuit-json";
|
|
18102
|
-
import { z as
|
|
18103
|
-
var schematicCellProps =
|
|
18104
|
-
children:
|
|
18105
|
-
horizontalAlign:
|
|
18106
|
-
verticalAlign:
|
|
18128
|
+
import { z as z114 } from "zod";
|
|
18129
|
+
var schematicCellProps = z114.object({
|
|
18130
|
+
children: z114.string().optional(),
|
|
18131
|
+
horizontalAlign: z114.enum(["left", "center", "right"]).optional(),
|
|
18132
|
+
verticalAlign: z114.enum(["top", "middle", "bottom"]).optional(),
|
|
18107
18133
|
fontSize: distance38.optional(),
|
|
18108
|
-
rowSpan:
|
|
18109
|
-
colSpan:
|
|
18134
|
+
rowSpan: z114.number().optional(),
|
|
18135
|
+
colSpan: z114.number().optional(),
|
|
18110
18136
|
width: distance38.optional(),
|
|
18111
|
-
text:
|
|
18137
|
+
text: z114.string().optional()
|
|
18112
18138
|
});
|
|
18113
18139
|
expectTypesMatch(true);
|
|
18114
18140
|
|
|
18115
18141
|
// lib/components/schematic-section.ts
|
|
18116
|
-
import { z as
|
|
18117
|
-
var schematicSectionProps =
|
|
18118
|
-
displayName:
|
|
18119
|
-
name:
|
|
18142
|
+
import { z as z115 } from "zod";
|
|
18143
|
+
var schematicSectionProps = z115.object({
|
|
18144
|
+
displayName: z115.string().optional(),
|
|
18145
|
+
name: z115.string()
|
|
18120
18146
|
});
|
|
18121
18147
|
expectTypesMatch(
|
|
18122
18148
|
true
|
|
@@ -18124,40 +18150,40 @@ expectTypesMatch(
|
|
|
18124
18150
|
|
|
18125
18151
|
// lib/components/copper-text.ts
|
|
18126
18152
|
import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
|
|
18127
|
-
import { z as
|
|
18153
|
+
import { z as z116 } from "zod";
|
|
18128
18154
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18129
|
-
text:
|
|
18155
|
+
text: z116.string(),
|
|
18130
18156
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18131
|
-
font:
|
|
18157
|
+
font: z116.enum(["tscircuit2024"]).optional(),
|
|
18132
18158
|
fontSize: length8.optional(),
|
|
18133
|
-
layers:
|
|
18134
|
-
knockout:
|
|
18135
|
-
mirrored:
|
|
18159
|
+
layers: z116.array(layer_ref10).optional(),
|
|
18160
|
+
knockout: z116.boolean().optional(),
|
|
18161
|
+
mirrored: z116.boolean().optional()
|
|
18136
18162
|
});
|
|
18137
18163
|
|
|
18138
18164
|
// lib/components/silkscreen-text.ts
|
|
18139
18165
|
import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
|
|
18140
|
-
import { z as
|
|
18166
|
+
import { z as z117 } from "zod";
|
|
18141
18167
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18142
|
-
text:
|
|
18168
|
+
text: z117.string(),
|
|
18143
18169
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18144
|
-
font:
|
|
18170
|
+
font: z117.enum(["tscircuit2024"]).optional(),
|
|
18145
18171
|
fontSize: length9.optional(),
|
|
18146
18172
|
/**
|
|
18147
18173
|
* If true, text will knock out underlying silkscreen
|
|
18148
18174
|
*/
|
|
18149
|
-
isKnockout:
|
|
18175
|
+
isKnockout: z117.boolean().optional(),
|
|
18150
18176
|
knockoutPadding: length9.optional(),
|
|
18151
18177
|
knockoutPaddingLeft: length9.optional(),
|
|
18152
18178
|
knockoutPaddingRight: length9.optional(),
|
|
18153
18179
|
knockoutPaddingTop: length9.optional(),
|
|
18154
18180
|
knockoutPaddingBottom: length9.optional(),
|
|
18155
|
-
layers:
|
|
18181
|
+
layers: z117.array(layer_ref11).optional()
|
|
18156
18182
|
});
|
|
18157
18183
|
|
|
18158
18184
|
// lib/components/silkscreen-path.ts
|
|
18159
18185
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18160
|
-
import { z as
|
|
18186
|
+
import { z as z118 } from "zod";
|
|
18161
18187
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18162
18188
|
pcbLeftEdgeX: true,
|
|
18163
18189
|
pcbRightEdgeX: true,
|
|
@@ -18169,7 +18195,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18169
18195
|
pcbOffsetY: true,
|
|
18170
18196
|
pcbRotation: true
|
|
18171
18197
|
}).extend({
|
|
18172
|
-
route:
|
|
18198
|
+
route: z118.array(route_hint_point5),
|
|
18173
18199
|
strokeWidth: length10.optional()
|
|
18174
18200
|
});
|
|
18175
18201
|
|
|
@@ -18191,10 +18217,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18191
18217
|
|
|
18192
18218
|
// lib/components/silkscreen-rect.ts
|
|
18193
18219
|
import { distance as distance40 } from "circuit-json";
|
|
18194
|
-
import { z as
|
|
18220
|
+
import { z as z119 } from "zod";
|
|
18195
18221
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18196
|
-
filled:
|
|
18197
|
-
stroke:
|
|
18222
|
+
filled: z119.boolean().default(true).optional(),
|
|
18223
|
+
stroke: z119.enum(["dashed", "solid", "none"]).optional(),
|
|
18198
18224
|
strokeWidth: distance40.optional(),
|
|
18199
18225
|
width: distance40,
|
|
18200
18226
|
height: distance40,
|
|
@@ -18203,73 +18229,73 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18203
18229
|
|
|
18204
18230
|
// lib/components/silkscreen-circle.ts
|
|
18205
18231
|
import { distance as distance41 } from "circuit-json";
|
|
18206
|
-
import { z as
|
|
18232
|
+
import { z as z120 } from "zod";
|
|
18207
18233
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18208
|
-
isFilled:
|
|
18209
|
-
isOutline:
|
|
18234
|
+
isFilled: z120.boolean().optional(),
|
|
18235
|
+
isOutline: z120.boolean().optional(),
|
|
18210
18236
|
strokeWidth: distance41.optional(),
|
|
18211
18237
|
radius: distance41
|
|
18212
18238
|
});
|
|
18213
18239
|
|
|
18214
18240
|
// lib/components/trace-hint.ts
|
|
18215
18241
|
import { distance as distance42, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18216
|
-
import { z as
|
|
18217
|
-
var routeHintPointProps =
|
|
18242
|
+
import { z as z121 } from "zod";
|
|
18243
|
+
var routeHintPointProps = z121.object({
|
|
18218
18244
|
x: distance42,
|
|
18219
18245
|
y: distance42,
|
|
18220
|
-
via:
|
|
18246
|
+
via: z121.boolean().optional(),
|
|
18221
18247
|
toLayer: layer_ref12.optional()
|
|
18222
18248
|
});
|
|
18223
|
-
var traceHintProps =
|
|
18224
|
-
for:
|
|
18249
|
+
var traceHintProps = z121.object({
|
|
18250
|
+
for: z121.string().optional().describe(
|
|
18225
18251
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18226
18252
|
),
|
|
18227
|
-
order:
|
|
18253
|
+
order: z121.number().optional(),
|
|
18228
18254
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18229
|
-
offsets:
|
|
18230
|
-
traceWidth:
|
|
18255
|
+
offsets: z121.array(route_hint_point6).or(z121.array(routeHintPointProps)).optional(),
|
|
18256
|
+
traceWidth: z121.number().optional()
|
|
18231
18257
|
});
|
|
18232
18258
|
|
|
18233
18259
|
// lib/components/port.ts
|
|
18234
|
-
import { z as
|
|
18260
|
+
import { z as z122 } from "zod";
|
|
18235
18261
|
var portProps = commonLayoutProps.extend({
|
|
18236
|
-
name:
|
|
18237
|
-
pinNumber:
|
|
18238
|
-
schStemLength:
|
|
18239
|
-
aliases:
|
|
18240
|
-
layer:
|
|
18241
|
-
layers:
|
|
18242
|
-
schX:
|
|
18243
|
-
schY:
|
|
18262
|
+
name: z122.string().optional(),
|
|
18263
|
+
pinNumber: z122.number().optional(),
|
|
18264
|
+
schStemLength: z122.number().optional(),
|
|
18265
|
+
aliases: z122.array(z122.string()).optional(),
|
|
18266
|
+
layer: z122.string().optional(),
|
|
18267
|
+
layers: z122.array(z122.string()).optional(),
|
|
18268
|
+
schX: z122.number().optional(),
|
|
18269
|
+
schY: z122.number().optional(),
|
|
18244
18270
|
direction: direction.optional(),
|
|
18245
|
-
connectsTo:
|
|
18271
|
+
connectsTo: z122.string().or(z122.array(z122.string())).optional(),
|
|
18246
18272
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18247
|
-
hasInversionCircle:
|
|
18273
|
+
hasInversionCircle: z122.boolean().optional()
|
|
18248
18274
|
});
|
|
18249
18275
|
|
|
18250
18276
|
// lib/components/pcb-note-text.ts
|
|
18251
18277
|
import { length as length11 } from "circuit-json";
|
|
18252
|
-
import { z as
|
|
18278
|
+
import { z as z123 } from "zod";
|
|
18253
18279
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18254
|
-
text:
|
|
18255
|
-
anchorAlignment:
|
|
18256
|
-
font:
|
|
18280
|
+
text: z123.string(),
|
|
18281
|
+
anchorAlignment: z123.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18282
|
+
font: z123.enum(["tscircuit2024"]).optional(),
|
|
18257
18283
|
fontSize: length11.optional(),
|
|
18258
|
-
color:
|
|
18284
|
+
color: z123.string().optional()
|
|
18259
18285
|
});
|
|
18260
18286
|
expectTypesMatch(true);
|
|
18261
18287
|
|
|
18262
18288
|
// lib/components/pcb-note-rect.ts
|
|
18263
18289
|
import { distance as distance43 } from "circuit-json";
|
|
18264
|
-
import { z as
|
|
18290
|
+
import { z as z124 } from "zod";
|
|
18265
18291
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18266
18292
|
width: distance43,
|
|
18267
18293
|
height: distance43,
|
|
18268
18294
|
strokeWidth: distance43.optional(),
|
|
18269
|
-
isFilled:
|
|
18270
|
-
hasStroke:
|
|
18271
|
-
isStrokeDashed:
|
|
18272
|
-
color:
|
|
18295
|
+
isFilled: z124.boolean().optional(),
|
|
18296
|
+
hasStroke: z124.boolean().optional(),
|
|
18297
|
+
isStrokeDashed: z124.boolean().optional(),
|
|
18298
|
+
color: z124.string().optional(),
|
|
18273
18299
|
cornerRadius: distance43.optional()
|
|
18274
18300
|
});
|
|
18275
18301
|
expectTypesMatch(true);
|
|
@@ -18279,7 +18305,7 @@ import {
|
|
|
18279
18305
|
length as length12,
|
|
18280
18306
|
route_hint_point as route_hint_point7
|
|
18281
18307
|
} from "circuit-json";
|
|
18282
|
-
import { z as
|
|
18308
|
+
import { z as z125 } from "zod";
|
|
18283
18309
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18284
18310
|
pcbLeftEdgeX: true,
|
|
18285
18311
|
pcbRightEdgeX: true,
|
|
@@ -18291,15 +18317,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18291
18317
|
pcbOffsetY: true,
|
|
18292
18318
|
pcbRotation: true
|
|
18293
18319
|
}).extend({
|
|
18294
|
-
route:
|
|
18320
|
+
route: z125.array(route_hint_point7),
|
|
18295
18321
|
strokeWidth: length12.optional(),
|
|
18296
|
-
color:
|
|
18322
|
+
color: z125.string().optional()
|
|
18297
18323
|
});
|
|
18298
18324
|
expectTypesMatch(true);
|
|
18299
18325
|
|
|
18300
18326
|
// lib/components/pcb-note-line.ts
|
|
18301
18327
|
import { distance as distance44 } from "circuit-json";
|
|
18302
|
-
import { z as
|
|
18328
|
+
import { z as z126 } from "zod";
|
|
18303
18329
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18304
18330
|
pcbLeftEdgeX: true,
|
|
18305
18331
|
pcbRightEdgeX: true,
|
|
@@ -18316,15 +18342,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18316
18342
|
x2: distance44,
|
|
18317
18343
|
y2: distance44,
|
|
18318
18344
|
strokeWidth: distance44.optional(),
|
|
18319
|
-
color:
|
|
18320
|
-
isDashed:
|
|
18345
|
+
color: z126.string().optional(),
|
|
18346
|
+
isDashed: z126.boolean().optional()
|
|
18321
18347
|
});
|
|
18322
18348
|
expectTypesMatch(true);
|
|
18323
18349
|
|
|
18324
18350
|
// lib/components/pcb-note-dimension.ts
|
|
18325
18351
|
import { distance as distance45, length as length13 } from "circuit-json";
|
|
18326
|
-
import { z as
|
|
18327
|
-
var dimensionTarget2 =
|
|
18352
|
+
import { z as z127 } from "zod";
|
|
18353
|
+
var dimensionTarget2 = z127.union([z127.string(), point]);
|
|
18328
18354
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18329
18355
|
pcbLeftEdgeX: true,
|
|
18330
18356
|
pcbRightEdgeX: true,
|
|
@@ -18338,101 +18364,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18338
18364
|
}).extend({
|
|
18339
18365
|
from: dimensionTarget2,
|
|
18340
18366
|
to: dimensionTarget2,
|
|
18341
|
-
text:
|
|
18367
|
+
text: z127.string().optional(),
|
|
18342
18368
|
offset: distance45.optional(),
|
|
18343
|
-
font:
|
|
18369
|
+
font: z127.enum(["tscircuit2024"]).optional(),
|
|
18344
18370
|
fontSize: length13.optional(),
|
|
18345
|
-
color:
|
|
18371
|
+
color: z127.string().optional(),
|
|
18346
18372
|
arrowSize: distance45.optional(),
|
|
18347
|
-
units:
|
|
18348
|
-
outerEdgeToEdge:
|
|
18349
|
-
centerToCenter:
|
|
18350
|
-
innerEdgeToEdge:
|
|
18373
|
+
units: z127.enum(["in", "mm"]).optional(),
|
|
18374
|
+
outerEdgeToEdge: z127.literal(true).optional(),
|
|
18375
|
+
centerToCenter: z127.literal(true).optional(),
|
|
18376
|
+
innerEdgeToEdge: z127.literal(true).optional()
|
|
18351
18377
|
});
|
|
18352
18378
|
expectTypesMatch(
|
|
18353
18379
|
true
|
|
18354
18380
|
);
|
|
18355
18381
|
|
|
18356
18382
|
// lib/platformConfig.ts
|
|
18357
|
-
import { z as
|
|
18358
|
-
var unvalidatedCircuitJson =
|
|
18359
|
-
var footprintLibraryResult =
|
|
18360
|
-
footprintCircuitJson:
|
|
18383
|
+
import { z as z128 } from "zod";
|
|
18384
|
+
var unvalidatedCircuitJson = z128.array(z128.any()).describe("Circuit JSON");
|
|
18385
|
+
var footprintLibraryResult = z128.object({
|
|
18386
|
+
footprintCircuitJson: z128.array(z128.any()),
|
|
18361
18387
|
cadModel: cadModelProp.optional()
|
|
18362
18388
|
});
|
|
18363
|
-
var pathToCircuitJsonFn =
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
).returns(
|
|
18389
|
+
var pathToCircuitJsonFn = z128.function().args(z128.string()).returns(z128.promise(footprintLibraryResult)).or(
|
|
18390
|
+
z128.function().args(
|
|
18391
|
+
z128.string(),
|
|
18392
|
+
z128.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18393
|
+
).returns(z128.promise(footprintLibraryResult))
|
|
18368
18394
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18369
|
-
var footprintFileParserEntry =
|
|
18370
|
-
loadFromUrl:
|
|
18395
|
+
var footprintFileParserEntry = z128.object({
|
|
18396
|
+
loadFromUrl: z128.function().args(z128.string()).returns(z128.promise(footprintLibraryResult)).describe(
|
|
18371
18397
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18372
18398
|
)
|
|
18373
18399
|
});
|
|
18374
|
-
var spiceEngineSimulationResult =
|
|
18375
|
-
engineVersionString:
|
|
18400
|
+
var spiceEngineSimulationResult = z128.object({
|
|
18401
|
+
engineVersionString: z128.string().optional(),
|
|
18376
18402
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18377
18403
|
});
|
|
18378
|
-
var spiceEngineZod =
|
|
18379
|
-
simulate:
|
|
18404
|
+
var spiceEngineZod = z128.object({
|
|
18405
|
+
simulate: z128.function().args(z128.string()).returns(z128.promise(spiceEngineSimulationResult)).describe(
|
|
18380
18406
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18381
18407
|
)
|
|
18382
18408
|
});
|
|
18383
|
-
var defaultSpiceEngine =
|
|
18409
|
+
var defaultSpiceEngine = z128.custom(
|
|
18384
18410
|
(value) => typeof value === "string"
|
|
18385
18411
|
);
|
|
18386
|
-
var autorouterInstance =
|
|
18387
|
-
run:
|
|
18388
|
-
getOutputSimpleRouteJson:
|
|
18412
|
+
var autorouterInstance = z128.object({
|
|
18413
|
+
run: z128.function().args().returns(z128.promise(z128.unknown())).describe("Run the autorouter"),
|
|
18414
|
+
getOutputSimpleRouteJson: z128.function().args().returns(z128.promise(z128.any())).describe("Get the resulting SimpleRouteJson")
|
|
18389
18415
|
});
|
|
18390
|
-
var autorouterDefinition =
|
|
18391
|
-
createAutorouter:
|
|
18416
|
+
var autorouterDefinition = z128.object({
|
|
18417
|
+
createAutorouter: z128.function().args(z128.any(), z128.any().optional()).returns(z128.union([autorouterInstance, z128.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18392
18418
|
});
|
|
18393
|
-
var platformFetch =
|
|
18394
|
-
var platformConfig =
|
|
18419
|
+
var platformFetch = z128.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18420
|
+
var platformConfig = z128.object({
|
|
18395
18421
|
partsEngine: partsEngine.optional(),
|
|
18396
18422
|
autorouter: autorouterProp.optional(),
|
|
18397
|
-
autorouterMap:
|
|
18423
|
+
autorouterMap: z128.record(z128.string(), autorouterDefinition).optional(),
|
|
18398
18424
|
registryApiUrl: url.optional(),
|
|
18399
18425
|
cloudAutorouterUrl: url.optional(),
|
|
18400
|
-
projectName:
|
|
18426
|
+
projectName: z128.string().optional(),
|
|
18401
18427
|
projectBaseUrl: url.optional(),
|
|
18402
|
-
version:
|
|
18428
|
+
version: z128.string().optional(),
|
|
18403
18429
|
url: url.optional(),
|
|
18404
|
-
printBoardInformationToSilkscreen:
|
|
18405
|
-
includeBoardFiles:
|
|
18430
|
+
printBoardInformationToSilkscreen: z128.boolean().optional(),
|
|
18431
|
+
includeBoardFiles: z128.array(z128.string()).describe(
|
|
18406
18432
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18407
18433
|
).optional(),
|
|
18408
|
-
snapshotsDir:
|
|
18434
|
+
snapshotsDir: z128.string().describe(
|
|
18409
18435
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18410
18436
|
).optional(),
|
|
18411
18437
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18412
|
-
unitPreference:
|
|
18413
|
-
localCacheEngine:
|
|
18414
|
-
pcbDisabled:
|
|
18415
|
-
routingDisabled:
|
|
18416
|
-
schematicDisabled:
|
|
18417
|
-
partsEngineDisabled:
|
|
18418
|
-
drcChecksDisabled:
|
|
18419
|
-
netlistDrcChecksDisabled:
|
|
18420
|
-
routingDrcChecksDisabled:
|
|
18421
|
-
placementDrcChecksDisabled:
|
|
18422
|
-
pinSpecificationDrcChecksDisabled:
|
|
18423
|
-
spiceEngineMap:
|
|
18424
|
-
footprintLibraryMap:
|
|
18425
|
-
|
|
18426
|
-
|
|
18438
|
+
unitPreference: z128.enum(["mm", "in", "mil"]).optional(),
|
|
18439
|
+
localCacheEngine: z128.any().optional(),
|
|
18440
|
+
pcbDisabled: z128.boolean().optional(),
|
|
18441
|
+
routingDisabled: z128.boolean().optional(),
|
|
18442
|
+
schematicDisabled: z128.boolean().optional(),
|
|
18443
|
+
partsEngineDisabled: z128.boolean().optional(),
|
|
18444
|
+
drcChecksDisabled: z128.boolean().optional(),
|
|
18445
|
+
netlistDrcChecksDisabled: z128.boolean().optional(),
|
|
18446
|
+
routingDrcChecksDisabled: z128.boolean().optional(),
|
|
18447
|
+
placementDrcChecksDisabled: z128.boolean().optional(),
|
|
18448
|
+
pinSpecificationDrcChecksDisabled: z128.boolean().optional(),
|
|
18449
|
+
spiceEngineMap: z128.record(z128.string(), spiceEngineZod).optional(),
|
|
18450
|
+
footprintLibraryMap: z128.record(
|
|
18451
|
+
z128.string(),
|
|
18452
|
+
z128.union([
|
|
18427
18453
|
pathToCircuitJsonFn,
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18454
|
+
z128.record(
|
|
18455
|
+
z128.string(),
|
|
18456
|
+
z128.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18431
18457
|
)
|
|
18432
18458
|
])
|
|
18433
18459
|
).optional(),
|
|
18434
|
-
footprintFileParserMap:
|
|
18435
|
-
resolveProjectStaticFileImportUrl:
|
|
18460
|
+
footprintFileParserMap: z128.record(z128.string(), footprintFileParserEntry).optional(),
|
|
18461
|
+
resolveProjectStaticFileImportUrl: z128.function().args(z128.string()).returns(z128.promise(z128.string())).describe(
|
|
18436
18462
|
"A function that returns a string URL for static files for the project"
|
|
18437
18463
|
).optional(),
|
|
18438
18464
|
platformFetch: platformFetch.optional()
|
|
@@ -18506,12 +18532,14 @@ export {
|
|
|
18506
18532
|
currentSourcePinLabels,
|
|
18507
18533
|
currentSourcePins,
|
|
18508
18534
|
currentSourceProps,
|
|
18535
|
+
customDrcCheckFn,
|
|
18509
18536
|
cutoutProps,
|
|
18510
18537
|
diodePins,
|
|
18511
18538
|
diodeProps,
|
|
18512
18539
|
direction,
|
|
18513
18540
|
directionAlongEdge,
|
|
18514
18541
|
distanceOrMultiplier,
|
|
18542
|
+
drcCheckProps,
|
|
18515
18543
|
edit_component_location_event,
|
|
18516
18544
|
edit_pcb_component_location_event,
|
|
18517
18545
|
edit_pcb_group_location_event,
|
|
@@ -18650,6 +18678,7 @@ export {
|
|
|
18650
18678
|
smtPadProps,
|
|
18651
18679
|
solderPasteProps,
|
|
18652
18680
|
solderjumperProps,
|
|
18681
|
+
spicemodelProps,
|
|
18653
18682
|
stampboardProps,
|
|
18654
18683
|
subcircuitGroupProps,
|
|
18655
18684
|
subcircuitGroupPropsWithBool,
|