@tscircuit/props 0.0.616 → 0.0.618
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 +2 -1
- package/dist/index.d.ts +35 -29
- package/dist/index.js +156 -137
- package/dist/index.js.map +1 -1
- package/lib/components/capacitor.ts +4 -3
- package/lib/components/group.ts +44 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16408,6 +16408,25 @@ var autorouterProp = z41.union([
|
|
|
16408
16408
|
autorouterString
|
|
16409
16409
|
]);
|
|
16410
16410
|
var autorouterEffortLevel = z41.enum(["1x", "2x", "5x", "10x", "100x"]);
|
|
16411
|
+
var knownAutorouterVersion = z41.enum([
|
|
16412
|
+
"beta_pipeline1",
|
|
16413
|
+
"beta_pipeline3",
|
|
16414
|
+
"beta_pipeline4",
|
|
16415
|
+
"beta_pipeline5",
|
|
16416
|
+
"beta_pipeline7",
|
|
16417
|
+
"beta_pipeline9",
|
|
16418
|
+
"latest"
|
|
16419
|
+
]);
|
|
16420
|
+
var autorouterVersion = z41.custom(
|
|
16421
|
+
(value) => typeof value === "string"
|
|
16422
|
+
).transform((value) => {
|
|
16423
|
+
const parsedAutorouterVersion = knownAutorouterVersion.safeParse(value);
|
|
16424
|
+
if (parsedAutorouterVersion.success) return parsedAutorouterVersion.data;
|
|
16425
|
+
console.warn(
|
|
16426
|
+
`Unknown autorouterVersion "${value}", falling back to "latest".`
|
|
16427
|
+
);
|
|
16428
|
+
return "latest";
|
|
16429
|
+
});
|
|
16411
16430
|
var baseGroupProps = commonLayoutProps.extend({
|
|
16412
16431
|
name: z41.string().optional(),
|
|
16413
16432
|
children: z41.any().optional(),
|
|
@@ -16515,7 +16534,7 @@ var subcircuitGroupProps = baseGroupProps.extend({
|
|
|
16515
16534
|
pcbRouteCache: z41.custom((v) => true).optional(),
|
|
16516
16535
|
autorouter: autorouterProp.optional(),
|
|
16517
16536
|
autorouterEffortLevel: autorouterEffortLevel.optional(),
|
|
16518
|
-
autorouterVersion:
|
|
16537
|
+
autorouterVersion: autorouterVersion.optional(),
|
|
16519
16538
|
square: z41.boolean().optional(),
|
|
16520
16539
|
emptyArea: z41.string().optional(),
|
|
16521
16540
|
filledArea: z41.string().optional(),
|
|
@@ -17030,7 +17049,7 @@ var stampboardProps = boardProps.extend({
|
|
|
17030
17049
|
expectTypesMatch(true);
|
|
17031
17050
|
|
|
17032
17051
|
// lib/components/capacitor.ts
|
|
17033
|
-
import { capacitance as capacitance3, voltage } from "circuit-json";
|
|
17052
|
+
import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
|
|
17034
17053
|
import { z as z60 } from "zod";
|
|
17035
17054
|
var capacitorPinLabels = [
|
|
17036
17055
|
"pin1",
|
|
@@ -17049,7 +17068,7 @@ var capacitorProps = commonComponentProps.extend({
|
|
|
17049
17068
|
decouplingTo: z60.string().optional(),
|
|
17050
17069
|
bypassFor: z60.string().optional(),
|
|
17051
17070
|
bypassTo: z60.string().optional(),
|
|
17052
|
-
maxDecouplingTraceLength:
|
|
17071
|
+
maxDecouplingTraceLength: distance17.optional(),
|
|
17053
17072
|
schOrientation: schematicOrientation.optional(),
|
|
17054
17073
|
schSize: schematicSymbolSize.optional(),
|
|
17055
17074
|
connections: createConnectionsProp(capacitorPinLabels).optional()
|
|
@@ -17058,7 +17077,7 @@ var capacitorPins = lrPolarPins;
|
|
|
17058
17077
|
expectTypesMatch(true);
|
|
17059
17078
|
|
|
17060
17079
|
// lib/components/net.ts
|
|
17061
|
-
import { distance as
|
|
17080
|
+
import { distance as distance18 } from "circuit-json";
|
|
17062
17081
|
import { z as z61 } from "zod";
|
|
17063
17082
|
var netProps = z61.object({
|
|
17064
17083
|
name: z61.string(),
|
|
@@ -17067,7 +17086,7 @@ var netProps = z61.object({
|
|
|
17067
17086
|
highlightColor: z61.string().optional(),
|
|
17068
17087
|
isPowerNet: z61.boolean().optional(),
|
|
17069
17088
|
isGroundNet: z61.boolean().optional(),
|
|
17070
|
-
nominalTraceWidth:
|
|
17089
|
+
nominalTraceWidth: distance18.optional()
|
|
17071
17090
|
});
|
|
17072
17091
|
expectTypesMatch(true);
|
|
17073
17092
|
|
|
@@ -17337,7 +17356,7 @@ var holeProps = z69.union([
|
|
|
17337
17356
|
expectTypesMatch(true);
|
|
17338
17357
|
|
|
17339
17358
|
// lib/components/trace.ts
|
|
17340
|
-
import { distance as
|
|
17359
|
+
import { distance as distance19, layer_ref as layer_ref5, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17341
17360
|
import { z as z70 } from "zod";
|
|
17342
17361
|
var portRef = z70.union([
|
|
17343
17362
|
z70.string(),
|
|
@@ -17371,8 +17390,8 @@ var baseTraceProps = z70.object({
|
|
|
17371
17390
|
key: z70.string().optional(),
|
|
17372
17391
|
name: z70.string().optional(),
|
|
17373
17392
|
displayName: z70.string().optional(),
|
|
17374
|
-
thickness:
|
|
17375
|
-
width:
|
|
17393
|
+
thickness: distance19.optional(),
|
|
17394
|
+
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17376
17395
|
schematicRouteHints: z70.array(point).optional(),
|
|
17377
17396
|
pcbRouteHints: z70.array(route_hint_point2).optional(),
|
|
17378
17397
|
pcbPathRelativeTo: z70.string().optional(),
|
|
@@ -17383,7 +17402,7 @@ var baseTraceProps = z70.object({
|
|
|
17383
17402
|
schDisplayLabel: z70.string().optional(),
|
|
17384
17403
|
schStroke: z70.string().optional(),
|
|
17385
17404
|
highlightColor: z70.string().optional(),
|
|
17386
|
-
maxLength:
|
|
17405
|
+
maxLength: distance19.optional(),
|
|
17387
17406
|
maxViaCount: z70.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
|
|
17388
17407
|
connectsTo: z70.string().or(z70.array(z70.string())).optional()
|
|
17389
17408
|
});
|
|
@@ -17403,7 +17422,7 @@ var traceProps = z70.union([
|
|
|
17403
17422
|
|
|
17404
17423
|
// lib/components/bus.ts
|
|
17405
17424
|
import {
|
|
17406
|
-
distance as
|
|
17425
|
+
distance as distance20,
|
|
17407
17426
|
layer_ref as layer_ref6,
|
|
17408
17427
|
resistance as resistance3
|
|
17409
17428
|
} from "circuit-json";
|
|
@@ -17412,24 +17431,24 @@ var busProps = z71.object({
|
|
|
17412
17431
|
name: z71.string().optional(),
|
|
17413
17432
|
connections: z71.array(z71.string()).min(2),
|
|
17414
17433
|
routingPhaseIndex: z71.number().nullable().optional(),
|
|
17415
|
-
maxLengthSkew:
|
|
17434
|
+
maxLengthSkew: distance20.pipe(z71.number().min(0).finite()).optional(),
|
|
17416
17435
|
targetImpedance: resistance3.pipe(z71.number().positive().finite()).optional(),
|
|
17417
|
-
pcbTraceWidth:
|
|
17436
|
+
pcbTraceWidth: distance20.pipe(z71.number().positive().finite()).optional(),
|
|
17418
17437
|
pcbAllowedLayers: z71.array(layer_ref6).min(1).optional()
|
|
17419
17438
|
});
|
|
17420
17439
|
expectTypesMatch(true);
|
|
17421
17440
|
|
|
17422
17441
|
// lib/components/differentialpair.ts
|
|
17423
|
-
import { distance as
|
|
17442
|
+
import { distance as distance21, resistance as resistance4 } from "circuit-json";
|
|
17424
17443
|
import { z as z72 } from "zod";
|
|
17425
17444
|
var differentialPairProps = z72.object({
|
|
17426
17445
|
name: z72.string().optional(),
|
|
17427
17446
|
positiveConnection: z72.string(),
|
|
17428
17447
|
negativeConnection: z72.string(),
|
|
17429
|
-
maxLengthSkew:
|
|
17448
|
+
maxLengthSkew: distance21.pipe(z72.number().min(0).finite()).optional(),
|
|
17430
17449
|
targetDifferentialImpedance: resistance4.pipe(z72.number().positive().finite()).optional(),
|
|
17431
|
-
pcbTraceGap:
|
|
17432
|
-
maxUncoupledLength:
|
|
17450
|
+
pcbTraceGap: distance21.pipe(z72.number().positive().finite()).optional(),
|
|
17451
|
+
maxUncoupledLength: distance21.pipe(z72.number().min(0).finite()).optional()
|
|
17433
17452
|
});
|
|
17434
17453
|
expectTypesMatch(true);
|
|
17435
17454
|
|
|
@@ -17520,7 +17539,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17520
17539
|
expectTypesMatch(true);
|
|
17521
17540
|
|
|
17522
17541
|
// lib/components/pin-header.ts
|
|
17523
|
-
import { distance as
|
|
17542
|
+
import { distance as distance22 } from "circuit-json";
|
|
17524
17543
|
|
|
17525
17544
|
// lib/common/pcbOrientation.ts
|
|
17526
17545
|
import { z as z77 } from "zod";
|
|
@@ -17533,7 +17552,7 @@ expectTypesMatch(true);
|
|
|
17533
17552
|
import { z as z78 } from "zod";
|
|
17534
17553
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17535
17554
|
pinCount: z78.number(),
|
|
17536
|
-
pitch:
|
|
17555
|
+
pitch: distance22.optional(),
|
|
17537
17556
|
schFacingDirection: z78.enum(["up", "down", "left", "right"]).optional(),
|
|
17538
17557
|
gender: z78.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17539
17558
|
showSilkscreenPinLabels: z78.boolean().optional(),
|
|
@@ -17541,16 +17560,16 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17541
17560
|
doubleRow: z78.boolean().optional(),
|
|
17542
17561
|
rightAngle: z78.boolean().optional(),
|
|
17543
17562
|
pcbOrientation: pcbOrientation.optional(),
|
|
17544
|
-
holeDiameter:
|
|
17545
|
-
platedDiameter:
|
|
17563
|
+
holeDiameter: distance22.optional(),
|
|
17564
|
+
platedDiameter: distance22.optional(),
|
|
17546
17565
|
pinLabels: z78.record(z78.string(), schematicPinLabel).or(z78.array(schematicPinLabel)).optional(),
|
|
17547
17566
|
connections: z78.custom().pipe(z78.record(z78.string(), connectionTarget)).optional(),
|
|
17548
17567
|
facingDirection: z78.enum(["left", "right"]).optional(),
|
|
17549
17568
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17550
17569
|
schPinStyle: schematicPinStyle.optional(),
|
|
17551
|
-
schPinSpacing:
|
|
17552
|
-
schWidth:
|
|
17553
|
-
schHeight:
|
|
17570
|
+
schPinSpacing: distance22.optional(),
|
|
17571
|
+
schWidth: distance22.optional(),
|
|
17572
|
+
schHeight: distance22.optional()
|
|
17554
17573
|
});
|
|
17555
17574
|
expectTypesMatch(true);
|
|
17556
17575
|
|
|
@@ -18130,17 +18149,17 @@ var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
|
18130
18149
|
expectTypesMatch(true);
|
|
18131
18150
|
|
|
18132
18151
|
// lib/components/fabrication-note-rect.ts
|
|
18133
|
-
import { distance as
|
|
18152
|
+
import { distance as distance23 } from "circuit-json";
|
|
18134
18153
|
import { z as z99 } from "zod";
|
|
18135
18154
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18136
|
-
width:
|
|
18137
|
-
height:
|
|
18138
|
-
strokeWidth:
|
|
18155
|
+
width: distance23,
|
|
18156
|
+
height: distance23,
|
|
18157
|
+
strokeWidth: distance23.optional(),
|
|
18139
18158
|
isFilled: z99.boolean().optional(),
|
|
18140
18159
|
hasStroke: z99.boolean().optional(),
|
|
18141
18160
|
isStrokeDashed: z99.boolean().optional(),
|
|
18142
18161
|
color: z99.string().optional(),
|
|
18143
|
-
cornerRadius:
|
|
18162
|
+
cornerRadius: distance23.optional()
|
|
18144
18163
|
});
|
|
18145
18164
|
|
|
18146
18165
|
// lib/components/fabrication-note-path.ts
|
|
@@ -18163,7 +18182,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18163
18182
|
});
|
|
18164
18183
|
|
|
18165
18184
|
// lib/components/fabrication-note-dimension.ts
|
|
18166
|
-
import { distance as
|
|
18185
|
+
import { distance as distance24, length as length6 } from "circuit-json";
|
|
18167
18186
|
import { z as z101 } from "zod";
|
|
18168
18187
|
var dimensionTarget = z101.union([z101.string(), point]);
|
|
18169
18188
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
@@ -18180,11 +18199,11 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18180
18199
|
from: dimensionTarget,
|
|
18181
18200
|
to: dimensionTarget,
|
|
18182
18201
|
text: z101.string().optional(),
|
|
18183
|
-
offset:
|
|
18202
|
+
offset: distance24.optional(),
|
|
18184
18203
|
font: z101.enum(["tscircuit2024"]).optional(),
|
|
18185
18204
|
fontSize: length6.optional(),
|
|
18186
18205
|
color: z101.string().optional(),
|
|
18187
|
-
arrowSize:
|
|
18206
|
+
arrowSize: distance24.optional(),
|
|
18188
18207
|
units: z101.enum(["in", "mm"]).optional(),
|
|
18189
18208
|
outerEdgeToEdge: z101.literal(true).optional(),
|
|
18190
18209
|
centerToCenter: z101.literal(true).optional(),
|
|
@@ -18193,23 +18212,23 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18193
18212
|
expectTypesMatch(true);
|
|
18194
18213
|
|
|
18195
18214
|
// lib/components/pcb-trace.ts
|
|
18196
|
-
import { distance as
|
|
18215
|
+
import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18197
18216
|
import { z as z102 } from "zod";
|
|
18198
18217
|
var pcbTraceProps = z102.object({
|
|
18199
18218
|
layer: z102.string().optional(),
|
|
18200
|
-
thickness:
|
|
18219
|
+
thickness: distance25.optional(),
|
|
18201
18220
|
route: z102.array(route_hint_point4)
|
|
18202
18221
|
});
|
|
18203
18222
|
|
|
18204
18223
|
// lib/components/via.ts
|
|
18205
|
-
import { distance as
|
|
18224
|
+
import { distance as distance26, layer_ref as layer_ref8 } from "circuit-json";
|
|
18206
18225
|
import { z as z103 } from "zod";
|
|
18207
18226
|
var viaProps = commonLayoutProps.extend({
|
|
18208
18227
|
name: z103.string().optional(),
|
|
18209
18228
|
fromLayer: layer_ref8.optional(),
|
|
18210
18229
|
toLayer: layer_ref8.optional(),
|
|
18211
|
-
holeDiameter:
|
|
18212
|
-
outerDiameter:
|
|
18230
|
+
holeDiameter: distance26.optional(),
|
|
18231
|
+
outerDiameter: distance26.optional(),
|
|
18213
18232
|
layers: z103.array(layer_ref8).optional(),
|
|
18214
18233
|
connectsTo: z103.string().or(z103.array(z103.string())).optional(),
|
|
18215
18234
|
netIsAssignable: z103.boolean().optional()
|
|
@@ -18217,7 +18236,7 @@ var viaProps = commonLayoutProps.extend({
|
|
|
18217
18236
|
expectTypesMatch(true);
|
|
18218
18237
|
|
|
18219
18238
|
// lib/components/testpoint.ts
|
|
18220
|
-
import { distance as
|
|
18239
|
+
import { distance as distance27 } from "circuit-json";
|
|
18221
18240
|
import { z as z104 } from "zod";
|
|
18222
18241
|
var testpointPins = ["pin1"];
|
|
18223
18242
|
var testpointConnectionsProp = z104.object({
|
|
@@ -18227,10 +18246,10 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18227
18246
|
connections: testpointConnectionsProp.optional(),
|
|
18228
18247
|
footprintVariant: z104.enum(["pad", "through_hole"]).optional(),
|
|
18229
18248
|
padShape: z104.enum(["rect", "circle"]).optional().default("circle"),
|
|
18230
|
-
padDiameter:
|
|
18231
|
-
holeDiameter:
|
|
18232
|
-
width:
|
|
18233
|
-
height:
|
|
18249
|
+
padDiameter: distance27.optional(),
|
|
18250
|
+
holeDiameter: distance27.optional(),
|
|
18251
|
+
width: distance27.optional(),
|
|
18252
|
+
height: distance27.optional()
|
|
18234
18253
|
}).refine(
|
|
18235
18254
|
(props) => props.footprintVariant !== "through_hole" || props.holeDiameter !== void 0,
|
|
18236
18255
|
{ message: "holeDiameter is required for through_hole testpoints" }
|
|
@@ -18245,12 +18264,12 @@ var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true })
|
|
|
18245
18264
|
expectTypesMatch(true);
|
|
18246
18265
|
|
|
18247
18266
|
// lib/components/pcb-keepout.ts
|
|
18248
|
-
import { distance as
|
|
18267
|
+
import { distance as distance28, layer_ref as layer_ref9 } from "circuit-json";
|
|
18249
18268
|
import { z as z106 } from "zod";
|
|
18250
18269
|
var pcbKeepoutProps = z106.union([
|
|
18251
18270
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18252
18271
|
shape: z106.literal("circle"),
|
|
18253
|
-
radius:
|
|
18272
|
+
radius: distance28,
|
|
18254
18273
|
layers: z106.array(layer_ref9).optional(),
|
|
18255
18274
|
excludeRefs: z106.array(z106.string()).optional().describe(
|
|
18256
18275
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
@@ -18258,8 +18277,8 @@ var pcbKeepoutProps = z106.union([
|
|
|
18258
18277
|
}),
|
|
18259
18278
|
pcbLayoutProps.extend({
|
|
18260
18279
|
shape: z106.literal("rect"),
|
|
18261
|
-
width:
|
|
18262
|
-
height:
|
|
18280
|
+
width: distance28,
|
|
18281
|
+
height: distance28,
|
|
18263
18282
|
layers: z106.array(layer_ref9).optional(),
|
|
18264
18283
|
excludeRefs: z106.array(z106.string()).optional().describe(
|
|
18265
18284
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
@@ -18268,12 +18287,12 @@ var pcbKeepoutProps = z106.union([
|
|
|
18268
18287
|
]);
|
|
18269
18288
|
|
|
18270
18289
|
// lib/components/courtyard-rect.ts
|
|
18271
|
-
import { distance as
|
|
18290
|
+
import { distance as distance29 } from "circuit-json";
|
|
18272
18291
|
import { z as z107 } from "zod";
|
|
18273
18292
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18274
|
-
width:
|
|
18275
|
-
height:
|
|
18276
|
-
strokeWidth:
|
|
18293
|
+
width: distance29,
|
|
18294
|
+
height: distance29,
|
|
18295
|
+
strokeWidth: distance29.optional(),
|
|
18277
18296
|
isFilled: z107.boolean().optional(),
|
|
18278
18297
|
hasStroke: z107.boolean().optional(),
|
|
18279
18298
|
isStrokeDashed: z107.boolean().optional(),
|
|
@@ -18302,19 +18321,19 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18302
18321
|
});
|
|
18303
18322
|
|
|
18304
18323
|
// lib/components/courtyard-circle.ts
|
|
18305
|
-
import { distance as
|
|
18324
|
+
import { distance as distance30 } from "circuit-json";
|
|
18306
18325
|
import "zod";
|
|
18307
18326
|
var courtyardCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18308
|
-
radius:
|
|
18327
|
+
radius: distance30
|
|
18309
18328
|
});
|
|
18310
18329
|
|
|
18311
18330
|
// lib/components/courtyard-pill.ts
|
|
18312
|
-
import { distance as
|
|
18331
|
+
import { distance as distance31 } from "circuit-json";
|
|
18313
18332
|
import "zod";
|
|
18314
18333
|
var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18315
|
-
width:
|
|
18316
|
-
height:
|
|
18317
|
-
radius:
|
|
18334
|
+
width: distance31,
|
|
18335
|
+
height: distance31,
|
|
18336
|
+
radius: distance31
|
|
18318
18337
|
});
|
|
18319
18338
|
|
|
18320
18339
|
// lib/components/copper-pour.ts
|
|
@@ -18469,15 +18488,15 @@ var ammeterPins = ammeterPinLabels;
|
|
|
18469
18488
|
expectTypesMatch(true);
|
|
18470
18489
|
|
|
18471
18490
|
// lib/components/schematic-arc.ts
|
|
18472
|
-
import { distance as
|
|
18491
|
+
import { distance as distance32, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18473
18492
|
import { z as z118 } from "zod";
|
|
18474
18493
|
var schematicArcProps = z118.object({
|
|
18475
18494
|
center: point5,
|
|
18476
|
-
radius:
|
|
18495
|
+
radius: distance32,
|
|
18477
18496
|
startAngleDegrees: rotation7,
|
|
18478
18497
|
endAngleDegrees: rotation7,
|
|
18479
18498
|
direction: z118.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18480
|
-
strokeWidth:
|
|
18499
|
+
strokeWidth: distance32.optional(),
|
|
18481
18500
|
color: z118.string().optional(),
|
|
18482
18501
|
isDashed: z118.boolean().optional().default(false)
|
|
18483
18502
|
});
|
|
@@ -18491,29 +18510,29 @@ var toolingrailProps = z119.object({
|
|
|
18491
18510
|
expectTypesMatch(true);
|
|
18492
18511
|
|
|
18493
18512
|
// lib/components/schematic-box.ts
|
|
18494
|
-
import { distance as
|
|
18513
|
+
import { distance as distance33 } from "circuit-json";
|
|
18495
18514
|
import { z as z120 } from "zod";
|
|
18496
18515
|
var schematicBoxProps = z120.object({
|
|
18497
18516
|
name: z120.string().optional(),
|
|
18498
18517
|
chipRef: z120.string().optional(),
|
|
18499
18518
|
pinLabels: pinLabelsProp.optional(),
|
|
18500
18519
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18501
|
-
schX:
|
|
18502
|
-
schY:
|
|
18520
|
+
schX: distance33.optional(),
|
|
18521
|
+
schY: distance33.optional(),
|
|
18503
18522
|
schSectionName: z120.string().optional(),
|
|
18504
18523
|
schSheetName: z120.string().optional(),
|
|
18505
|
-
width:
|
|
18506
|
-
height:
|
|
18524
|
+
width: distance33.optional(),
|
|
18525
|
+
height: distance33.optional(),
|
|
18507
18526
|
overlay: z120.array(z120.string()).optional(),
|
|
18508
|
-
padding:
|
|
18509
|
-
paddingLeft:
|
|
18510
|
-
paddingRight:
|
|
18511
|
-
paddingTop:
|
|
18512
|
-
paddingBottom:
|
|
18527
|
+
padding: distance33.optional(),
|
|
18528
|
+
paddingLeft: distance33.optional(),
|
|
18529
|
+
paddingRight: distance33.optional(),
|
|
18530
|
+
paddingTop: distance33.optional(),
|
|
18531
|
+
paddingBottom: distance33.optional(),
|
|
18513
18532
|
title: z120.string().optional(),
|
|
18514
18533
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18515
18534
|
titleColor: z120.string().optional(),
|
|
18516
|
-
titleFontSize:
|
|
18535
|
+
titleFontSize: distance33.optional(),
|
|
18517
18536
|
titleInside: z120.boolean().default(false),
|
|
18518
18537
|
strokeStyle: z120.enum(["solid", "dashed"]).default("solid")
|
|
18519
18538
|
}).refine(
|
|
@@ -18552,12 +18571,12 @@ expectTypesMatch(
|
|
|
18552
18571
|
);
|
|
18553
18572
|
|
|
18554
18573
|
// lib/components/schematic-circle.ts
|
|
18555
|
-
import { distance as
|
|
18574
|
+
import { distance as distance34, point as point6 } from "circuit-json";
|
|
18556
18575
|
import { z as z122 } from "zod";
|
|
18557
18576
|
var schematicCircleProps = z122.object({
|
|
18558
18577
|
center: point6,
|
|
18559
|
-
radius:
|
|
18560
|
-
strokeWidth:
|
|
18578
|
+
radius: distance34,
|
|
18579
|
+
strokeWidth: distance34.optional(),
|
|
18561
18580
|
color: z122.string().optional(),
|
|
18562
18581
|
isFilled: z122.boolean().optional().default(false),
|
|
18563
18582
|
fillColor: z122.string().optional(),
|
|
@@ -18568,15 +18587,15 @@ expectTypesMatch(
|
|
|
18568
18587
|
);
|
|
18569
18588
|
|
|
18570
18589
|
// lib/components/schematic-rect.ts
|
|
18571
|
-
import { distance as
|
|
18590
|
+
import { distance as distance35, rotation as rotation9 } from "circuit-json";
|
|
18572
18591
|
import { z as z123 } from "zod";
|
|
18573
18592
|
var schematicRectProps = z123.object({
|
|
18574
|
-
schX:
|
|
18575
|
-
schY:
|
|
18576
|
-
width:
|
|
18577
|
-
height:
|
|
18593
|
+
schX: distance35.optional(),
|
|
18594
|
+
schY: distance35.optional(),
|
|
18595
|
+
width: distance35,
|
|
18596
|
+
height: distance35,
|
|
18578
18597
|
rotation: rotation9.default(0),
|
|
18579
|
-
strokeWidth:
|
|
18598
|
+
strokeWidth: distance35.optional(),
|
|
18580
18599
|
color: z123.string().optional(),
|
|
18581
18600
|
isFilled: z123.boolean().optional().default(false),
|
|
18582
18601
|
fillColor: z123.string().optional(),
|
|
@@ -18585,23 +18604,23 @@ var schematicRectProps = z123.object({
|
|
|
18585
18604
|
expectTypesMatch(true);
|
|
18586
18605
|
|
|
18587
18606
|
// lib/components/schematic-line.ts
|
|
18588
|
-
import { distance as
|
|
18607
|
+
import { distance as distance36 } from "circuit-json";
|
|
18589
18608
|
import { z as z124 } from "zod";
|
|
18590
18609
|
var schematicLineProps = z124.object({
|
|
18591
|
-
x1:
|
|
18592
|
-
y1:
|
|
18593
|
-
x2:
|
|
18594
|
-
y2:
|
|
18595
|
-
strokeWidth:
|
|
18610
|
+
x1: distance36,
|
|
18611
|
+
y1: distance36,
|
|
18612
|
+
x2: distance36,
|
|
18613
|
+
y2: distance36,
|
|
18614
|
+
strokeWidth: distance36.optional(),
|
|
18596
18615
|
color: z124.string().optional(),
|
|
18597
18616
|
isDashed: z124.boolean().optional().default(false),
|
|
18598
|
-
dashLength:
|
|
18599
|
-
dashGap:
|
|
18617
|
+
dashLength: distance36.optional(),
|
|
18618
|
+
dashGap: distance36.optional()
|
|
18600
18619
|
});
|
|
18601
18620
|
expectTypesMatch(true);
|
|
18602
18621
|
|
|
18603
18622
|
// lib/components/schematic-text.ts
|
|
18604
|
-
import { distance as
|
|
18623
|
+
import { distance as distance37, rotation as rotation10 } from "circuit-json";
|
|
18605
18624
|
import { z as z126 } from "zod";
|
|
18606
18625
|
|
|
18607
18626
|
// lib/common/fivePointAnchor.ts
|
|
@@ -18616,8 +18635,8 @@ var fivePointAnchor = z125.enum([
|
|
|
18616
18635
|
|
|
18617
18636
|
// lib/components/schematic-text.ts
|
|
18618
18637
|
var schematicTextProps = z126.object({
|
|
18619
|
-
schX:
|
|
18620
|
-
schY:
|
|
18638
|
+
schX: distance37.optional(),
|
|
18639
|
+
schY: distance37.optional(),
|
|
18621
18640
|
text: z126.string(),
|
|
18622
18641
|
fontSize: z126.number().default(1),
|
|
18623
18642
|
anchor: z126.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
@@ -18627,65 +18646,65 @@ var schematicTextProps = z126.object({
|
|
|
18627
18646
|
expectTypesMatch(true);
|
|
18628
18647
|
|
|
18629
18648
|
// lib/components/schematic-path.ts
|
|
18630
|
-
import { distance as
|
|
18649
|
+
import { distance as distance38, point as point7 } from "circuit-json";
|
|
18631
18650
|
import { z as z127 } from "zod";
|
|
18632
18651
|
var schematicPathProps = z127.object({
|
|
18633
18652
|
points: z127.array(point7).optional(),
|
|
18634
18653
|
svgPath: z127.string().optional(),
|
|
18635
|
-
strokeWidth:
|
|
18654
|
+
strokeWidth: distance38.optional(),
|
|
18636
18655
|
strokeColor: z127.string().optional(),
|
|
18637
|
-
dashLength:
|
|
18638
|
-
dashGap:
|
|
18656
|
+
dashLength: distance38.optional(),
|
|
18657
|
+
dashGap: distance38.optional(),
|
|
18639
18658
|
isFilled: z127.boolean().optional().default(false),
|
|
18640
18659
|
fillColor: z127.string().optional()
|
|
18641
18660
|
});
|
|
18642
18661
|
expectTypesMatch(true);
|
|
18643
18662
|
|
|
18644
18663
|
// lib/components/schematic-table.ts
|
|
18645
|
-
import { distance as
|
|
18664
|
+
import { distance as distance39 } from "circuit-json";
|
|
18646
18665
|
import { z as z128 } from "zod";
|
|
18647
18666
|
var schematicTableProps = z128.object({
|
|
18648
|
-
schX:
|
|
18649
|
-
schY:
|
|
18667
|
+
schX: distance39.optional(),
|
|
18668
|
+
schY: distance39.optional(),
|
|
18650
18669
|
children: z128.any().optional(),
|
|
18651
|
-
cellPadding:
|
|
18652
|
-
borderWidth:
|
|
18670
|
+
cellPadding: distance39.optional(),
|
|
18671
|
+
borderWidth: distance39.optional(),
|
|
18653
18672
|
anchor: ninePointAnchor.optional(),
|
|
18654
|
-
fontSize:
|
|
18673
|
+
fontSize: distance39.optional()
|
|
18655
18674
|
});
|
|
18656
18675
|
expectTypesMatch(true);
|
|
18657
18676
|
|
|
18658
18677
|
// lib/components/schematic-row.ts
|
|
18659
|
-
import { distance as
|
|
18678
|
+
import { distance as distance40 } from "circuit-json";
|
|
18660
18679
|
import { z as z129 } from "zod";
|
|
18661
18680
|
var schematicRowProps = z129.object({
|
|
18662
18681
|
children: z129.any().optional(),
|
|
18663
|
-
height:
|
|
18682
|
+
height: distance40.optional()
|
|
18664
18683
|
});
|
|
18665
18684
|
expectTypesMatch(true);
|
|
18666
18685
|
|
|
18667
18686
|
// lib/components/schematic-cell.ts
|
|
18668
|
-
import { distance as
|
|
18687
|
+
import { distance as distance41 } from "circuit-json";
|
|
18669
18688
|
import { z as z130 } from "zod";
|
|
18670
18689
|
var schematicCellProps = z130.object({
|
|
18671
18690
|
children: z130.string().optional(),
|
|
18672
18691
|
horizontalAlign: z130.enum(["left", "center", "right"]).optional(),
|
|
18673
18692
|
verticalAlign: z130.enum(["top", "middle", "bottom"]).optional(),
|
|
18674
|
-
fontSize:
|
|
18693
|
+
fontSize: distance41.optional(),
|
|
18675
18694
|
rowSpan: z130.number().optional(),
|
|
18676
18695
|
colSpan: z130.number().optional(),
|
|
18677
|
-
width:
|
|
18696
|
+
width: distance41.optional(),
|
|
18678
18697
|
text: z130.string().optional()
|
|
18679
18698
|
});
|
|
18680
18699
|
expectTypesMatch(true);
|
|
18681
18700
|
|
|
18682
18701
|
// lib/components/schematic-section.ts
|
|
18683
|
-
import { distance as
|
|
18702
|
+
import { distance as distance42 } from "circuit-json";
|
|
18684
18703
|
import { z as z131 } from "zod";
|
|
18685
18704
|
var schematicSectionProps = z131.object({
|
|
18686
18705
|
displayName: z131.string().optional(),
|
|
18687
18706
|
name: z131.string(),
|
|
18688
|
-
sectionTitleFontSize:
|
|
18707
|
+
sectionTitleFontSize: distance42.optional()
|
|
18689
18708
|
});
|
|
18690
18709
|
expectTypesMatch(
|
|
18691
18710
|
true
|
|
@@ -18753,7 +18772,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18753
18772
|
});
|
|
18754
18773
|
|
|
18755
18774
|
// lib/components/silkscreen-line.ts
|
|
18756
|
-
import { distance as
|
|
18775
|
+
import { distance as distance43 } from "circuit-json";
|
|
18757
18776
|
var silkscreenLineProps = pcbLayoutProps.omit({
|
|
18758
18777
|
pcbX: true,
|
|
18759
18778
|
pcbY: true,
|
|
@@ -18761,33 +18780,33 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18761
18780
|
pcbOffsetY: true,
|
|
18762
18781
|
pcbRotation: true
|
|
18763
18782
|
}).extend({
|
|
18764
|
-
strokeWidth:
|
|
18765
|
-
x1:
|
|
18766
|
-
y1:
|
|
18767
|
-
x2:
|
|
18768
|
-
y2:
|
|
18783
|
+
strokeWidth: distance43,
|
|
18784
|
+
x1: distance43,
|
|
18785
|
+
y1: distance43,
|
|
18786
|
+
x2: distance43,
|
|
18787
|
+
y2: distance43
|
|
18769
18788
|
});
|
|
18770
18789
|
|
|
18771
18790
|
// lib/components/silkscreen-rect.ts
|
|
18772
|
-
import { distance as
|
|
18791
|
+
import { distance as distance44 } from "circuit-json";
|
|
18773
18792
|
import { z as z136 } from "zod";
|
|
18774
18793
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18775
18794
|
filled: z136.boolean().default(true).optional(),
|
|
18776
18795
|
stroke: z136.enum(["dashed", "solid", "none"]).optional(),
|
|
18777
|
-
strokeWidth:
|
|
18778
|
-
width:
|
|
18779
|
-
height:
|
|
18780
|
-
cornerRadius:
|
|
18796
|
+
strokeWidth: distance44.optional(),
|
|
18797
|
+
width: distance44,
|
|
18798
|
+
height: distance44,
|
|
18799
|
+
cornerRadius: distance44.optional()
|
|
18781
18800
|
});
|
|
18782
18801
|
|
|
18783
18802
|
// lib/components/silkscreen-circle.ts
|
|
18784
|
-
import { distance as
|
|
18803
|
+
import { distance as distance45 } from "circuit-json";
|
|
18785
18804
|
import { z as z137 } from "zod";
|
|
18786
18805
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18787
18806
|
isFilled: z137.boolean().optional(),
|
|
18788
18807
|
isOutline: z137.boolean().optional(),
|
|
18789
|
-
strokeWidth:
|
|
18790
|
-
radius:
|
|
18808
|
+
strokeWidth: distance45.optional(),
|
|
18809
|
+
radius: distance45
|
|
18791
18810
|
});
|
|
18792
18811
|
|
|
18793
18812
|
// lib/components/silkscreen-graphic.ts
|
|
@@ -18802,11 +18821,11 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
|
|
|
18802
18821
|
expectTypesMatch(true);
|
|
18803
18822
|
|
|
18804
18823
|
// lib/components/trace-hint.ts
|
|
18805
|
-
import { distance as
|
|
18824
|
+
import { distance as distance46, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18806
18825
|
import { z as z139 } from "zod";
|
|
18807
18826
|
var routeHintPointProps = z139.object({
|
|
18808
|
-
x:
|
|
18809
|
-
y:
|
|
18827
|
+
x: distance46,
|
|
18828
|
+
y: distance46,
|
|
18810
18829
|
via: z139.boolean().optional(),
|
|
18811
18830
|
toLayer: layer_ref14.optional()
|
|
18812
18831
|
});
|
|
@@ -18850,17 +18869,17 @@ var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
|
18850
18869
|
expectTypesMatch(true);
|
|
18851
18870
|
|
|
18852
18871
|
// lib/components/pcb-note-rect.ts
|
|
18853
|
-
import { distance as
|
|
18872
|
+
import { distance as distance47 } from "circuit-json";
|
|
18854
18873
|
import { z as z142 } from "zod";
|
|
18855
18874
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18856
|
-
width:
|
|
18857
|
-
height:
|
|
18858
|
-
strokeWidth:
|
|
18875
|
+
width: distance47,
|
|
18876
|
+
height: distance47,
|
|
18877
|
+
strokeWidth: distance47.optional(),
|
|
18859
18878
|
isFilled: z142.boolean().optional(),
|
|
18860
18879
|
hasStroke: z142.boolean().optional(),
|
|
18861
18880
|
isStrokeDashed: z142.boolean().optional(),
|
|
18862
18881
|
color: z142.string().optional(),
|
|
18863
|
-
cornerRadius:
|
|
18882
|
+
cornerRadius: distance47.optional()
|
|
18864
18883
|
});
|
|
18865
18884
|
expectTypesMatch(true);
|
|
18866
18885
|
|
|
@@ -18888,7 +18907,7 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18888
18907
|
expectTypesMatch(true);
|
|
18889
18908
|
|
|
18890
18909
|
// lib/components/pcb-note-line.ts
|
|
18891
|
-
import { distance as
|
|
18910
|
+
import { distance as distance48 } from "circuit-json";
|
|
18892
18911
|
import { z as z144 } from "zod";
|
|
18893
18912
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18894
18913
|
pcbLeftEdgeX: true,
|
|
@@ -18901,18 +18920,18 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18901
18920
|
pcbOffsetY: true,
|
|
18902
18921
|
pcbRotation: true
|
|
18903
18922
|
}).extend({
|
|
18904
|
-
x1:
|
|
18905
|
-
y1:
|
|
18906
|
-
x2:
|
|
18907
|
-
y2:
|
|
18908
|
-
strokeWidth:
|
|
18923
|
+
x1: distance48,
|
|
18924
|
+
y1: distance48,
|
|
18925
|
+
x2: distance48,
|
|
18926
|
+
y2: distance48,
|
|
18927
|
+
strokeWidth: distance48.optional(),
|
|
18909
18928
|
color: z144.string().optional(),
|
|
18910
18929
|
isDashed: z144.boolean().optional()
|
|
18911
18930
|
});
|
|
18912
18931
|
expectTypesMatch(true);
|
|
18913
18932
|
|
|
18914
18933
|
// lib/components/pcb-note-dimension.ts
|
|
18915
|
-
import { distance as
|
|
18934
|
+
import { distance as distance49, length as length13 } from "circuit-json";
|
|
18916
18935
|
import { z as z145 } from "zod";
|
|
18917
18936
|
var dimensionTarget2 = z145.union([z145.string(), point]);
|
|
18918
18937
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
@@ -18929,11 +18948,11 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18929
18948
|
from: dimensionTarget2,
|
|
18930
18949
|
to: dimensionTarget2,
|
|
18931
18950
|
text: z145.string().optional(),
|
|
18932
|
-
offset:
|
|
18951
|
+
offset: distance49.optional(),
|
|
18933
18952
|
font: z145.enum(["tscircuit2024"]).optional(),
|
|
18934
18953
|
fontSize: length13.optional(),
|
|
18935
18954
|
color: z145.string().optional(),
|
|
18936
|
-
arrowSize:
|
|
18955
|
+
arrowSize: distance49.optional(),
|
|
18937
18956
|
units: z145.enum(["in", "mm"]).optional(),
|
|
18938
18957
|
outerEdgeToEdge: z145.literal(true).optional(),
|
|
18939
18958
|
centerToCenter: z145.literal(true).optional(),
|