@tscircuit/props 0.0.555 → 0.0.556

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/dist/index.js CHANGED
@@ -439,6 +439,9 @@ var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
439
439
  schSectionName: z16.string().optional().describe(
440
440
  'This component will be drawn as part of this section e.g. "Power"'
441
441
  ),
442
+ schSheetName: z16.string().optional().describe(
443
+ 'This component will be drawn as part of this sheet e.g. "Main"'
444
+ ),
442
445
  datasheetUrl: url.optional(),
443
446
  cadModel: cadModelProp.optional(),
444
447
  kicadFootprintMetadata: kicadFootprintMetadata.optional(),
@@ -18202,42 +18205,51 @@ expectTypesMatch(
18202
18205
  true
18203
18206
  );
18204
18207
 
18208
+ // lib/components/schematic-sheet.ts
18209
+ import { z as z117 } from "zod";
18210
+ var schematicSheetProps = z117.object({
18211
+ name: z117.string(),
18212
+ displayName: z117.string(),
18213
+ children: z117.any().optional()
18214
+ });
18215
+ expectTypesMatch(true);
18216
+
18205
18217
  // lib/components/copper-text.ts
18206
18218
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18207
- import { z as z117 } from "zod";
18219
+ import { z as z118 } from "zod";
18208
18220
  var copperTextProps = pcbLayoutProps.extend({
18209
- text: z117.string(),
18221
+ text: z118.string(),
18210
18222
  anchorAlignment: ninePointAnchor.default("center"),
18211
- font: z117.enum(["tscircuit2024"]).optional(),
18223
+ font: z118.enum(["tscircuit2024"]).optional(),
18212
18224
  fontSize: length8.optional(),
18213
- layers: z117.array(layer_ref10).optional(),
18214
- knockout: z117.boolean().optional(),
18215
- mirrored: z117.boolean().optional()
18225
+ layers: z118.array(layer_ref10).optional(),
18226
+ knockout: z118.boolean().optional(),
18227
+ mirrored: z118.boolean().optional()
18216
18228
  });
18217
18229
 
18218
18230
  // lib/components/silkscreen-text.ts
18219
18231
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18220
- import { z as z118 } from "zod";
18232
+ import { z as z119 } from "zod";
18221
18233
  var silkscreenTextProps = pcbLayoutProps.extend({
18222
- text: z118.string(),
18234
+ text: z119.string(),
18223
18235
  anchorAlignment: ninePointAnchor.default("center"),
18224
- font: z118.enum(["tscircuit2024"]).optional(),
18236
+ font: z119.enum(["tscircuit2024"]).optional(),
18225
18237
  fontSize: length9.optional(),
18226
18238
  /**
18227
18239
  * If true, text will knock out underlying silkscreen
18228
18240
  */
18229
- isKnockout: z118.boolean().optional(),
18241
+ isKnockout: z119.boolean().optional(),
18230
18242
  knockoutPadding: length9.optional(),
18231
18243
  knockoutPaddingLeft: length9.optional(),
18232
18244
  knockoutPaddingRight: length9.optional(),
18233
18245
  knockoutPaddingTop: length9.optional(),
18234
18246
  knockoutPaddingBottom: length9.optional(),
18235
- layers: z118.array(layer_ref11).optional()
18247
+ layers: z119.array(layer_ref11).optional()
18236
18248
  });
18237
18249
 
18238
18250
  // lib/components/silkscreen-path.ts
18239
18251
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18240
- import { z as z119 } from "zod";
18252
+ import { z as z120 } from "zod";
18241
18253
  var silkscreenPathProps = pcbLayoutProps.omit({
18242
18254
  pcbLeftEdgeX: true,
18243
18255
  pcbRightEdgeX: true,
@@ -18249,7 +18261,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18249
18261
  pcbOffsetY: true,
18250
18262
  pcbRotation: true
18251
18263
  }).extend({
18252
- route: z119.array(route_hint_point5),
18264
+ route: z120.array(route_hint_point5),
18253
18265
  strokeWidth: length10.optional()
18254
18266
  });
18255
18267
 
@@ -18271,10 +18283,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18271
18283
 
18272
18284
  // lib/components/silkscreen-rect.ts
18273
18285
  import { distance as distance41 } from "circuit-json";
18274
- import { z as z120 } from "zod";
18286
+ import { z as z121 } from "zod";
18275
18287
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18276
- filled: z120.boolean().default(true).optional(),
18277
- stroke: z120.enum(["dashed", "solid", "none"]).optional(),
18288
+ filled: z121.boolean().default(true).optional(),
18289
+ stroke: z121.enum(["dashed", "solid", "none"]).optional(),
18278
18290
  strokeWidth: distance41.optional(),
18279
18291
  width: distance41,
18280
18292
  height: distance41,
@@ -18283,10 +18295,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18283
18295
 
18284
18296
  // lib/components/silkscreen-circle.ts
18285
18297
  import { distance as distance42 } from "circuit-json";
18286
- import { z as z121 } from "zod";
18298
+ import { z as z122 } from "zod";
18287
18299
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18288
- isFilled: z121.boolean().optional(),
18289
- isOutline: z121.boolean().optional(),
18300
+ isFilled: z122.boolean().optional(),
18301
+ isOutline: z122.boolean().optional(),
18290
18302
  strokeWidth: distance42.optional(),
18291
18303
  radius: distance42
18292
18304
  });
@@ -18304,63 +18316,63 @@ expectTypesMatch(true);
18304
18316
 
18305
18317
  // lib/components/trace-hint.ts
18306
18318
  import { distance as distance43, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18307
- import { z as z123 } from "zod";
18308
- var routeHintPointProps = z123.object({
18319
+ import { z as z124 } from "zod";
18320
+ var routeHintPointProps = z124.object({
18309
18321
  x: distance43,
18310
18322
  y: distance43,
18311
- via: z123.boolean().optional(),
18323
+ via: z124.boolean().optional(),
18312
18324
  toLayer: layer_ref12.optional()
18313
18325
  });
18314
- var traceHintProps = z123.object({
18315
- for: z123.string().optional().describe(
18326
+ var traceHintProps = z124.object({
18327
+ for: z124.string().optional().describe(
18316
18328
  "Selector for the port you're targeting, not required if you're inside a trace"
18317
18329
  ),
18318
- order: z123.number().optional(),
18330
+ order: z124.number().optional(),
18319
18331
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18320
- offsets: z123.array(route_hint_point6).or(z123.array(routeHintPointProps)).optional(),
18321
- traceWidth: z123.number().optional()
18332
+ offsets: z124.array(route_hint_point6).or(z124.array(routeHintPointProps)).optional(),
18333
+ traceWidth: z124.number().optional()
18322
18334
  });
18323
18335
 
18324
18336
  // lib/components/port.ts
18325
- import { z as z124 } from "zod";
18337
+ import { z as z125 } from "zod";
18326
18338
  var portProps = commonLayoutProps.extend({
18327
- name: z124.string().optional(),
18328
- pinNumber: z124.number().optional(),
18329
- schStemLength: z124.number().optional(),
18330
- aliases: z124.array(z124.string()).optional(),
18331
- layer: z124.string().optional(),
18332
- layers: z124.array(z124.string()).optional(),
18333
- schX: z124.number().optional(),
18334
- schY: z124.number().optional(),
18339
+ name: z125.string().optional(),
18340
+ pinNumber: z125.number().optional(),
18341
+ schStemLength: z125.number().optional(),
18342
+ aliases: z125.array(z125.string()).optional(),
18343
+ layer: z125.string().optional(),
18344
+ layers: z125.array(z125.string()).optional(),
18345
+ schX: z125.number().optional(),
18346
+ schY: z125.number().optional(),
18335
18347
  direction: direction.optional(),
18336
- connectsTo: z124.string().or(z124.array(z124.string())).optional(),
18348
+ connectsTo: z125.string().or(z125.array(z125.string())).optional(),
18337
18349
  kicadPinMetadata: kicadPinMetadata.optional(),
18338
- hasInversionCircle: z124.boolean().optional()
18350
+ hasInversionCircle: z125.boolean().optional()
18339
18351
  });
18340
18352
 
18341
18353
  // lib/components/pcb-note-text.ts
18342
18354
  import { length as length11 } from "circuit-json";
18343
- import { z as z125 } from "zod";
18355
+ import { z as z126 } from "zod";
18344
18356
  var pcbNoteTextProps = pcbLayoutProps.extend({
18345
- text: z125.string(),
18346
- anchorAlignment: z125.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18347
- font: z125.enum(["tscircuit2024"]).optional(),
18357
+ text: z126.string(),
18358
+ anchorAlignment: z126.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18359
+ font: z126.enum(["tscircuit2024"]).optional(),
18348
18360
  fontSize: length11.optional(),
18349
- color: z125.string().optional()
18361
+ color: z126.string().optional()
18350
18362
  });
18351
18363
  expectTypesMatch(true);
18352
18364
 
18353
18365
  // lib/components/pcb-note-rect.ts
18354
18366
  import { distance as distance44 } from "circuit-json";
18355
- import { z as z126 } from "zod";
18367
+ import { z as z127 } from "zod";
18356
18368
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18357
18369
  width: distance44,
18358
18370
  height: distance44,
18359
18371
  strokeWidth: distance44.optional(),
18360
- isFilled: z126.boolean().optional(),
18361
- hasStroke: z126.boolean().optional(),
18362
- isStrokeDashed: z126.boolean().optional(),
18363
- color: z126.string().optional(),
18372
+ isFilled: z127.boolean().optional(),
18373
+ hasStroke: z127.boolean().optional(),
18374
+ isStrokeDashed: z127.boolean().optional(),
18375
+ color: z127.string().optional(),
18364
18376
  cornerRadius: distance44.optional()
18365
18377
  });
18366
18378
  expectTypesMatch(true);
@@ -18370,7 +18382,7 @@ import {
18370
18382
  length as length12,
18371
18383
  route_hint_point as route_hint_point7
18372
18384
  } from "circuit-json";
18373
- import { z as z127 } from "zod";
18385
+ import { z as z128 } from "zod";
18374
18386
  var pcbNotePathProps = pcbLayoutProps.omit({
18375
18387
  pcbLeftEdgeX: true,
18376
18388
  pcbRightEdgeX: true,
@@ -18382,15 +18394,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18382
18394
  pcbOffsetY: true,
18383
18395
  pcbRotation: true
18384
18396
  }).extend({
18385
- route: z127.array(route_hint_point7),
18397
+ route: z128.array(route_hint_point7),
18386
18398
  strokeWidth: length12.optional(),
18387
- color: z127.string().optional()
18399
+ color: z128.string().optional()
18388
18400
  });
18389
18401
  expectTypesMatch(true);
18390
18402
 
18391
18403
  // lib/components/pcb-note-line.ts
18392
18404
  import { distance as distance45 } from "circuit-json";
18393
- import { z as z128 } from "zod";
18405
+ import { z as z129 } from "zod";
18394
18406
  var pcbNoteLineProps = pcbLayoutProps.omit({
18395
18407
  pcbLeftEdgeX: true,
18396
18408
  pcbRightEdgeX: true,
@@ -18407,15 +18419,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18407
18419
  x2: distance45,
18408
18420
  y2: distance45,
18409
18421
  strokeWidth: distance45.optional(),
18410
- color: z128.string().optional(),
18411
- isDashed: z128.boolean().optional()
18422
+ color: z129.string().optional(),
18423
+ isDashed: z129.boolean().optional()
18412
18424
  });
18413
18425
  expectTypesMatch(true);
18414
18426
 
18415
18427
  // lib/components/pcb-note-dimension.ts
18416
18428
  import { distance as distance46, length as length13 } from "circuit-json";
18417
- import { z as z129 } from "zod";
18418
- var dimensionTarget2 = z129.union([z129.string(), point]);
18429
+ import { z as z130 } from "zod";
18430
+ var dimensionTarget2 = z130.union([z130.string(), point]);
18419
18431
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18420
18432
  pcbLeftEdgeX: true,
18421
18433
  pcbRightEdgeX: true,
@@ -18429,101 +18441,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18429
18441
  }).extend({
18430
18442
  from: dimensionTarget2,
18431
18443
  to: dimensionTarget2,
18432
- text: z129.string().optional(),
18444
+ text: z130.string().optional(),
18433
18445
  offset: distance46.optional(),
18434
- font: z129.enum(["tscircuit2024"]).optional(),
18446
+ font: z130.enum(["tscircuit2024"]).optional(),
18435
18447
  fontSize: length13.optional(),
18436
- color: z129.string().optional(),
18448
+ color: z130.string().optional(),
18437
18449
  arrowSize: distance46.optional(),
18438
- units: z129.enum(["in", "mm"]).optional(),
18439
- outerEdgeToEdge: z129.literal(true).optional(),
18440
- centerToCenter: z129.literal(true).optional(),
18441
- innerEdgeToEdge: z129.literal(true).optional()
18450
+ units: z130.enum(["in", "mm"]).optional(),
18451
+ outerEdgeToEdge: z130.literal(true).optional(),
18452
+ centerToCenter: z130.literal(true).optional(),
18453
+ innerEdgeToEdge: z130.literal(true).optional()
18442
18454
  });
18443
18455
  expectTypesMatch(
18444
18456
  true
18445
18457
  );
18446
18458
 
18447
18459
  // lib/platformConfig.ts
18448
- import { z as z130 } from "zod";
18449
- var unvalidatedCircuitJson = z130.array(z130.any()).describe("Circuit JSON");
18450
- var footprintLibraryResult = z130.object({
18451
- footprintCircuitJson: z130.array(z130.any()),
18460
+ import { z as z131 } from "zod";
18461
+ var unvalidatedCircuitJson = z131.array(z131.any()).describe("Circuit JSON");
18462
+ var footprintLibraryResult = z131.object({
18463
+ footprintCircuitJson: z131.array(z131.any()),
18452
18464
  cadModel: cadModelProp.optional()
18453
18465
  });
18454
- var pathToCircuitJsonFn = z130.function().args(z130.string()).returns(z130.promise(footprintLibraryResult)).or(
18455
- z130.function().args(
18456
- z130.string(),
18457
- z130.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18458
- ).returns(z130.promise(footprintLibraryResult))
18466
+ var pathToCircuitJsonFn = z131.function().args(z131.string()).returns(z131.promise(footprintLibraryResult)).or(
18467
+ z131.function().args(
18468
+ z131.string(),
18469
+ z131.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18470
+ ).returns(z131.promise(footprintLibraryResult))
18459
18471
  ).describe("A function that takes a path and returns Circuit JSON");
18460
- var footprintFileParserEntry = z130.object({
18461
- loadFromUrl: z130.function().args(z130.string()).returns(z130.promise(footprintLibraryResult)).describe(
18472
+ var footprintFileParserEntry = z131.object({
18473
+ loadFromUrl: z131.function().args(z131.string()).returns(z131.promise(footprintLibraryResult)).describe(
18462
18474
  "A function that takes a footprint file URL and returns Circuit JSON"
18463
18475
  )
18464
18476
  });
18465
- var spiceEngineSimulationResult = z130.object({
18466
- engineVersionString: z130.string().optional(),
18477
+ var spiceEngineSimulationResult = z131.object({
18478
+ engineVersionString: z131.string().optional(),
18467
18479
  simulationResultCircuitJson: unvalidatedCircuitJson
18468
18480
  });
18469
- var spiceEngineZod = z130.object({
18470
- simulate: z130.function().args(z130.string()).returns(z130.promise(spiceEngineSimulationResult)).describe(
18481
+ var spiceEngineZod = z131.object({
18482
+ simulate: z131.function().args(z131.string()).returns(z131.promise(spiceEngineSimulationResult)).describe(
18471
18483
  "A function that takes a SPICE string and returns a simulation result"
18472
18484
  )
18473
18485
  });
18474
- var defaultSpiceEngine = z130.custom(
18486
+ var defaultSpiceEngine = z131.custom(
18475
18487
  (value) => typeof value === "string"
18476
18488
  );
18477
- var autorouterInstance = z130.object({
18478
- run: z130.function().args().returns(z130.promise(z130.unknown())).describe("Run the autorouter"),
18479
- getOutputSimpleRouteJson: z130.function().args().returns(z130.promise(z130.any())).describe("Get the resulting SimpleRouteJson")
18489
+ var autorouterInstance = z131.object({
18490
+ run: z131.function().args().returns(z131.promise(z131.unknown())).describe("Run the autorouter"),
18491
+ getOutputSimpleRouteJson: z131.function().args().returns(z131.promise(z131.any())).describe("Get the resulting SimpleRouteJson")
18480
18492
  });
18481
- var autorouterDefinition = z130.object({
18482
- createAutorouter: z130.function().args(z130.any(), z130.any().optional()).returns(z130.union([autorouterInstance, z130.promise(autorouterInstance)])).describe("Create an autorouter instance")
18493
+ var autorouterDefinition = z131.object({
18494
+ createAutorouter: z131.function().args(z131.any(), z131.any().optional()).returns(z131.union([autorouterInstance, z131.promise(autorouterInstance)])).describe("Create an autorouter instance")
18483
18495
  });
18484
- var platformFetch = z130.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18485
- var platformConfig = z130.object({
18496
+ var platformFetch = z131.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18497
+ var platformConfig = z131.object({
18486
18498
  partsEngine: partsEngine.optional(),
18487
18499
  autorouter: autorouterProp.optional(),
18488
- autorouterMap: z130.record(z130.string(), autorouterDefinition).optional(),
18500
+ autorouterMap: z131.record(z131.string(), autorouterDefinition).optional(),
18489
18501
  registryApiUrl: url.optional(),
18490
18502
  cloudAutorouterUrl: url.optional(),
18491
- projectName: z130.string().optional(),
18503
+ projectName: z131.string().optional(),
18492
18504
  projectBaseUrl: url.optional(),
18493
- version: z130.string().optional(),
18505
+ version: z131.string().optional(),
18494
18506
  url: url.optional(),
18495
- printBoardInformationToSilkscreen: z130.boolean().optional(),
18496
- includeBoardFiles: z130.array(z130.string()).describe(
18507
+ printBoardInformationToSilkscreen: z131.boolean().optional(),
18508
+ includeBoardFiles: z131.array(z131.string()).describe(
18497
18509
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18498
18510
  ).optional(),
18499
- snapshotsDir: z130.string().describe(
18511
+ snapshotsDir: z131.string().describe(
18500
18512
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18501
18513
  ).optional(),
18502
18514
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18503
- unitPreference: z130.enum(["mm", "in", "mil"]).optional(),
18504
- localCacheEngine: z130.any().optional(),
18505
- pcbDisabled: z130.boolean().optional(),
18506
- routingDisabled: z130.boolean().optional(),
18507
- schematicDisabled: z130.boolean().optional(),
18508
- partsEngineDisabled: z130.boolean().optional(),
18509
- drcChecksDisabled: z130.boolean().optional(),
18510
- netlistDrcChecksDisabled: z130.boolean().optional(),
18511
- routingDrcChecksDisabled: z130.boolean().optional(),
18512
- placementDrcChecksDisabled: z130.boolean().optional(),
18513
- pinSpecificationDrcChecksDisabled: z130.boolean().optional(),
18514
- spiceEngineMap: z130.record(z130.string(), spiceEngineZod).optional(),
18515
- footprintLibraryMap: z130.record(
18516
- z130.string(),
18517
- z130.union([
18515
+ unitPreference: z131.enum(["mm", "in", "mil"]).optional(),
18516
+ localCacheEngine: z131.any().optional(),
18517
+ pcbDisabled: z131.boolean().optional(),
18518
+ routingDisabled: z131.boolean().optional(),
18519
+ schematicDisabled: z131.boolean().optional(),
18520
+ partsEngineDisabled: z131.boolean().optional(),
18521
+ drcChecksDisabled: z131.boolean().optional(),
18522
+ netlistDrcChecksDisabled: z131.boolean().optional(),
18523
+ routingDrcChecksDisabled: z131.boolean().optional(),
18524
+ placementDrcChecksDisabled: z131.boolean().optional(),
18525
+ pinSpecificationDrcChecksDisabled: z131.boolean().optional(),
18526
+ spiceEngineMap: z131.record(z131.string(), spiceEngineZod).optional(),
18527
+ footprintLibraryMap: z131.record(
18528
+ z131.string(),
18529
+ z131.union([
18518
18530
  pathToCircuitJsonFn,
18519
- z130.record(
18520
- z130.string(),
18521
- z130.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18531
+ z131.record(
18532
+ z131.string(),
18533
+ z131.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18522
18534
  )
18523
18535
  ])
18524
18536
  ).optional(),
18525
- footprintFileParserMap: z130.record(z130.string(), footprintFileParserEntry).optional(),
18526
- resolveProjectStaticFileImportUrl: z130.function().args(z130.string()).returns(z130.promise(z130.string())).describe(
18537
+ footprintFileParserMap: z131.record(z131.string(), footprintFileParserEntry).optional(),
18538
+ resolveProjectStaticFileImportUrl: z131.function().args(z131.string()).returns(z131.promise(z131.string())).describe(
18527
18539
  "A function that returns a string URL for static files for the project"
18528
18540
  ).optional(),
18529
18541
  platformFetch: platformFetch.optional()
@@ -18735,6 +18747,7 @@ export {
18735
18747
  schematicRectProps,
18736
18748
  schematicRowProps,
18737
18749
  schematicSectionProps,
18750
+ schematicSheetProps,
18738
18751
  schematicSymbolSize,
18739
18752
  schematicTableProps,
18740
18753
  schematicTextProps,