@tscircuit/core 0.0.30 → 0.0.31

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.d.ts CHANGED
@@ -6,7 +6,7 @@ import { ReactElement } from 'react';
6
6
  import { Matrix } from 'transformation-matrix';
7
7
  import { SchSymbol, BaseSymbolName } from 'schematic-symbols';
8
8
  import * as Props from '@tscircuit/props';
9
- import { traceProps, groupProps, boardProps, footprintProps, smtPadProps, resistorProps, ledProps, capacitorProps, traceHintProps, chipProps, jumperProps, silkscreenPathProps, platedHoleProps } from '@tscircuit/props';
9
+ import { traceProps, groupProps, boardProps, footprintProps, smtPadProps, resistorProps, ledProps, capacitorProps, traceHintProps, chipProps, jumperProps, silkscreenPathProps, platedHoleProps, constraintProps } from '@tscircuit/props';
10
10
 
11
11
  declare class Circuit {
12
12
  firstChild: PrimitiveComponent | null;
@@ -30,15 +30,18 @@ declare class Circuit {
30
30
  tscircuitApiKey?: string;
31
31
  }): Promise<void>;
32
32
  computeSchematicGlobalTransform(): Matrix;
33
- computePcbGlobalTransform(): Matrix;
33
+ _computePcbGlobalTransformBeforeLayout(): Matrix;
34
34
  selectAll(selector: string): PrimitiveComponent[];
35
35
  selectOne(selector: string, opts?: {
36
36
  type?: "component" | "port";
37
37
  }): PrimitiveComponent | null;
38
38
  }
39
+ /**
40
+ * @deprecated
41
+ */
39
42
  declare const Project: typeof Circuit;
40
43
 
41
- declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "SourceRender", "SourceParentAttachment", "PortDiscovery", "PortMatching", "SourceTraceRender", "SchematicComponentRender", "SchematicLayout", "SchematicPortRender", "SchematicTraceRender", "PcbComponentRender", "PcbPortRender", "PcbPrimitiveRender", "PcbParentAttachment", "PcbLayout", "PcbTraceRender", "PcbRouteNetIslands", "PcbComponentSizeCalculation", "CadModelRender"];
44
+ declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "SourceRender", "SourceParentAttachment", "PortDiscovery", "PortMatching", "SourceTraceRender", "SchematicComponentRender", "SchematicLayout", "SchematicPortRender", "SchematicTraceRender", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbParentAttachment", "PcbLayout", "PcbTraceRender", "PcbRouteNetIslands", "PcbComponentSizeCalculation", "CadModelRender"];
42
45
  type RenderPhase = (typeof orderedRenderPhases)[number];
43
46
  type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
44
47
  type RenderPhaseStates = Record<RenderPhase, {
@@ -105,6 +108,17 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
105
108
  * components share the same names) unless you explicitly break out some ports
106
109
  */
107
110
  get isSubcircuit(): any;
111
+ /**
112
+ * A primitive container is a component that contains one or more ports and
113
+ * primitive components that are designed to interact.
114
+ *
115
+ * For example a resistor contains ports and smtpads that interact, so the
116
+ * resistor is a primitive container. Inside a primitive container, the ports
117
+ * and pads are likely to reference each other and look for eachother during
118
+ * the port matching phase.
119
+ *
120
+ */
121
+ isPrimitiveContainer: boolean;
108
122
  source_group_id: string | null;
109
123
  source_component_id: string | null;
110
124
  schematic_component_id: string | null;
@@ -122,9 +136,38 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
122
136
  * components, including this component's translation and rotation.
123
137
  *
124
138
  * This is used to compute this component's position as well as all children
125
- * components positions
139
+ * components positions before layout is applied
140
+ */
141
+ _computePcbGlobalTransformBeforeLayout(): Matrix;
142
+ getPrimitiveContainer(): PrimitiveComponent | null;
143
+ /**
144
+ * Compute the bounds of this component the circuit json elements associated
145
+ * with it.
146
+ */
147
+ _getCircuitJsonBounds(): {
148
+ center: {
149
+ x: number;
150
+ y: number;
151
+ };
152
+ bounds: {
153
+ left: number;
154
+ top: number;
155
+ right: number;
156
+ bottom: number;
157
+ };
158
+ width: number;
159
+ height: number;
160
+ };
161
+ /**
162
+ * Set the position of this component from the layout solver. This method
163
+ * should operate using CircuitJson associated with this component, like
164
+ * _getCircuitJsonBounds it can be called multiple times as different
165
+ * parents apply layout to their children.
126
166
  */
127
- computePcbGlobalTransform(): Matrix;
167
+ _setPositionFromLayout(newCenter: {
168
+ x: number;
169
+ y: number;
170
+ }): void;
128
171
  /**
129
172
  * Computes a transformation matrix from the props of this component for
130
173
  * schematic components
@@ -144,11 +187,11 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
144
187
  x: number;
145
188
  y: number;
146
189
  } | null;
147
- getGlobalPcbPosition(): {
190
+ _getGlobalPcbPositionBeforeLayout(): {
148
191
  x: number;
149
192
  y: number;
150
193
  };
151
- getGlobalSchematicPosition(): {
194
+ _getGlobalSchematicPositionBeforeLayout(): {
152
195
  x: number;
153
196
  y: number;
154
197
  };
@@ -465,11 +508,11 @@ declare class Port extends PrimitiveComponent<typeof portProps> {
465
508
  matchedComponents: PrimitiveComponent[];
466
509
  facingDirection: "up" | "down" | "left" | "right" | null;
467
510
  constructor(props: z.input<typeof portProps>);
468
- getGlobalPcbPosition(): {
511
+ _getGlobalPcbPositionBeforeLayout(): {
469
512
  x: number;
470
513
  y: number;
471
514
  };
472
- getGlobalSchematicPosition(): {
515
+ _getGlobalSchematicPositionBeforeLayout(): {
473
516
  x: number;
474
517
  y: number;
475
518
  };
@@ -489,11 +532,6 @@ declare class Port extends PrimitiveComponent<typeof portProps> {
489
532
  _getDirectlyConnectedTraces(): Trace[];
490
533
  doInitialSourceRender(): void;
491
534
  doInitialSourceParentAttachment(): void;
492
- /**
493
- * For PcbPorts, we use the parent attachment phase to determine where to place
494
- * the pcb_port (prior to this phase, the smtpad/platedhole isn't guaranteed
495
- * to exist)
496
- */
497
535
  doInitialPcbPortRender(): void;
498
536
  doInitialSchematicPortRender(): void;
499
537
  }
@@ -525,6 +563,7 @@ type PortMap<T extends string> = {
525
563
  */
526
564
  declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends string = never> extends PrimitiveComponent<ZodProps> {
527
565
  reactSubtrees: Array<ReactSubtree>;
566
+ isPrimitiveContainer: boolean;
528
567
  constructor(props: z.input<ZodProps>);
529
568
  /**
530
569
  * Override this method for better control over the auto-discovery of ports.
@@ -634,10 +673,15 @@ declare class Board extends Group<typeof boardProps> {
634
673
  };
635
674
  doInitialPcbComponentRender(): void;
636
675
  removePcbComponentRender(): void;
637
- computePcbGlobalTransform(): Matrix;
676
+ _computePcbGlobalTransformBeforeLayout(): Matrix;
638
677
  }
639
678
 
640
679
  declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
680
+ /**
681
+ * A footprint is a constrainedlayout, the db elements are adjusted according
682
+ * to any constraints that are defined.
683
+ */
684
+ doInitialPcbFootprintLayout(): void;
641
685
  }
642
686
 
643
687
  declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
@@ -646,8 +690,8 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
646
690
  isPcbPrimitive: boolean;
647
691
  get config(): {
648
692
  zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
649
- pcbX: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
650
- pcbY: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
693
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
694
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
651
695
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
652
696
  layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
653
697
  name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
@@ -660,27 +704,27 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
660
704
  }>>;
661
705
  }, "pcbRotation">, {
662
706
  shape: zod.ZodLiteral<"circle">;
663
- radius: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
707
+ radius: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
664
708
  portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
665
709
  }>, "strip", zod.ZodTypeAny, {
666
- pcbX: number;
667
- pcbY: number;
668
710
  shape: "circle";
711
+ radius: number;
712
+ pcbX?: number | undefined;
713
+ pcbY?: number | undefined;
669
714
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
670
- radius?: number | undefined;
671
715
  portHints?: (string | number)[] | undefined;
672
716
  }, {
673
- pcbX: string | number;
674
- pcbY: string | number;
675
717
  shape: "circle";
718
+ radius: string | number;
719
+ pcbX?: string | number | undefined;
720
+ pcbY?: string | number | undefined;
676
721
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
677
722
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
678
723
  } | undefined;
679
- radius?: string | number | undefined;
680
724
  portHints?: (string | number)[] | undefined;
681
725
  }>, zod.ZodObject<zod.objectUtil.extendShape<Omit<{
682
- pcbX: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
683
- pcbY: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
726
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
727
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
684
728
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
685
729
  layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
686
730
  name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
@@ -693,27 +737,27 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
693
737
  }>>;
694
738
  }, "pcbRotation">, {
695
739
  shape: zod.ZodLiteral<"rect">;
696
- width: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
697
- height: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
740
+ width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
741
+ height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
698
742
  portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
699
743
  }>, "strip", zod.ZodTypeAny, {
700
- pcbX: number;
701
- pcbY: number;
702
744
  shape: "rect";
745
+ width: number;
746
+ height: number;
747
+ pcbX?: number | undefined;
748
+ pcbY?: number | undefined;
703
749
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
704
750
  portHints?: (string | number)[] | undefined;
705
- width?: number | undefined;
706
- height?: number | undefined;
707
751
  }, {
708
- pcbX: string | number;
709
- pcbY: string | number;
710
752
  shape: "rect";
753
+ width: string | number;
754
+ height: string | number;
755
+ pcbX?: string | number | undefined;
756
+ pcbY?: string | number | undefined;
711
757
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
712
758
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
713
759
  } | undefined;
714
760
  portHints?: (string | number)[] | undefined;
715
- width?: string | number | undefined;
716
- height?: string | number | undefined;
717
761
  }>]>;
718
762
  };
719
763
  getPcbSize(): {
@@ -722,6 +766,24 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
722
766
  };
723
767
  doInitialPortMatching(): void;
724
768
  doInitialPcbPrimitiveRender(): void;
769
+ _getCircuitJsonBounds(): {
770
+ center: {
771
+ x: number;
772
+ y: number;
773
+ };
774
+ bounds: {
775
+ left: number;
776
+ top: number;
777
+ right: number;
778
+ bottom: number;
779
+ };
780
+ width: number;
781
+ height: number;
782
+ };
783
+ _setPositionFromLayout(newCenter: {
784
+ x: number;
785
+ y: number;
786
+ }): void;
725
787
  }
726
788
 
727
789
  type Ftype = AnySourceComponent["ftype"];
@@ -3195,8 +3257,8 @@ declare class SilkscreenPath extends PrimitiveComponent<typeof silkscreenPathPro
3195
3257
  pcb_silkscreen_path_id: string | null;
3196
3258
  get config(): {
3197
3259
  zodProps: zod.ZodObject<zod.objectUtil.extendShape<Omit<{
3198
- pcbX: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3199
- pcbY: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3260
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3261
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3200
3262
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3201
3263
  layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
3202
3264
  name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
@@ -3273,8 +3335,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
3273
3335
  isPcbPrimitive: boolean;
3274
3336
  get config(): {
3275
3337
  zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
3276
- pcbX: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3277
- pcbY: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3338
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3339
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3278
3340
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3279
3341
  layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
3280
3342
  name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
@@ -3291,22 +3353,22 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
3291
3353
  outerDiameter: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3292
3354
  portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
3293
3355
  }>, "strip", zod.ZodTypeAny, {
3294
- pcbX: number;
3295
- pcbY: number;
3296
3356
  shape: "circle";
3297
3357
  holeDiameter: number;
3298
3358
  outerDiameter: number;
3359
+ pcbX?: number | undefined;
3360
+ pcbY?: number | undefined;
3299
3361
  portHints?: (string | number)[] | undefined;
3300
3362
  }, {
3301
- pcbX: string | number;
3302
- pcbY: string | number;
3303
3363
  shape: "circle";
3304
3364
  holeDiameter: string | number;
3305
3365
  outerDiameter: string | number;
3366
+ pcbX?: string | number | undefined;
3367
+ pcbY?: string | number | undefined;
3306
3368
  portHints?: (string | number)[] | undefined;
3307
3369
  }>, zod.ZodObject<zod.objectUtil.extendShape<Omit<{
3308
- pcbX: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3309
- pcbY: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3370
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3371
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3310
3372
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
3311
3373
  layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
3312
3374
  name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
@@ -3325,22 +3387,22 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
3325
3387
  innerHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
3326
3388
  portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
3327
3389
  }>, "strip", zod.ZodTypeAny, {
3328
- pcbX: number;
3329
- pcbY: number;
3330
3390
  shape: "oval";
3331
3391
  outerWidth: number;
3332
3392
  outerHeight: number;
3333
3393
  innerWidth: number;
3334
3394
  innerHeight: number;
3395
+ pcbX?: number | undefined;
3396
+ pcbY?: number | undefined;
3335
3397
  portHints?: (string | number)[] | undefined;
3336
3398
  }, {
3337
- pcbX: string | number;
3338
- pcbY: string | number;
3339
3399
  shape: "oval";
3340
3400
  outerWidth: string | number;
3341
3401
  outerHeight: string | number;
3342
3402
  innerWidth: string | number;
3343
3403
  innerHeight: string | number;
3404
+ pcbX?: string | number | undefined;
3405
+ pcbY?: string | number | undefined;
3344
3406
  portHints?: (string | number)[] | undefined;
3345
3407
  }>]>;
3346
3408
  };
@@ -3352,6 +3414,91 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
3352
3414
  doInitialPcbPrimitiveRender(): void;
3353
3415
  }
3354
3416
 
3417
+ declare class Constraint extends PrimitiveComponent<typeof constraintProps> {
3418
+ get config(): {
3419
+ zodProps: z.ZodUnion<[z.ZodObject<{
3420
+ pcb: z.ZodOptional<z.ZodLiteral<true>>;
3421
+ type: z.ZodOptional<z.ZodLiteral<"xdist">>;
3422
+ xdist: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
3423
+ left: z.ZodString;
3424
+ right: z.ZodString;
3425
+ edgeToEdge: z.ZodOptional<z.ZodLiteral<true>>;
3426
+ centerToCenter: z.ZodOptional<z.ZodLiteral<true>>;
3427
+ fromLeftEdge: z.ZodOptional<z.ZodLiteral<true>>;
3428
+ fromLeftCenter: z.ZodOptional<z.ZodLiteral<true>>;
3429
+ toRightEdge: z.ZodOptional<z.ZodLiteral<true>>;
3430
+ toRightCenter: z.ZodOptional<z.ZodLiteral<true>>;
3431
+ }, "strip", z.ZodTypeAny, {
3432
+ left: string;
3433
+ right: string;
3434
+ xdist: number;
3435
+ type?: "xdist" | undefined;
3436
+ pcb?: true | undefined;
3437
+ edgeToEdge?: true | undefined;
3438
+ centerToCenter?: true | undefined;
3439
+ fromLeftEdge?: true | undefined;
3440
+ fromLeftCenter?: true | undefined;
3441
+ toRightEdge?: true | undefined;
3442
+ toRightCenter?: true | undefined;
3443
+ }, {
3444
+ left: string;
3445
+ right: string;
3446
+ xdist: string | number;
3447
+ type?: "xdist" | undefined;
3448
+ pcb?: true | undefined;
3449
+ edgeToEdge?: true | undefined;
3450
+ centerToCenter?: true | undefined;
3451
+ fromLeftEdge?: true | undefined;
3452
+ fromLeftCenter?: true | undefined;
3453
+ toRightEdge?: true | undefined;
3454
+ toRightCenter?: true | undefined;
3455
+ }>, z.ZodObject<{
3456
+ pcb: z.ZodOptional<z.ZodLiteral<true>>;
3457
+ type: z.ZodOptional<z.ZodLiteral<"ydist">>;
3458
+ ydist: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
3459
+ top: z.ZodString;
3460
+ bottom: z.ZodString;
3461
+ edgeToEdge: z.ZodOptional<z.ZodLiteral<true>>;
3462
+ centerToCenter: z.ZodOptional<z.ZodLiteral<true>>;
3463
+ fromTopEdge: z.ZodOptional<z.ZodLiteral<true>>;
3464
+ fromTopCenter: z.ZodOptional<z.ZodLiteral<true>>;
3465
+ toBottomEdge: z.ZodOptional<z.ZodLiteral<true>>;
3466
+ toBottomCenter: z.ZodOptional<z.ZodLiteral<true>>;
3467
+ }, "strip", z.ZodTypeAny, {
3468
+ top: string;
3469
+ bottom: string;
3470
+ ydist: number;
3471
+ type?: "ydist" | undefined;
3472
+ pcb?: true | undefined;
3473
+ edgeToEdge?: true | undefined;
3474
+ centerToCenter?: true | undefined;
3475
+ fromTopEdge?: true | undefined;
3476
+ fromTopCenter?: true | undefined;
3477
+ toBottomEdge?: true | undefined;
3478
+ toBottomCenter?: true | undefined;
3479
+ }, {
3480
+ top: string;
3481
+ bottom: string;
3482
+ ydist: string | number;
3483
+ type?: "ydist" | undefined;
3484
+ pcb?: true | undefined;
3485
+ edgeToEdge?: true | undefined;
3486
+ centerToCenter?: true | undefined;
3487
+ fromTopEdge?: true | undefined;
3488
+ fromTopCenter?: true | undefined;
3489
+ toBottomEdge?: true | undefined;
3490
+ toBottomCenter?: true | undefined;
3491
+ }>]>;
3492
+ };
3493
+ constructor(props: z.input<typeof constraintProps>);
3494
+ _getAllReferencedComponents(): {
3495
+ componentsWithSelectors: Array<{
3496
+ component: PrimitiveComponent<any>;
3497
+ selector: string;
3498
+ }>;
3499
+ };
3500
+ }
3501
+
3355
3502
  declare global {
3356
3503
  namespace JSX {
3357
3504
  interface IntrinsicElements {
@@ -3390,9 +3537,11 @@ declare global {
3390
3537
  pcbtrace: Props.PcbTraceProps;
3391
3538
  fabricationnotetext: Props.FabricationNoteTextProps;
3392
3539
  fabricationnotepath: Props.FabricationNotePathProps;
3540
+ constraint: Props.ConstraintProps;
3541
+ constrainedlayout: Props.ConstrainedLayoutProps;
3393
3542
  jscad: any;
3394
3543
  }
3395
3544
  }
3396
3545
  }
3397
3546
 
3398
- export { Board, Capacitor, Chip, Circuit, Footprint, Group, type IRenderable, Jumper, Led, Net, NormalComponent, PlatedHole, Port, PrimitiveComponent, Project, Renderable, Resistor, SilkscreenPath, SmtPad, Trace, TraceHint };
3547
+ export { Board, Capacitor, Chip, Circuit, Constraint, Footprint, Group, type IRenderable, Jumper, Led, Net, NormalComponent, PlatedHole, Port, PrimitiveComponent, Project, Renderable, Resistor, SilkscreenPath, SmtPad, Trace, TraceHint };