@tscircuit/props 0.0.223 → 0.0.225

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
@@ -367,8 +367,8 @@ var baseGroupProps = commonLayoutProps.extend({
367
367
  schHeight: length.optional(),
368
368
  pcbLayout: layoutConfig.optional(),
369
369
  schLayout: layoutConfig.optional(),
370
- cellBorder: border.optional(),
371
- border: border.optional()
370
+ cellBorder: border.nullable().optional(),
371
+ border: border.nullable().optional()
372
372
  });
373
373
  var partsEngine = z21.custom((v) => "findPart" in v);
374
374
  var subcircuitGroupProps = baseGroupProps.extend({
@@ -516,7 +516,7 @@ var distanceHiddenUndefined = z29.custom().transform((a) => {
516
516
  return void 0;
517
517
  return distance10.parse(a);
518
518
  });
519
- var platedHoleProps = z29.union([
519
+ var platedHoleProps = z29.discriminatedUnion("shape", [
520
520
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
521
521
  name: z29.string().optional(),
522
522
  shape: z29.literal("circle"),
@@ -548,21 +548,14 @@ var platedHoleProps = z29.union([
548
548
  }),
549
549
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
550
550
  name: z29.string().optional(),
551
+ shape: z29.literal("circular_hole_with_rect_pad"),
551
552
  holeDiameter: distance10,
552
553
  rectPadWidth: distance10,
553
554
  rectPadHeight: distance10,
554
555
  holeShape: z29.literal("circle").optional(),
555
556
  padShape: z29.literal("rect").optional(),
556
- shape: z29.literal("circular_hole_with_rect_pad").optional(),
557
557
  portHints: portHints.optional()
558
- }).refine(
559
- (prop) => {
560
- return prop.shape === "circular_hole_with_rect_pad" ? prop.holeDiameter && prop.rectPadWidth && prop.rectPadHeight : true;
561
- },
562
- {
563
- message: "Missing required fields for circular_hole_with_rect_pad"
564
- }
565
- ),
558
+ }),
566
559
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
567
560
  name: z29.string().optional(),
568
561
  shape: z29.literal("pill_hole_with_rect_pad"),