@tscircuit/props 0.0.425 → 0.0.427

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/README.md CHANGED
@@ -228,6 +228,7 @@ export interface BoardProps extends Omit<
228
228
  borderRadius?: Distance;
229
229
  thickness?: Distance;
230
230
  boardAnchorPosition?: Point;
231
+ anchorAlignment?: z.infer<typeof ninePointAnchor>;
231
232
  boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
232
233
  /** Color applied to both top and bottom solder masks */
233
234
  solderMaskColor?: BoardColor;
@@ -961,6 +962,7 @@ export interface PanelProps extends Omit<
961
962
  width?: Distance;
962
963
  height?: Distance;
963
964
  children?: BaseGroupProps["children"];
965
+ anchorAlignment?: z.infer<typeof ninePointAnchor>;
964
966
  /**
965
967
  * If true, prevent a solder mask from being applied to this panel.
966
968
  */
@@ -977,6 +979,11 @@ export interface PanelProps extends Omit<
977
979
  tabWidth?: Distance;
978
980
  tabLength?: Distance;
979
981
  mouseBites?: boolean;
982
+ edgePadding?: Distance;
983
+ edgePaddingLeft?: Distance;
984
+ edgePaddingRight?: Distance;
985
+ edgePaddingTop?: Distance;
986
+ edgePaddingBottom?: Distance;
980
987
  }
981
988
  ```
982
989
 
package/dist/index.d.ts CHANGED
@@ -11833,6 +11833,7 @@ interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit" | "connecti
11833
11833
  borderRadius?: Distance;
11834
11834
  thickness?: Distance;
11835
11835
  boardAnchorPosition?: Point;
11836
+ anchorAlignment?: z.infer<typeof ninePointAnchor>;
11836
11837
  boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
11837
11838
  /** Color applied to both top and bottom solder masks */
11838
11839
  solderMaskColor?: BoardColor;
@@ -12588,6 +12589,7 @@ declare const boardProps: z.ZodObject<Omit<{
12588
12589
  x: string | number;
12589
12590
  y: string | number;
12590
12591
  }>>;
12592
+ anchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
12591
12593
  boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
12592
12594
  title: z.ZodOptional<z.ZodString>;
12593
12595
  solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
@@ -12906,6 +12908,7 @@ declare const boardProps: z.ZodObject<Omit<{
12906
12908
  x: number;
12907
12909
  y: number;
12908
12910
  } | undefined;
12911
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
12909
12912
  boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
12910
12913
  solderMaskColor?: BoardColor | undefined;
12911
12914
  topSolderMaskColor?: BoardColor | undefined;
@@ -13225,6 +13228,7 @@ declare const boardProps: z.ZodObject<Omit<{
13225
13228
  x: string | number;
13226
13229
  y: string | number;
13227
13230
  } | undefined;
13231
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
13228
13232
  boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
13229
13233
  solderMaskColor?: BoardColor | undefined;
13230
13234
  topSolderMaskColor?: BoardColor | undefined;
@@ -13240,6 +13244,7 @@ interface PanelProps extends Omit<BaseGroupProps, "height" | "layoutMode" | "wid
13240
13244
  width?: Distance;
13241
13245
  height?: Distance;
13242
13246
  children?: BaseGroupProps["children"];
13247
+ anchorAlignment?: z.infer<typeof ninePointAnchor>;
13243
13248
  /**
13244
13249
  * If true, prevent a solder mask from being applied to this panel.
13245
13250
  */
@@ -13256,6 +13261,11 @@ interface PanelProps extends Omit<BaseGroupProps, "height" | "layoutMode" | "wid
13256
13261
  tabWidth?: Distance;
13257
13262
  tabLength?: Distance;
13258
13263
  mouseBites?: boolean;
13264
+ edgePadding?: Distance;
13265
+ edgePaddingLeft?: Distance;
13266
+ edgePaddingRight?: Distance;
13267
+ edgePaddingTop?: Distance;
13268
+ edgePaddingBottom?: Distance;
13259
13269
  }
13260
13270
  declare const panelProps: z.ZodObject<Omit<{
13261
13271
  pcbX: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>]>>;
@@ -13793,6 +13803,7 @@ declare const panelProps: z.ZodObject<Omit<{
13793
13803
  width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13794
13804
  height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13795
13805
  children: z.ZodOptional<z.ZodAny>;
13806
+ anchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
13796
13807
  noSolderMask: z.ZodOptional<z.ZodBoolean>;
13797
13808
  panelizationMethod: z.ZodOptional<z.ZodEnum<["tab-routing", "none"]>>;
13798
13809
  boardGap: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -13804,6 +13815,11 @@ declare const panelProps: z.ZodObject<Omit<{
13804
13815
  tabWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13805
13816
  tabLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13806
13817
  mouseBites: z.ZodOptional<z.ZodBoolean>;
13818
+ edgePadding: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13819
+ edgePaddingLeft: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13820
+ edgePaddingRight: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13821
+ edgePaddingTop: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13822
+ edgePaddingBottom: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13807
13823
  }, "strip", z.ZodTypeAny, {
13808
13824
  symbol?: SymbolProp | undefined;
13809
13825
  key?: any;
@@ -14058,6 +14074,7 @@ declare const panelProps: z.ZodObject<Omit<{
14058
14074
  schGap?: string | number | undefined;
14059
14075
  schPack?: boolean | undefined;
14060
14076
  schMatchAdapt?: boolean | undefined;
14077
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
14061
14078
  noSolderMask?: boolean | undefined;
14062
14079
  panelizationMethod?: "none" | "tab-routing" | undefined;
14063
14080
  boardGap?: number | undefined;
@@ -14067,6 +14084,11 @@ declare const panelProps: z.ZodObject<Omit<{
14067
14084
  tabWidth?: number | undefined;
14068
14085
  tabLength?: number | undefined;
14069
14086
  mouseBites?: boolean | undefined;
14087
+ edgePadding?: number | undefined;
14088
+ edgePaddingLeft?: number | undefined;
14089
+ edgePaddingRight?: number | undefined;
14090
+ edgePaddingTop?: number | undefined;
14091
+ edgePaddingBottom?: number | undefined;
14070
14092
  }, {
14071
14093
  symbol?: SymbolProp | undefined;
14072
14094
  key?: any;
@@ -14323,6 +14345,7 @@ declare const panelProps: z.ZodObject<Omit<{
14323
14345
  schGap?: string | number | undefined;
14324
14346
  schPack?: boolean | undefined;
14325
14347
  schMatchAdapt?: boolean | undefined;
14348
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
14326
14349
  noSolderMask?: boolean | undefined;
14327
14350
  panelizationMethod?: "none" | "tab-routing" | undefined;
14328
14351
  boardGap?: string | number | undefined;
@@ -14332,6 +14355,11 @@ declare const panelProps: z.ZodObject<Omit<{
14332
14355
  tabWidth?: string | number | undefined;
14333
14356
  tabLength?: string | number | undefined;
14334
14357
  mouseBites?: boolean | undefined;
14358
+ edgePadding?: string | number | undefined;
14359
+ edgePaddingLeft?: string | number | undefined;
14360
+ edgePaddingRight?: string | number | undefined;
14361
+ edgePaddingTop?: string | number | undefined;
14362
+ edgePaddingBottom?: string | number | undefined;
14335
14363
  }>;
14336
14364
 
14337
14365
  interface SubpanelProps extends PanelProps {
@@ -14872,6 +14900,7 @@ declare const subpanelProps: z.ZodObject<Omit<{
14872
14900
  width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14873
14901
  height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14874
14902
  children: z.ZodOptional<z.ZodAny>;
14903
+ anchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
14875
14904
  noSolderMask: z.ZodOptional<z.ZodBoolean>;
14876
14905
  panelizationMethod: z.ZodOptional<z.ZodEnum<["tab-routing", "none"]>>;
14877
14906
  boardGap: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -14883,6 +14912,11 @@ declare const subpanelProps: z.ZodObject<Omit<{
14883
14912
  tabWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14884
14913
  tabLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14885
14914
  mouseBites: z.ZodOptional<z.ZodBoolean>;
14915
+ edgePadding: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14916
+ edgePaddingLeft: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14917
+ edgePaddingRight: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14918
+ edgePaddingTop: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14919
+ edgePaddingBottom: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
14886
14920
  }, "strip", z.ZodTypeAny, {
14887
14921
  symbol?: SymbolProp | undefined;
14888
14922
  key?: any;
@@ -15137,6 +15171,7 @@ declare const subpanelProps: z.ZodObject<Omit<{
15137
15171
  schGap?: string | number | undefined;
15138
15172
  schPack?: boolean | undefined;
15139
15173
  schMatchAdapt?: boolean | undefined;
15174
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
15140
15175
  noSolderMask?: boolean | undefined;
15141
15176
  panelizationMethod?: "none" | "tab-routing" | undefined;
15142
15177
  boardGap?: number | undefined;
@@ -15146,6 +15181,11 @@ declare const subpanelProps: z.ZodObject<Omit<{
15146
15181
  tabWidth?: number | undefined;
15147
15182
  tabLength?: number | undefined;
15148
15183
  mouseBites?: boolean | undefined;
15184
+ edgePadding?: number | undefined;
15185
+ edgePaddingLeft?: number | undefined;
15186
+ edgePaddingRight?: number | undefined;
15187
+ edgePaddingTop?: number | undefined;
15188
+ edgePaddingBottom?: number | undefined;
15149
15189
  }, {
15150
15190
  symbol?: SymbolProp | undefined;
15151
15191
  key?: any;
@@ -15402,6 +15442,7 @@ declare const subpanelProps: z.ZodObject<Omit<{
15402
15442
  schGap?: string | number | undefined;
15403
15443
  schPack?: boolean | undefined;
15404
15444
  schMatchAdapt?: boolean | undefined;
15445
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
15405
15446
  noSolderMask?: boolean | undefined;
15406
15447
  panelizationMethod?: "none" | "tab-routing" | undefined;
15407
15448
  boardGap?: string | number | undefined;
@@ -15411,6 +15452,11 @@ declare const subpanelProps: z.ZodObject<Omit<{
15411
15452
  tabWidth?: string | number | undefined;
15412
15453
  tabLength?: string | number | undefined;
15413
15454
  mouseBites?: boolean | undefined;
15455
+ edgePadding?: string | number | undefined;
15456
+ edgePaddingLeft?: string | number | undefined;
15457
+ edgePaddingRight?: string | number | undefined;
15458
+ edgePaddingTop?: string | number | undefined;
15459
+ edgePaddingBottom?: string | number | undefined;
15414
15460
  }>;
15415
15461
 
15416
15462
  interface BreakoutProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
@@ -34962,6 +35008,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
34962
35008
  x: string | number;
34963
35009
  y: string | number;
34964
35010
  }>>;
35011
+ anchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
34965
35012
  boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
34966
35013
  title: z.ZodOptional<z.ZodString>;
34967
35014
  solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
@@ -35295,6 +35342,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
35295
35342
  x: number;
35296
35343
  y: number;
35297
35344
  } | undefined;
35345
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
35298
35346
  boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
35299
35347
  solderMaskColor?: BoardColor | undefined;
35300
35348
  topSolderMaskColor?: BoardColor | undefined;
@@ -35624,6 +35672,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
35624
35672
  x: string | number;
35625
35673
  y: string | number;
35626
35674
  } | undefined;
35675
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
35627
35676
  boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
35628
35677
  solderMaskColor?: BoardColor | undefined;
35629
35678
  topSolderMaskColor?: BoardColor | undefined;
@@ -55543,8 +55592,8 @@ declare const fabricationNoteTextProps: z.ZodObject<{
55543
55592
  fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
55544
55593
  color: z.ZodOptional<z.ZodString>;
55545
55594
  }, "strip", z.ZodTypeAny, {
55546
- text: string;
55547
55595
  anchorAlignment: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right";
55596
+ text: string;
55548
55597
  pcbX?: string | number | undefined;
55549
55598
  pcbY?: string | number | undefined;
55550
55599
  pcbLeftEdgeX?: string | number | undefined;
@@ -55612,8 +55661,8 @@ declare const fabricationNoteTextProps: z.ZodObject<{
55612
55661
  } | undefined;
55613
55662
  pcbRelative?: boolean | undefined;
55614
55663
  relative?: boolean | undefined;
55615
- color?: string | undefined;
55616
55664
  anchorAlignment?: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right" | undefined;
55665
+ color?: string | undefined;
55617
55666
  font?: "tscircuit2024" | undefined;
55618
55667
  fontSize?: string | number | undefined;
55619
55668
  }>;
@@ -62856,8 +62905,8 @@ declare const copperTextProps: z.ZodObject<{
62856
62905
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
62857
62906
  }>, "many">>;
62858
62907
  }, "strip", z.ZodTypeAny, {
62859
- text: string;
62860
62908
  anchorAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
62909
+ text: string;
62861
62910
  pcbX?: string | number | undefined;
62862
62911
  pcbY?: string | number | undefined;
62863
62912
  pcbLeftEdgeX?: string | number | undefined;
@@ -63021,8 +63070,8 @@ declare const silkscreenTextProps: z.ZodObject<{
63021
63070
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
63022
63071
  }>, "many">>;
63023
63072
  }, "strip", z.ZodTypeAny, {
63024
- text: string;
63025
63073
  anchorAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
63074
+ text: string;
63026
63075
  pcbX?: string | number | undefined;
63027
63076
  pcbY?: string | number | undefined;
63028
63077
  pcbLeftEdgeX?: string | number | undefined;
@@ -64178,8 +64227,8 @@ declare const pcbNoteTextProps: z.ZodObject<{
64178
64227
  fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
64179
64228
  color: z.ZodOptional<z.ZodString>;
64180
64229
  }, "strip", z.ZodTypeAny, {
64181
- text: string;
64182
64230
  anchorAlignment: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right";
64231
+ text: string;
64183
64232
  pcbX?: string | number | undefined;
64184
64233
  pcbY?: string | number | undefined;
64185
64234
  pcbLeftEdgeX?: string | number | undefined;
@@ -64247,8 +64296,8 @@ declare const pcbNoteTextProps: z.ZodObject<{
64247
64296
  } | undefined;
64248
64297
  pcbRelative?: boolean | undefined;
64249
64298
  relative?: boolean | undefined;
64250
- color?: string | undefined;
64251
64299
  anchorAlignment?: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right" | undefined;
64300
+ color?: string | undefined;
64252
64301
  font?: "tscircuit2024" | undefined;
64253
64302
  fontSize?: string | number | undefined;
64254
64303
  }>;
package/dist/index.js CHANGED
@@ -748,7 +748,8 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
748
748
  borderRadius: distance.optional(),
749
749
  thickness: distance.optional(),
750
750
  boardAnchorPosition: point.optional(),
751
- boardAnchorAlignment: ninePointAnchor.optional(),
751
+ anchorAlignment: ninePointAnchor.optional(),
752
+ boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
752
753
  title: z31.string().optional(),
753
754
  solderMaskColor: boardColor.optional(),
754
755
  topSolderMaskColor: boardColor.optional(),
@@ -772,6 +773,7 @@ var panelProps = baseGroupProps.omit({
772
773
  width: distance.optional(),
773
774
  height: distance.optional(),
774
775
  children: z32.any().optional(),
776
+ anchorAlignment: ninePointAnchor.optional(),
775
777
  noSolderMask: z32.boolean().optional(),
776
778
  panelizationMethod: z32.enum(["tab-routing", "none"]).optional(),
777
779
  boardGap: distance.optional(),
@@ -782,7 +784,12 @@ var panelProps = baseGroupProps.omit({
782
784
  cellHeight: distance.optional(),
783
785
  tabWidth: distance.optional(),
784
786
  tabLength: distance.optional(),
785
- mouseBites: z32.boolean().optional()
787
+ mouseBites: z32.boolean().optional(),
788
+ edgePadding: distance.optional(),
789
+ edgePaddingLeft: distance.optional(),
790
+ edgePaddingRight: distance.optional(),
791
+ edgePaddingTop: distance.optional(),
792
+ edgePaddingBottom: distance.optional()
786
793
  });
787
794
  expectTypesMatch(true);
788
795