@tscircuit/props 0.0.589 → 0.0.591
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 +26 -0
- package/dist/index.d.ts +71 -1
- package/dist/index.js +195 -171
- package/dist/index.js.map +1 -1
- package/lib/components/schematic-box.ts +2 -0
- package/lib/components/schematic-symbol.ts +59 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18162,6 +18162,7 @@ var schematicBoxProps = z112.object({
|
|
|
18162
18162
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18163
18163
|
schX: distance31.optional(),
|
|
18164
18164
|
schY: distance31.optional(),
|
|
18165
|
+
schSectionName: z112.string().optional(),
|
|
18165
18166
|
schSheetName: z112.string().optional(),
|
|
18166
18167
|
width: distance31.optional(),
|
|
18167
18168
|
height: distance31.optional(),
|
|
@@ -18190,62 +18191,84 @@ var schematicBoxProps = z112.object({
|
|
|
18190
18191
|
);
|
|
18191
18192
|
expectTypesMatch(true);
|
|
18192
18193
|
|
|
18194
|
+
// lib/components/schematic-symbol.ts
|
|
18195
|
+
import { rotation as rotation8 } from "circuit-json";
|
|
18196
|
+
import { z as z113 } from "zod";
|
|
18197
|
+
var schematicSymbolConnections = z113.custom().pipe(z113.record(z113.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
18198
|
+
message: "connections must map at least one schematic symbol port"
|
|
18199
|
+
});
|
|
18200
|
+
var schematicSymbolProps = z113.object({
|
|
18201
|
+
name: z113.string().min(1),
|
|
18202
|
+
displayName: z113.string().optional(),
|
|
18203
|
+
chipRef: z113.string().min(1).optional(),
|
|
18204
|
+
symbolName: z113.string().min(1),
|
|
18205
|
+
connections: schematicSymbolConnections.optional(),
|
|
18206
|
+
schX: distance.optional(),
|
|
18207
|
+
schY: distance.optional(),
|
|
18208
|
+
schRotation: rotation8.optional(),
|
|
18209
|
+
schSectionName: z113.string().optional(),
|
|
18210
|
+
schSheetName: z113.string().optional()
|
|
18211
|
+
});
|
|
18212
|
+
expectTypesMatch(
|
|
18213
|
+
true
|
|
18214
|
+
);
|
|
18215
|
+
|
|
18193
18216
|
// lib/components/schematic-circle.ts
|
|
18194
18217
|
import { distance as distance32, point as point6 } from "circuit-json";
|
|
18195
|
-
import { z as
|
|
18196
|
-
var schematicCircleProps =
|
|
18218
|
+
import { z as z114 } from "zod";
|
|
18219
|
+
var schematicCircleProps = z114.object({
|
|
18197
18220
|
center: point6,
|
|
18198
18221
|
radius: distance32,
|
|
18199
18222
|
strokeWidth: distance32.optional(),
|
|
18200
|
-
color:
|
|
18201
|
-
isFilled:
|
|
18202
|
-
fillColor:
|
|
18203
|
-
isDashed:
|
|
18223
|
+
color: z114.string().optional(),
|
|
18224
|
+
isFilled: z114.boolean().optional().default(false),
|
|
18225
|
+
fillColor: z114.string().optional(),
|
|
18226
|
+
isDashed: z114.boolean().optional().default(false)
|
|
18204
18227
|
});
|
|
18205
18228
|
expectTypesMatch(
|
|
18206
18229
|
true
|
|
18207
18230
|
);
|
|
18208
18231
|
|
|
18209
18232
|
// lib/components/schematic-rect.ts
|
|
18210
|
-
import { distance as distance33, rotation as
|
|
18211
|
-
import { z as
|
|
18212
|
-
var schematicRectProps =
|
|
18233
|
+
import { distance as distance33, rotation as rotation9 } from "circuit-json";
|
|
18234
|
+
import { z as z115 } from "zod";
|
|
18235
|
+
var schematicRectProps = z115.object({
|
|
18213
18236
|
schX: distance33.optional(),
|
|
18214
18237
|
schY: distance33.optional(),
|
|
18215
18238
|
width: distance33,
|
|
18216
18239
|
height: distance33,
|
|
18217
|
-
rotation:
|
|
18240
|
+
rotation: rotation9.default(0),
|
|
18218
18241
|
strokeWidth: distance33.optional(),
|
|
18219
|
-
color:
|
|
18220
|
-
isFilled:
|
|
18221
|
-
fillColor:
|
|
18222
|
-
isDashed:
|
|
18242
|
+
color: z115.string().optional(),
|
|
18243
|
+
isFilled: z115.boolean().optional().default(false),
|
|
18244
|
+
fillColor: z115.string().optional(),
|
|
18245
|
+
isDashed: z115.boolean().optional().default(false)
|
|
18223
18246
|
});
|
|
18224
18247
|
expectTypesMatch(true);
|
|
18225
18248
|
|
|
18226
18249
|
// lib/components/schematic-line.ts
|
|
18227
18250
|
import { distance as distance34 } from "circuit-json";
|
|
18228
|
-
import { z as
|
|
18229
|
-
var schematicLineProps =
|
|
18251
|
+
import { z as z116 } from "zod";
|
|
18252
|
+
var schematicLineProps = z116.object({
|
|
18230
18253
|
x1: distance34,
|
|
18231
18254
|
y1: distance34,
|
|
18232
18255
|
x2: distance34,
|
|
18233
18256
|
y2: distance34,
|
|
18234
18257
|
strokeWidth: distance34.optional(),
|
|
18235
|
-
color:
|
|
18236
|
-
isDashed:
|
|
18258
|
+
color: z116.string().optional(),
|
|
18259
|
+
isDashed: z116.boolean().optional().default(false),
|
|
18237
18260
|
dashLength: distance34.optional(),
|
|
18238
18261
|
dashGap: distance34.optional()
|
|
18239
18262
|
});
|
|
18240
18263
|
expectTypesMatch(true);
|
|
18241
18264
|
|
|
18242
18265
|
// lib/components/schematic-text.ts
|
|
18243
|
-
import { distance as distance35, rotation as
|
|
18244
|
-
import { z as
|
|
18266
|
+
import { distance as distance35, rotation as rotation10 } from "circuit-json";
|
|
18267
|
+
import { z as z118 } from "zod";
|
|
18245
18268
|
|
|
18246
18269
|
// lib/common/fivePointAnchor.ts
|
|
18247
|
-
import { z as
|
|
18248
|
-
var fivePointAnchor =
|
|
18270
|
+
import { z as z117 } from "zod";
|
|
18271
|
+
var fivePointAnchor = z117.enum([
|
|
18249
18272
|
"center",
|
|
18250
18273
|
"left",
|
|
18251
18274
|
"right",
|
|
@@ -18254,39 +18277,39 @@ var fivePointAnchor = z116.enum([
|
|
|
18254
18277
|
]);
|
|
18255
18278
|
|
|
18256
18279
|
// lib/components/schematic-text.ts
|
|
18257
|
-
var schematicTextProps =
|
|
18280
|
+
var schematicTextProps = z118.object({
|
|
18258
18281
|
schX: distance35.optional(),
|
|
18259
18282
|
schY: distance35.optional(),
|
|
18260
|
-
text:
|
|
18261
|
-
fontSize:
|
|
18262
|
-
anchor:
|
|
18263
|
-
color:
|
|
18264
|
-
schRotation:
|
|
18283
|
+
text: z118.string(),
|
|
18284
|
+
fontSize: z118.number().default(1),
|
|
18285
|
+
anchor: z118.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18286
|
+
color: z118.string().default("#000000"),
|
|
18287
|
+
schRotation: rotation10.default(0)
|
|
18265
18288
|
});
|
|
18266
18289
|
expectTypesMatch(true);
|
|
18267
18290
|
|
|
18268
18291
|
// lib/components/schematic-path.ts
|
|
18269
18292
|
import { distance as distance36, point as point7 } from "circuit-json";
|
|
18270
|
-
import { z as
|
|
18271
|
-
var schematicPathProps =
|
|
18272
|
-
points:
|
|
18273
|
-
svgPath:
|
|
18293
|
+
import { z as z119 } from "zod";
|
|
18294
|
+
var schematicPathProps = z119.object({
|
|
18295
|
+
points: z119.array(point7).optional(),
|
|
18296
|
+
svgPath: z119.string().optional(),
|
|
18274
18297
|
strokeWidth: distance36.optional(),
|
|
18275
|
-
strokeColor:
|
|
18298
|
+
strokeColor: z119.string().optional(),
|
|
18276
18299
|
dashLength: distance36.optional(),
|
|
18277
18300
|
dashGap: distance36.optional(),
|
|
18278
|
-
isFilled:
|
|
18279
|
-
fillColor:
|
|
18301
|
+
isFilled: z119.boolean().optional().default(false),
|
|
18302
|
+
fillColor: z119.string().optional()
|
|
18280
18303
|
});
|
|
18281
18304
|
expectTypesMatch(true);
|
|
18282
18305
|
|
|
18283
18306
|
// lib/components/schematic-table.ts
|
|
18284
18307
|
import { distance as distance37 } from "circuit-json";
|
|
18285
|
-
import { z as
|
|
18286
|
-
var schematicTableProps =
|
|
18308
|
+
import { z as z120 } from "zod";
|
|
18309
|
+
var schematicTableProps = z120.object({
|
|
18287
18310
|
schX: distance37.optional(),
|
|
18288
18311
|
schY: distance37.optional(),
|
|
18289
|
-
children:
|
|
18312
|
+
children: z120.any().optional(),
|
|
18290
18313
|
cellPadding: distance37.optional(),
|
|
18291
18314
|
borderWidth: distance37.optional(),
|
|
18292
18315
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18296,34 +18319,34 @@ expectTypesMatch(true);
|
|
|
18296
18319
|
|
|
18297
18320
|
// lib/components/schematic-row.ts
|
|
18298
18321
|
import { distance as distance38 } from "circuit-json";
|
|
18299
|
-
import { z as
|
|
18300
|
-
var schematicRowProps =
|
|
18301
|
-
children:
|
|
18322
|
+
import { z as z121 } from "zod";
|
|
18323
|
+
var schematicRowProps = z121.object({
|
|
18324
|
+
children: z121.any().optional(),
|
|
18302
18325
|
height: distance38.optional()
|
|
18303
18326
|
});
|
|
18304
18327
|
expectTypesMatch(true);
|
|
18305
18328
|
|
|
18306
18329
|
// lib/components/schematic-cell.ts
|
|
18307
18330
|
import { distance as distance39 } from "circuit-json";
|
|
18308
|
-
import { z as
|
|
18309
|
-
var schematicCellProps =
|
|
18310
|
-
children:
|
|
18311
|
-
horizontalAlign:
|
|
18312
|
-
verticalAlign:
|
|
18331
|
+
import { z as z122 } from "zod";
|
|
18332
|
+
var schematicCellProps = z122.object({
|
|
18333
|
+
children: z122.string().optional(),
|
|
18334
|
+
horizontalAlign: z122.enum(["left", "center", "right"]).optional(),
|
|
18335
|
+
verticalAlign: z122.enum(["top", "middle", "bottom"]).optional(),
|
|
18313
18336
|
fontSize: distance39.optional(),
|
|
18314
|
-
rowSpan:
|
|
18315
|
-
colSpan:
|
|
18337
|
+
rowSpan: z122.number().optional(),
|
|
18338
|
+
colSpan: z122.number().optional(),
|
|
18316
18339
|
width: distance39.optional(),
|
|
18317
|
-
text:
|
|
18340
|
+
text: z122.string().optional()
|
|
18318
18341
|
});
|
|
18319
18342
|
expectTypesMatch(true);
|
|
18320
18343
|
|
|
18321
18344
|
// lib/components/schematic-section.ts
|
|
18322
18345
|
import { distance as distance40 } from "circuit-json";
|
|
18323
|
-
import { z as
|
|
18324
|
-
var schematicSectionProps =
|
|
18325
|
-
displayName:
|
|
18326
|
-
name:
|
|
18346
|
+
import { z as z123 } from "zod";
|
|
18347
|
+
var schematicSectionProps = z123.object({
|
|
18348
|
+
displayName: z123.string().optional(),
|
|
18349
|
+
name: z123.string(),
|
|
18327
18350
|
sectionTitleFontSize: distance40.optional()
|
|
18328
18351
|
});
|
|
18329
18352
|
expectTypesMatch(
|
|
@@ -18331,51 +18354,51 @@ expectTypesMatch(
|
|
|
18331
18354
|
);
|
|
18332
18355
|
|
|
18333
18356
|
// lib/components/schematic-sheet.ts
|
|
18334
|
-
import { z as
|
|
18335
|
-
var schematicSheetProps =
|
|
18336
|
-
name:
|
|
18337
|
-
displayName:
|
|
18338
|
-
sheetIndex:
|
|
18339
|
-
children:
|
|
18357
|
+
import { z as z124 } from "zod";
|
|
18358
|
+
var schematicSheetProps = z124.object({
|
|
18359
|
+
name: z124.string(),
|
|
18360
|
+
displayName: z124.string(),
|
|
18361
|
+
sheetIndex: z124.number().optional(),
|
|
18362
|
+
children: z124.any().optional()
|
|
18340
18363
|
});
|
|
18341
18364
|
expectTypesMatch(true);
|
|
18342
18365
|
|
|
18343
18366
|
// lib/components/copper-text.ts
|
|
18344
18367
|
import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
|
|
18345
|
-
import { z as
|
|
18368
|
+
import { z as z125 } from "zod";
|
|
18346
18369
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18347
|
-
text:
|
|
18370
|
+
text: z125.string(),
|
|
18348
18371
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18349
|
-
font:
|
|
18372
|
+
font: z125.enum(["tscircuit2024"]).optional(),
|
|
18350
18373
|
fontSize: length8.optional(),
|
|
18351
|
-
layers:
|
|
18352
|
-
knockout:
|
|
18353
|
-
mirrored:
|
|
18374
|
+
layers: z125.array(layer_ref10).optional(),
|
|
18375
|
+
knockout: z125.boolean().optional(),
|
|
18376
|
+
mirrored: z125.boolean().optional()
|
|
18354
18377
|
});
|
|
18355
18378
|
|
|
18356
18379
|
// lib/components/silkscreen-text.ts
|
|
18357
18380
|
import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
|
|
18358
|
-
import { z as
|
|
18381
|
+
import { z as z126 } from "zod";
|
|
18359
18382
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18360
|
-
text:
|
|
18383
|
+
text: z126.string(),
|
|
18361
18384
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18362
|
-
font:
|
|
18385
|
+
font: z126.enum(["tscircuit2024"]).optional(),
|
|
18363
18386
|
fontSize: length9.optional(),
|
|
18364
18387
|
/**
|
|
18365
18388
|
* If true, text will knock out underlying silkscreen
|
|
18366
18389
|
*/
|
|
18367
|
-
isKnockout:
|
|
18390
|
+
isKnockout: z126.boolean().optional(),
|
|
18368
18391
|
knockoutPadding: length9.optional(),
|
|
18369
18392
|
knockoutPaddingLeft: length9.optional(),
|
|
18370
18393
|
knockoutPaddingRight: length9.optional(),
|
|
18371
18394
|
knockoutPaddingTop: length9.optional(),
|
|
18372
18395
|
knockoutPaddingBottom: length9.optional(),
|
|
18373
|
-
layers:
|
|
18396
|
+
layers: z126.array(layer_ref11).optional()
|
|
18374
18397
|
});
|
|
18375
18398
|
|
|
18376
18399
|
// lib/components/silkscreen-path.ts
|
|
18377
18400
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18378
|
-
import { z as
|
|
18401
|
+
import { z as z127 } from "zod";
|
|
18379
18402
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18380
18403
|
pcbLeftEdgeX: true,
|
|
18381
18404
|
pcbRightEdgeX: true,
|
|
@@ -18387,7 +18410,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18387
18410
|
pcbOffsetY: true,
|
|
18388
18411
|
pcbRotation: true
|
|
18389
18412
|
}).extend({
|
|
18390
|
-
route:
|
|
18413
|
+
route: z127.array(route_hint_point5),
|
|
18391
18414
|
strokeWidth: length10.optional()
|
|
18392
18415
|
});
|
|
18393
18416
|
|
|
@@ -18409,10 +18432,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18409
18432
|
|
|
18410
18433
|
// lib/components/silkscreen-rect.ts
|
|
18411
18434
|
import { distance as distance42 } from "circuit-json";
|
|
18412
|
-
import { z as
|
|
18435
|
+
import { z as z128 } from "zod";
|
|
18413
18436
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18414
|
-
filled:
|
|
18415
|
-
stroke:
|
|
18437
|
+
filled: z128.boolean().default(true).optional(),
|
|
18438
|
+
stroke: z128.enum(["dashed", "solid", "none"]).optional(),
|
|
18416
18439
|
strokeWidth: distance42.optional(),
|
|
18417
18440
|
width: distance42,
|
|
18418
18441
|
height: distance42,
|
|
@@ -18421,10 +18444,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18421
18444
|
|
|
18422
18445
|
// lib/components/silkscreen-circle.ts
|
|
18423
18446
|
import { distance as distance43 } from "circuit-json";
|
|
18424
|
-
import { z as
|
|
18447
|
+
import { z as z129 } from "zod";
|
|
18425
18448
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18426
|
-
isFilled:
|
|
18427
|
-
isOutline:
|
|
18449
|
+
isFilled: z129.boolean().optional(),
|
|
18450
|
+
isOutline: z129.boolean().optional(),
|
|
18428
18451
|
strokeWidth: distance43.optional(),
|
|
18429
18452
|
radius: distance43
|
|
18430
18453
|
});
|
|
@@ -18442,63 +18465,63 @@ expectTypesMatch(true);
|
|
|
18442
18465
|
|
|
18443
18466
|
// lib/components/trace-hint.ts
|
|
18444
18467
|
import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18445
|
-
import { z as
|
|
18446
|
-
var routeHintPointProps =
|
|
18468
|
+
import { z as z131 } from "zod";
|
|
18469
|
+
var routeHintPointProps = z131.object({
|
|
18447
18470
|
x: distance44,
|
|
18448
18471
|
y: distance44,
|
|
18449
|
-
via:
|
|
18472
|
+
via: z131.boolean().optional(),
|
|
18450
18473
|
toLayer: layer_ref12.optional()
|
|
18451
18474
|
});
|
|
18452
|
-
var traceHintProps =
|
|
18453
|
-
for:
|
|
18475
|
+
var traceHintProps = z131.object({
|
|
18476
|
+
for: z131.string().optional().describe(
|
|
18454
18477
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18455
18478
|
),
|
|
18456
|
-
order:
|
|
18479
|
+
order: z131.number().optional(),
|
|
18457
18480
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18458
|
-
offsets:
|
|
18459
|
-
traceWidth:
|
|
18481
|
+
offsets: z131.array(route_hint_point6).or(z131.array(routeHintPointProps)).optional(),
|
|
18482
|
+
traceWidth: z131.number().optional()
|
|
18460
18483
|
});
|
|
18461
18484
|
|
|
18462
18485
|
// lib/components/port.ts
|
|
18463
|
-
import { z as
|
|
18486
|
+
import { z as z132 } from "zod";
|
|
18464
18487
|
var portProps = commonLayoutProps.extend({
|
|
18465
|
-
name:
|
|
18466
|
-
pinNumber:
|
|
18467
|
-
schStemLength:
|
|
18468
|
-
aliases:
|
|
18469
|
-
layer:
|
|
18470
|
-
layers:
|
|
18471
|
-
schX:
|
|
18472
|
-
schY:
|
|
18488
|
+
name: z132.string().optional(),
|
|
18489
|
+
pinNumber: z132.number().optional(),
|
|
18490
|
+
schStemLength: z132.number().optional(),
|
|
18491
|
+
aliases: z132.array(z132.string()).optional(),
|
|
18492
|
+
layer: z132.string().optional(),
|
|
18493
|
+
layers: z132.array(z132.string()).optional(),
|
|
18494
|
+
schX: z132.number().optional(),
|
|
18495
|
+
schY: z132.number().optional(),
|
|
18473
18496
|
direction: direction.optional(),
|
|
18474
|
-
connectsTo:
|
|
18497
|
+
connectsTo: z132.string().or(z132.array(z132.string())).optional(),
|
|
18475
18498
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18476
|
-
hasInversionCircle:
|
|
18499
|
+
hasInversionCircle: z132.boolean().optional()
|
|
18477
18500
|
});
|
|
18478
18501
|
|
|
18479
18502
|
// lib/components/pcb-note-text.ts
|
|
18480
18503
|
import { length as length11 } from "circuit-json";
|
|
18481
|
-
import { z as
|
|
18504
|
+
import { z as z133 } from "zod";
|
|
18482
18505
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18483
|
-
text:
|
|
18484
|
-
anchorAlignment:
|
|
18485
|
-
font:
|
|
18506
|
+
text: z133.string(),
|
|
18507
|
+
anchorAlignment: z133.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18508
|
+
font: z133.enum(["tscircuit2024"]).optional(),
|
|
18486
18509
|
fontSize: length11.optional(),
|
|
18487
|
-
color:
|
|
18510
|
+
color: z133.string().optional()
|
|
18488
18511
|
});
|
|
18489
18512
|
expectTypesMatch(true);
|
|
18490
18513
|
|
|
18491
18514
|
// lib/components/pcb-note-rect.ts
|
|
18492
18515
|
import { distance as distance45 } from "circuit-json";
|
|
18493
|
-
import { z as
|
|
18516
|
+
import { z as z134 } from "zod";
|
|
18494
18517
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18495
18518
|
width: distance45,
|
|
18496
18519
|
height: distance45,
|
|
18497
18520
|
strokeWidth: distance45.optional(),
|
|
18498
|
-
isFilled:
|
|
18499
|
-
hasStroke:
|
|
18500
|
-
isStrokeDashed:
|
|
18501
|
-
color:
|
|
18521
|
+
isFilled: z134.boolean().optional(),
|
|
18522
|
+
hasStroke: z134.boolean().optional(),
|
|
18523
|
+
isStrokeDashed: z134.boolean().optional(),
|
|
18524
|
+
color: z134.string().optional(),
|
|
18502
18525
|
cornerRadius: distance45.optional()
|
|
18503
18526
|
});
|
|
18504
18527
|
expectTypesMatch(true);
|
|
@@ -18508,7 +18531,7 @@ import {
|
|
|
18508
18531
|
length as length12,
|
|
18509
18532
|
route_hint_point as route_hint_point7
|
|
18510
18533
|
} from "circuit-json";
|
|
18511
|
-
import { z as
|
|
18534
|
+
import { z as z135 } from "zod";
|
|
18512
18535
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18513
18536
|
pcbLeftEdgeX: true,
|
|
18514
18537
|
pcbRightEdgeX: true,
|
|
@@ -18520,15 +18543,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18520
18543
|
pcbOffsetY: true,
|
|
18521
18544
|
pcbRotation: true
|
|
18522
18545
|
}).extend({
|
|
18523
|
-
route:
|
|
18546
|
+
route: z135.array(route_hint_point7),
|
|
18524
18547
|
strokeWidth: length12.optional(),
|
|
18525
|
-
color:
|
|
18548
|
+
color: z135.string().optional()
|
|
18526
18549
|
});
|
|
18527
18550
|
expectTypesMatch(true);
|
|
18528
18551
|
|
|
18529
18552
|
// lib/components/pcb-note-line.ts
|
|
18530
18553
|
import { distance as distance46 } from "circuit-json";
|
|
18531
|
-
import { z as
|
|
18554
|
+
import { z as z136 } from "zod";
|
|
18532
18555
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18533
18556
|
pcbLeftEdgeX: true,
|
|
18534
18557
|
pcbRightEdgeX: true,
|
|
@@ -18545,15 +18568,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18545
18568
|
x2: distance46,
|
|
18546
18569
|
y2: distance46,
|
|
18547
18570
|
strokeWidth: distance46.optional(),
|
|
18548
|
-
color:
|
|
18549
|
-
isDashed:
|
|
18571
|
+
color: z136.string().optional(),
|
|
18572
|
+
isDashed: z136.boolean().optional()
|
|
18550
18573
|
});
|
|
18551
18574
|
expectTypesMatch(true);
|
|
18552
18575
|
|
|
18553
18576
|
// lib/components/pcb-note-dimension.ts
|
|
18554
18577
|
import { distance as distance47, length as length13 } from "circuit-json";
|
|
18555
|
-
import { z as
|
|
18556
|
-
var dimensionTarget2 =
|
|
18578
|
+
import { z as z137 } from "zod";
|
|
18579
|
+
var dimensionTarget2 = z137.union([z137.string(), point]);
|
|
18557
18580
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18558
18581
|
pcbLeftEdgeX: true,
|
|
18559
18582
|
pcbRightEdgeX: true,
|
|
@@ -18567,101 +18590,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18567
18590
|
}).extend({
|
|
18568
18591
|
from: dimensionTarget2,
|
|
18569
18592
|
to: dimensionTarget2,
|
|
18570
|
-
text:
|
|
18593
|
+
text: z137.string().optional(),
|
|
18571
18594
|
offset: distance47.optional(),
|
|
18572
|
-
font:
|
|
18595
|
+
font: z137.enum(["tscircuit2024"]).optional(),
|
|
18573
18596
|
fontSize: length13.optional(),
|
|
18574
|
-
color:
|
|
18597
|
+
color: z137.string().optional(),
|
|
18575
18598
|
arrowSize: distance47.optional(),
|
|
18576
|
-
units:
|
|
18577
|
-
outerEdgeToEdge:
|
|
18578
|
-
centerToCenter:
|
|
18579
|
-
innerEdgeToEdge:
|
|
18599
|
+
units: z137.enum(["in", "mm"]).optional(),
|
|
18600
|
+
outerEdgeToEdge: z137.literal(true).optional(),
|
|
18601
|
+
centerToCenter: z137.literal(true).optional(),
|
|
18602
|
+
innerEdgeToEdge: z137.literal(true).optional()
|
|
18580
18603
|
});
|
|
18581
18604
|
expectTypesMatch(
|
|
18582
18605
|
true
|
|
18583
18606
|
);
|
|
18584
18607
|
|
|
18585
18608
|
// lib/platformConfig.ts
|
|
18586
|
-
import { z as
|
|
18587
|
-
var unvalidatedCircuitJson =
|
|
18588
|
-
var footprintLibraryResult =
|
|
18589
|
-
footprintCircuitJson:
|
|
18609
|
+
import { z as z138 } from "zod";
|
|
18610
|
+
var unvalidatedCircuitJson = z138.array(z138.any()).describe("Circuit JSON");
|
|
18611
|
+
var footprintLibraryResult = z138.object({
|
|
18612
|
+
footprintCircuitJson: z138.array(z138.any()),
|
|
18590
18613
|
cadModel: cadModelProp.optional()
|
|
18591
18614
|
});
|
|
18592
|
-
var pathToCircuitJsonFn =
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
).returns(
|
|
18615
|
+
var pathToCircuitJsonFn = z138.function().args(z138.string()).returns(z138.promise(footprintLibraryResult)).or(
|
|
18616
|
+
z138.function().args(
|
|
18617
|
+
z138.string(),
|
|
18618
|
+
z138.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18619
|
+
).returns(z138.promise(footprintLibraryResult))
|
|
18597
18620
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18598
|
-
var footprintFileParserEntry =
|
|
18599
|
-
loadFromUrl:
|
|
18621
|
+
var footprintFileParserEntry = z138.object({
|
|
18622
|
+
loadFromUrl: z138.function().args(z138.string()).returns(z138.promise(footprintLibraryResult)).describe(
|
|
18600
18623
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18601
18624
|
)
|
|
18602
18625
|
});
|
|
18603
|
-
var spiceEngineSimulationResult =
|
|
18604
|
-
engineVersionString:
|
|
18626
|
+
var spiceEngineSimulationResult = z138.object({
|
|
18627
|
+
engineVersionString: z138.string().optional(),
|
|
18605
18628
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18606
18629
|
});
|
|
18607
|
-
var spiceEngineZod =
|
|
18608
|
-
simulate:
|
|
18630
|
+
var spiceEngineZod = z138.object({
|
|
18631
|
+
simulate: z138.function().args(z138.string()).returns(z138.promise(spiceEngineSimulationResult)).describe(
|
|
18609
18632
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18610
18633
|
)
|
|
18611
18634
|
});
|
|
18612
|
-
var defaultSpiceEngine =
|
|
18635
|
+
var defaultSpiceEngine = z138.custom(
|
|
18613
18636
|
(value) => typeof value === "string"
|
|
18614
18637
|
);
|
|
18615
|
-
var autorouterInstance =
|
|
18616
|
-
run:
|
|
18617
|
-
getOutputSimpleRouteJson:
|
|
18638
|
+
var autorouterInstance = z138.object({
|
|
18639
|
+
run: z138.function().args().returns(z138.promise(z138.unknown())).describe("Run the autorouter"),
|
|
18640
|
+
getOutputSimpleRouteJson: z138.function().args().returns(z138.promise(z138.any())).describe("Get the resulting SimpleRouteJson")
|
|
18618
18641
|
});
|
|
18619
|
-
var autorouterDefinition =
|
|
18620
|
-
createAutorouter:
|
|
18642
|
+
var autorouterDefinition = z138.object({
|
|
18643
|
+
createAutorouter: z138.function().args(z138.any(), z138.any().optional()).returns(z138.union([autorouterInstance, z138.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18621
18644
|
});
|
|
18622
|
-
var platformFetch =
|
|
18623
|
-
var platformConfig =
|
|
18645
|
+
var platformFetch = z138.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18646
|
+
var platformConfig = z138.object({
|
|
18624
18647
|
partsEngine: partsEngine.optional(),
|
|
18625
18648
|
autorouter: autorouterProp.optional(),
|
|
18626
|
-
autorouterMap:
|
|
18649
|
+
autorouterMap: z138.record(z138.string(), autorouterDefinition).optional(),
|
|
18627
18650
|
registryApiUrl: url.optional(),
|
|
18628
18651
|
cloudAutorouterUrl: url.optional(),
|
|
18629
|
-
projectName:
|
|
18652
|
+
projectName: z138.string().optional(),
|
|
18630
18653
|
projectBaseUrl: url.optional(),
|
|
18631
|
-
version:
|
|
18654
|
+
version: z138.string().optional(),
|
|
18632
18655
|
url: url.optional(),
|
|
18633
|
-
printBoardInformationToSilkscreen:
|
|
18634
|
-
includeBoardFiles:
|
|
18656
|
+
printBoardInformationToSilkscreen: z138.boolean().optional(),
|
|
18657
|
+
includeBoardFiles: z138.array(z138.string()).describe(
|
|
18635
18658
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18636
18659
|
).optional(),
|
|
18637
|
-
snapshotsDir:
|
|
18660
|
+
snapshotsDir: z138.string().describe(
|
|
18638
18661
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18639
18662
|
).optional(),
|
|
18640
18663
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18641
|
-
unitPreference:
|
|
18642
|
-
localCacheEngine:
|
|
18643
|
-
pcbDisabled:
|
|
18644
|
-
routingDisabled:
|
|
18645
|
-
schematicDisabled:
|
|
18646
|
-
partsEngineDisabled:
|
|
18647
|
-
drcChecksDisabled:
|
|
18648
|
-
netlistDrcChecksDisabled:
|
|
18649
|
-
routingDrcChecksDisabled:
|
|
18650
|
-
placementDrcChecksDisabled:
|
|
18651
|
-
pinSpecificationDrcChecksDisabled:
|
|
18652
|
-
spiceEngineMap:
|
|
18653
|
-
footprintLibraryMap:
|
|
18654
|
-
|
|
18655
|
-
|
|
18664
|
+
unitPreference: z138.enum(["mm", "in", "mil"]).optional(),
|
|
18665
|
+
localCacheEngine: z138.any().optional(),
|
|
18666
|
+
pcbDisabled: z138.boolean().optional(),
|
|
18667
|
+
routingDisabled: z138.boolean().optional(),
|
|
18668
|
+
schematicDisabled: z138.boolean().optional(),
|
|
18669
|
+
partsEngineDisabled: z138.boolean().optional(),
|
|
18670
|
+
drcChecksDisabled: z138.boolean().optional(),
|
|
18671
|
+
netlistDrcChecksDisabled: z138.boolean().optional(),
|
|
18672
|
+
routingDrcChecksDisabled: z138.boolean().optional(),
|
|
18673
|
+
placementDrcChecksDisabled: z138.boolean().optional(),
|
|
18674
|
+
pinSpecificationDrcChecksDisabled: z138.boolean().optional(),
|
|
18675
|
+
spiceEngineMap: z138.record(z138.string(), spiceEngineZod).optional(),
|
|
18676
|
+
footprintLibraryMap: z138.record(
|
|
18677
|
+
z138.string(),
|
|
18678
|
+
z138.union([
|
|
18656
18679
|
pathToCircuitJsonFn,
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18680
|
+
z138.record(
|
|
18681
|
+
z138.string(),
|
|
18682
|
+
z138.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18660
18683
|
)
|
|
18661
18684
|
])
|
|
18662
18685
|
).optional(),
|
|
18663
|
-
footprintFileParserMap:
|
|
18664
|
-
resolveProjectStaticFileImportUrl:
|
|
18686
|
+
footprintFileParserMap: z138.record(z138.string(), footprintFileParserEntry).optional(),
|
|
18687
|
+
resolveProjectStaticFileImportUrl: z138.function().args(z138.string()).returns(z138.promise(z138.string())).describe(
|
|
18665
18688
|
"A function that returns a string URL for static files for the project"
|
|
18666
18689
|
).optional(),
|
|
18667
18690
|
platformFetch: platformFetch.optional()
|
|
@@ -18888,6 +18911,7 @@ export {
|
|
|
18888
18911
|
schematicRowProps,
|
|
18889
18912
|
schematicSectionProps,
|
|
18890
18913
|
schematicSheetProps,
|
|
18914
|
+
schematicSymbolProps,
|
|
18891
18915
|
schematicSymbolSize,
|
|
18892
18916
|
schematicTableProps,
|
|
18893
18917
|
schematicTextProps,
|