@tscircuit/props 0.0.520 → 0.0.522

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
@@ -436,6 +436,9 @@ var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
436
436
  key: z16.any().optional(),
437
437
  name: z16.string(),
438
438
  displayName: z16.string().optional(),
439
+ schSectionName: z16.string().optional().describe(
440
+ 'This component will be drawn as part of this section e.g. "Power"'
441
+ ),
439
442
  datasheetUrl: url.optional(),
440
443
  cadModel: cadModelProp.optional(),
441
444
  kicadFootprintMetadata: kicadFootprintMetadata.optional(),
@@ -16407,6 +16410,7 @@ var subcircuitGroupProps = baseGroupProps.extend({
16407
16410
  defaultTraceWidth: length3.optional(),
16408
16411
  minTraceWidth: length3.optional(),
16409
16412
  minViaHoleEdgeToViaHoleEdgeClearance: length3.optional(),
16413
+ minViaEdgeToPadEdgeClearance: length3.optional(),
16410
16414
  minPlatedHoleDrillEdgeToDrillEdgeClearance: length3.optional(),
16411
16415
  minTraceToPadEdgeClearance: length3.optional(),
16412
16416
  minPadEdgeToPadEdgeClearance: length3.optional(),
@@ -18075,42 +18079,52 @@ var schematicCellProps = z111.object({
18075
18079
  });
18076
18080
  expectTypesMatch(true);
18077
18081
 
18082
+ // lib/components/schematic-section.ts
18083
+ import { z as z112 } from "zod";
18084
+ var schematicSectionProps = z112.object({
18085
+ displayName: z112.string().optional(),
18086
+ name: z112.string()
18087
+ });
18088
+ expectTypesMatch(
18089
+ true
18090
+ );
18091
+
18078
18092
  // lib/components/copper-text.ts
18079
18093
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18080
- import { z as z112 } from "zod";
18094
+ import { z as z113 } from "zod";
18081
18095
  var copperTextProps = pcbLayoutProps.extend({
18082
- text: z112.string(),
18096
+ text: z113.string(),
18083
18097
  anchorAlignment: ninePointAnchor.default("center"),
18084
- font: z112.enum(["tscircuit2024"]).optional(),
18098
+ font: z113.enum(["tscircuit2024"]).optional(),
18085
18099
  fontSize: length8.optional(),
18086
- layers: z112.array(layer_ref10).optional(),
18087
- knockout: z112.boolean().optional(),
18088
- mirrored: z112.boolean().optional()
18100
+ layers: z113.array(layer_ref10).optional(),
18101
+ knockout: z113.boolean().optional(),
18102
+ mirrored: z113.boolean().optional()
18089
18103
  });
18090
18104
 
18091
18105
  // lib/components/silkscreen-text.ts
18092
18106
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18093
- import { z as z113 } from "zod";
18107
+ import { z as z114 } from "zod";
18094
18108
  var silkscreenTextProps = pcbLayoutProps.extend({
18095
- text: z113.string(),
18109
+ text: z114.string(),
18096
18110
  anchorAlignment: ninePointAnchor.default("center"),
18097
- font: z113.enum(["tscircuit2024"]).optional(),
18111
+ font: z114.enum(["tscircuit2024"]).optional(),
18098
18112
  fontSize: length9.optional(),
18099
18113
  /**
18100
18114
  * If true, text will knock out underlying silkscreen
18101
18115
  */
18102
- isKnockout: z113.boolean().optional(),
18116
+ isKnockout: z114.boolean().optional(),
18103
18117
  knockoutPadding: length9.optional(),
18104
18118
  knockoutPaddingLeft: length9.optional(),
18105
18119
  knockoutPaddingRight: length9.optional(),
18106
18120
  knockoutPaddingTop: length9.optional(),
18107
18121
  knockoutPaddingBottom: length9.optional(),
18108
- layers: z113.array(layer_ref11).optional()
18122
+ layers: z114.array(layer_ref11).optional()
18109
18123
  });
18110
18124
 
18111
18125
  // lib/components/silkscreen-path.ts
18112
18126
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18113
- import { z as z114 } from "zod";
18127
+ import { z as z115 } from "zod";
18114
18128
  var silkscreenPathProps = pcbLayoutProps.omit({
18115
18129
  pcbLeftEdgeX: true,
18116
18130
  pcbRightEdgeX: true,
@@ -18122,7 +18136,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18122
18136
  pcbOffsetY: true,
18123
18137
  pcbRotation: true
18124
18138
  }).extend({
18125
- route: z114.array(route_hint_point5),
18139
+ route: z115.array(route_hint_point5),
18126
18140
  strokeWidth: length10.optional()
18127
18141
  });
18128
18142
 
@@ -18144,10 +18158,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18144
18158
 
18145
18159
  // lib/components/silkscreen-rect.ts
18146
18160
  import { distance as distance39 } from "circuit-json";
18147
- import { z as z115 } from "zod";
18161
+ import { z as z116 } from "zod";
18148
18162
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18149
- filled: z115.boolean().default(true).optional(),
18150
- stroke: z115.enum(["dashed", "solid", "none"]).optional(),
18163
+ filled: z116.boolean().default(true).optional(),
18164
+ stroke: z116.enum(["dashed", "solid", "none"]).optional(),
18151
18165
  strokeWidth: distance39.optional(),
18152
18166
  width: distance39,
18153
18167
  height: distance39,
@@ -18156,73 +18170,73 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18156
18170
 
18157
18171
  // lib/components/silkscreen-circle.ts
18158
18172
  import { distance as distance40 } from "circuit-json";
18159
- import { z as z116 } from "zod";
18173
+ import { z as z117 } from "zod";
18160
18174
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18161
- isFilled: z116.boolean().optional(),
18162
- isOutline: z116.boolean().optional(),
18175
+ isFilled: z117.boolean().optional(),
18176
+ isOutline: z117.boolean().optional(),
18163
18177
  strokeWidth: distance40.optional(),
18164
18178
  radius: distance40
18165
18179
  });
18166
18180
 
18167
18181
  // lib/components/trace-hint.ts
18168
18182
  import { distance as distance41, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18169
- import { z as z117 } from "zod";
18170
- var routeHintPointProps = z117.object({
18183
+ import { z as z118 } from "zod";
18184
+ var routeHintPointProps = z118.object({
18171
18185
  x: distance41,
18172
18186
  y: distance41,
18173
- via: z117.boolean().optional(),
18187
+ via: z118.boolean().optional(),
18174
18188
  toLayer: layer_ref12.optional()
18175
18189
  });
18176
- var traceHintProps = z117.object({
18177
- for: z117.string().optional().describe(
18190
+ var traceHintProps = z118.object({
18191
+ for: z118.string().optional().describe(
18178
18192
  "Selector for the port you're targeting, not required if you're inside a trace"
18179
18193
  ),
18180
- order: z117.number().optional(),
18194
+ order: z118.number().optional(),
18181
18195
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18182
- offsets: z117.array(route_hint_point6).or(z117.array(routeHintPointProps)).optional(),
18183
- traceWidth: z117.number().optional()
18196
+ offsets: z118.array(route_hint_point6).or(z118.array(routeHintPointProps)).optional(),
18197
+ traceWidth: z118.number().optional()
18184
18198
  });
18185
18199
 
18186
18200
  // lib/components/port.ts
18187
- import { z as z118 } from "zod";
18201
+ import { z as z119 } from "zod";
18188
18202
  var portProps = commonLayoutProps.extend({
18189
- name: z118.string(),
18190
- pinNumber: z118.number().optional(),
18191
- schStemLength: z118.number().optional(),
18192
- aliases: z118.array(z118.string()).optional(),
18193
- layer: z118.string().optional(),
18194
- layers: z118.array(z118.string()).optional(),
18195
- schX: z118.number().optional(),
18196
- schY: z118.number().optional(),
18203
+ name: z119.string(),
18204
+ pinNumber: z119.number().optional(),
18205
+ schStemLength: z119.number().optional(),
18206
+ aliases: z119.array(z119.string()).optional(),
18207
+ layer: z119.string().optional(),
18208
+ layers: z119.array(z119.string()).optional(),
18209
+ schX: z119.number().optional(),
18210
+ schY: z119.number().optional(),
18197
18211
  direction,
18198
- connectsTo: z118.string().or(z118.array(z118.string())).optional(),
18212
+ connectsTo: z119.string().or(z119.array(z119.string())).optional(),
18199
18213
  kicadPinMetadata: kicadPinMetadata.optional(),
18200
- hasInversionCircle: z118.boolean().optional()
18214
+ hasInversionCircle: z119.boolean().optional()
18201
18215
  });
18202
18216
 
18203
18217
  // lib/components/pcb-note-text.ts
18204
18218
  import { length as length11 } from "circuit-json";
18205
- import { z as z119 } from "zod";
18219
+ import { z as z120 } from "zod";
18206
18220
  var pcbNoteTextProps = pcbLayoutProps.extend({
18207
- text: z119.string(),
18208
- anchorAlignment: z119.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18209
- font: z119.enum(["tscircuit2024"]).optional(),
18221
+ text: z120.string(),
18222
+ anchorAlignment: z120.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18223
+ font: z120.enum(["tscircuit2024"]).optional(),
18210
18224
  fontSize: length11.optional(),
18211
- color: z119.string().optional()
18225
+ color: z120.string().optional()
18212
18226
  });
18213
18227
  expectTypesMatch(true);
18214
18228
 
18215
18229
  // lib/components/pcb-note-rect.ts
18216
18230
  import { distance as distance42 } from "circuit-json";
18217
- import { z as z120 } from "zod";
18231
+ import { z as z121 } from "zod";
18218
18232
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18219
18233
  width: distance42,
18220
18234
  height: distance42,
18221
18235
  strokeWidth: distance42.optional(),
18222
- isFilled: z120.boolean().optional(),
18223
- hasStroke: z120.boolean().optional(),
18224
- isStrokeDashed: z120.boolean().optional(),
18225
- color: z120.string().optional(),
18236
+ isFilled: z121.boolean().optional(),
18237
+ hasStroke: z121.boolean().optional(),
18238
+ isStrokeDashed: z121.boolean().optional(),
18239
+ color: z121.string().optional(),
18226
18240
  cornerRadius: distance42.optional()
18227
18241
  });
18228
18242
  expectTypesMatch(true);
@@ -18232,7 +18246,7 @@ import {
18232
18246
  length as length12,
18233
18247
  route_hint_point as route_hint_point7
18234
18248
  } from "circuit-json";
18235
- import { z as z121 } from "zod";
18249
+ import { z as z122 } from "zod";
18236
18250
  var pcbNotePathProps = pcbLayoutProps.omit({
18237
18251
  pcbLeftEdgeX: true,
18238
18252
  pcbRightEdgeX: true,
@@ -18244,15 +18258,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18244
18258
  pcbOffsetY: true,
18245
18259
  pcbRotation: true
18246
18260
  }).extend({
18247
- route: z121.array(route_hint_point7),
18261
+ route: z122.array(route_hint_point7),
18248
18262
  strokeWidth: length12.optional(),
18249
- color: z121.string().optional()
18263
+ color: z122.string().optional()
18250
18264
  });
18251
18265
  expectTypesMatch(true);
18252
18266
 
18253
18267
  // lib/components/pcb-note-line.ts
18254
18268
  import { distance as distance43 } from "circuit-json";
18255
- import { z as z122 } from "zod";
18269
+ import { z as z123 } from "zod";
18256
18270
  var pcbNoteLineProps = pcbLayoutProps.omit({
18257
18271
  pcbLeftEdgeX: true,
18258
18272
  pcbRightEdgeX: true,
@@ -18269,15 +18283,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18269
18283
  x2: distance43,
18270
18284
  y2: distance43,
18271
18285
  strokeWidth: distance43.optional(),
18272
- color: z122.string().optional(),
18273
- isDashed: z122.boolean().optional()
18286
+ color: z123.string().optional(),
18287
+ isDashed: z123.boolean().optional()
18274
18288
  });
18275
18289
  expectTypesMatch(true);
18276
18290
 
18277
18291
  // lib/components/pcb-note-dimension.ts
18278
18292
  import { distance as distance44, length as length13 } from "circuit-json";
18279
- import { z as z123 } from "zod";
18280
- var dimensionTarget2 = z123.union([z123.string(), point]);
18293
+ import { z as z124 } from "zod";
18294
+ var dimensionTarget2 = z124.union([z124.string(), point]);
18281
18295
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18282
18296
  pcbLeftEdgeX: true,
18283
18297
  pcbRightEdgeX: true,
@@ -18291,101 +18305,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18291
18305
  }).extend({
18292
18306
  from: dimensionTarget2,
18293
18307
  to: dimensionTarget2,
18294
- text: z123.string().optional(),
18308
+ text: z124.string().optional(),
18295
18309
  offset: distance44.optional(),
18296
- font: z123.enum(["tscircuit2024"]).optional(),
18310
+ font: z124.enum(["tscircuit2024"]).optional(),
18297
18311
  fontSize: length13.optional(),
18298
- color: z123.string().optional(),
18312
+ color: z124.string().optional(),
18299
18313
  arrowSize: distance44.optional(),
18300
- units: z123.enum(["in", "mm"]).optional(),
18301
- outerEdgeToEdge: z123.literal(true).optional(),
18302
- centerToCenter: z123.literal(true).optional(),
18303
- innerEdgeToEdge: z123.literal(true).optional()
18314
+ units: z124.enum(["in", "mm"]).optional(),
18315
+ outerEdgeToEdge: z124.literal(true).optional(),
18316
+ centerToCenter: z124.literal(true).optional(),
18317
+ innerEdgeToEdge: z124.literal(true).optional()
18304
18318
  });
18305
18319
  expectTypesMatch(
18306
18320
  true
18307
18321
  );
18308
18322
 
18309
18323
  // lib/platformConfig.ts
18310
- import { z as z124 } from "zod";
18311
- var unvalidatedCircuitJson = z124.array(z124.any()).describe("Circuit JSON");
18312
- var footprintLibraryResult = z124.object({
18313
- footprintCircuitJson: z124.array(z124.any()),
18324
+ import { z as z125 } from "zod";
18325
+ var unvalidatedCircuitJson = z125.array(z125.any()).describe("Circuit JSON");
18326
+ var footprintLibraryResult = z125.object({
18327
+ footprintCircuitJson: z125.array(z125.any()),
18314
18328
  cadModel: cadModelProp.optional()
18315
18329
  });
18316
- var pathToCircuitJsonFn = z124.function().args(z124.string()).returns(z124.promise(footprintLibraryResult)).or(
18317
- z124.function().args(
18318
- z124.string(),
18319
- z124.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18320
- ).returns(z124.promise(footprintLibraryResult))
18330
+ var pathToCircuitJsonFn = z125.function().args(z125.string()).returns(z125.promise(footprintLibraryResult)).or(
18331
+ z125.function().args(
18332
+ z125.string(),
18333
+ z125.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18334
+ ).returns(z125.promise(footprintLibraryResult))
18321
18335
  ).describe("A function that takes a path and returns Circuit JSON");
18322
- var footprintFileParserEntry = z124.object({
18323
- loadFromUrl: z124.function().args(z124.string()).returns(z124.promise(footprintLibraryResult)).describe(
18336
+ var footprintFileParserEntry = z125.object({
18337
+ loadFromUrl: z125.function().args(z125.string()).returns(z125.promise(footprintLibraryResult)).describe(
18324
18338
  "A function that takes a footprint file URL and returns Circuit JSON"
18325
18339
  )
18326
18340
  });
18327
- var spiceEngineSimulationResult = z124.object({
18328
- engineVersionString: z124.string().optional(),
18341
+ var spiceEngineSimulationResult = z125.object({
18342
+ engineVersionString: z125.string().optional(),
18329
18343
  simulationResultCircuitJson: unvalidatedCircuitJson
18330
18344
  });
18331
- var spiceEngineZod = z124.object({
18332
- simulate: z124.function().args(z124.string()).returns(z124.promise(spiceEngineSimulationResult)).describe(
18345
+ var spiceEngineZod = z125.object({
18346
+ simulate: z125.function().args(z125.string()).returns(z125.promise(spiceEngineSimulationResult)).describe(
18333
18347
  "A function that takes a SPICE string and returns a simulation result"
18334
18348
  )
18335
18349
  });
18336
- var defaultSpiceEngine = z124.custom(
18350
+ var defaultSpiceEngine = z125.custom(
18337
18351
  (value) => typeof value === "string"
18338
18352
  );
18339
- var autorouterInstance = z124.object({
18340
- run: z124.function().args().returns(z124.promise(z124.unknown())).describe("Run the autorouter"),
18341
- getOutputSimpleRouteJson: z124.function().args().returns(z124.promise(z124.any())).describe("Get the resulting SimpleRouteJson")
18353
+ var autorouterInstance = z125.object({
18354
+ run: z125.function().args().returns(z125.promise(z125.unknown())).describe("Run the autorouter"),
18355
+ getOutputSimpleRouteJson: z125.function().args().returns(z125.promise(z125.any())).describe("Get the resulting SimpleRouteJson")
18342
18356
  });
18343
- var autorouterDefinition = z124.object({
18344
- createAutorouter: z124.function().args(z124.any(), z124.any().optional()).returns(z124.union([autorouterInstance, z124.promise(autorouterInstance)])).describe("Create an autorouter instance")
18357
+ var autorouterDefinition = z125.object({
18358
+ createAutorouter: z125.function().args(z125.any(), z125.any().optional()).returns(z125.union([autorouterInstance, z125.promise(autorouterInstance)])).describe("Create an autorouter instance")
18345
18359
  });
18346
- var platformFetch = z124.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18347
- var platformConfig = z124.object({
18360
+ var platformFetch = z125.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18361
+ var platformConfig = z125.object({
18348
18362
  partsEngine: partsEngine.optional(),
18349
18363
  autorouter: autorouterProp.optional(),
18350
- autorouterMap: z124.record(z124.string(), autorouterDefinition).optional(),
18364
+ autorouterMap: z125.record(z125.string(), autorouterDefinition).optional(),
18351
18365
  registryApiUrl: url.optional(),
18352
18366
  cloudAutorouterUrl: url.optional(),
18353
- projectName: z124.string().optional(),
18367
+ projectName: z125.string().optional(),
18354
18368
  projectBaseUrl: url.optional(),
18355
- version: z124.string().optional(),
18369
+ version: z125.string().optional(),
18356
18370
  url: url.optional(),
18357
- printBoardInformationToSilkscreen: z124.boolean().optional(),
18358
- includeBoardFiles: z124.array(z124.string()).describe(
18371
+ printBoardInformationToSilkscreen: z125.boolean().optional(),
18372
+ includeBoardFiles: z125.array(z125.string()).describe(
18359
18373
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18360
18374
  ).optional(),
18361
- snapshotsDir: z124.string().describe(
18375
+ snapshotsDir: z125.string().describe(
18362
18376
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18363
18377
  ).optional(),
18364
18378
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18365
- unitPreference: z124.enum(["mm", "in", "mil"]).optional(),
18366
- localCacheEngine: z124.any().optional(),
18367
- pcbDisabled: z124.boolean().optional(),
18368
- routingDisabled: z124.boolean().optional(),
18369
- schematicDisabled: z124.boolean().optional(),
18370
- partsEngineDisabled: z124.boolean().optional(),
18371
- drcChecksDisabled: z124.boolean().optional(),
18372
- netlistDrcChecksDisabled: z124.boolean().optional(),
18373
- routingDrcChecksDisabled: z124.boolean().optional(),
18374
- placementDrcChecksDisabled: z124.boolean().optional(),
18375
- pinSpecificationDrcChecksDisabled: z124.boolean().optional(),
18376
- spiceEngineMap: z124.record(z124.string(), spiceEngineZod).optional(),
18377
- footprintLibraryMap: z124.record(
18378
- z124.string(),
18379
- z124.union([
18379
+ unitPreference: z125.enum(["mm", "in", "mil"]).optional(),
18380
+ localCacheEngine: z125.any().optional(),
18381
+ pcbDisabled: z125.boolean().optional(),
18382
+ routingDisabled: z125.boolean().optional(),
18383
+ schematicDisabled: z125.boolean().optional(),
18384
+ partsEngineDisabled: z125.boolean().optional(),
18385
+ drcChecksDisabled: z125.boolean().optional(),
18386
+ netlistDrcChecksDisabled: z125.boolean().optional(),
18387
+ routingDrcChecksDisabled: z125.boolean().optional(),
18388
+ placementDrcChecksDisabled: z125.boolean().optional(),
18389
+ pinSpecificationDrcChecksDisabled: z125.boolean().optional(),
18390
+ spiceEngineMap: z125.record(z125.string(), spiceEngineZod).optional(),
18391
+ footprintLibraryMap: z125.record(
18392
+ z125.string(),
18393
+ z125.union([
18380
18394
  pathToCircuitJsonFn,
18381
- z124.record(
18382
- z124.string(),
18383
- z124.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18395
+ z125.record(
18396
+ z125.string(),
18397
+ z125.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18384
18398
  )
18385
18399
  ])
18386
18400
  ).optional(),
18387
- footprintFileParserMap: z124.record(z124.string(), footprintFileParserEntry).optional(),
18388
- resolveProjectStaticFileImportUrl: z124.function().args(z124.string()).returns(z124.promise(z124.string())).describe(
18401
+ footprintFileParserMap: z125.record(z125.string(), footprintFileParserEntry).optional(),
18402
+ resolveProjectStaticFileImportUrl: z125.function().args(z125.string()).returns(z125.promise(z125.string())).describe(
18389
18403
  "A function that returns a string URL for static files for the project"
18390
18404
  ).optional(),
18391
18405
  platformFetch: platformFetch.optional()
@@ -18590,6 +18604,7 @@ export {
18590
18604
  schematicPortArrangement,
18591
18605
  schematicRectProps,
18592
18606
  schematicRowProps,
18607
+ schematicSectionProps,
18593
18608
  schematicSymbolSize,
18594
18609
  schematicTableProps,
18595
18610
  schematicTextProps,