@tscircuit/props 0.0.521 → 0.0.523

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