@tscircuit/props 0.0.575 → 0.0.577

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
@@ -718,7 +718,11 @@ export type FabricationNoteRectProps = z.input<typeof fabricationNoteRectProps>;
718
718
  export interface FabricationNoteTextProps extends PcbLayoutProps {
719
719
  text: string;
720
720
  anchorAlignment?:
721
- "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
721
+ | "center"
722
+ | "top_left"
723
+ | "top_right"
724
+ | "bottom_left"
725
+ | "bottom_right";
722
726
  font?: "tscircuit2024";
723
727
  fontSize?: string | number;
724
728
  color?: string;
@@ -1284,7 +1288,11 @@ export interface PcbNoteRectProps extends Omit<PcbLayoutProps, "pcbRotation"> {
1284
1288
  export interface PcbNoteTextProps extends PcbLayoutProps {
1285
1289
  text: string;
1286
1290
  anchorAlignment?:
1287
- "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
1291
+ | "center"
1292
+ | "top_left"
1293
+ | "top_right"
1294
+ | "bottom_left"
1295
+ | "bottom_right";
1288
1296
  font?: "tscircuit2024";
1289
1297
  fontSize?: string | number;
1290
1298
  color?: string;
@@ -2118,6 +2126,7 @@ export interface PlatformConfig {
2118
2126
  ```
2119
2127
 
2120
2128
  [Source](https://github.com/tscircuit/props/blob/main/lib/platformConfig.ts)
2129
+
2121
2130
  <!-- PLATFORM_CONFIG_END -->
2122
2131
 
2123
2132
  <!-- PROJECT_CONFIG_START -->
@@ -2141,4 +2150,5 @@ export interface ProjectConfig extends Pick<
2141
2150
  ```
2142
2151
 
2143
2152
  [Source](https://github.com/tscircuit/props/blob/main/lib/projectConfig.ts)
2153
+
2144
2154
  <!-- PROJECT_CONFIG_END -->
package/dist/index.d.ts CHANGED
@@ -79675,7 +79675,7 @@ declare const potentiometerProps: z.ZodObject<{
79675
79675
  }>;
79676
79676
 
79677
79677
  type PinVariant = "two_pin" | "four_pin";
79678
- declare const crystalPins: readonly ["pin1", "left", "pin2", "right"];
79678
+ declare const crystalPins: readonly ["pin1", "left", "pin2", "right", "pin3", "pin4"];
79679
79679
  type CrystalPinLabels = (typeof crystalPins)[number];
79680
79680
  interface CrystalProps<PinLabel extends string = string> extends CommonComponentProps<PinLabel> {
79681
79681
  frequency: number | string;
@@ -83052,7 +83052,7 @@ declare const crystalProps: z.ZodObject<{
83052
83052
  mpn: z.ZodOptional<z.ZodString>;
83053
83053
  pinVariant: z.ZodOptional<z.ZodEnum<["two_pin", "four_pin"]>>;
83054
83054
  schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
83055
- connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "left", "pin2", "right"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
83055
+ connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "left", "pin2", "right", "pin3", "pin4"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
83056
83056
  }, "strip", z.ZodTypeAny, {
83057
83057
  name: string;
83058
83058
  frequency: number;
@@ -83633,7 +83633,7 @@ declare const crystalProps: z.ZodObject<{
83633
83633
  manufacturerPartNumber?: string | undefined;
83634
83634
  schSectionName?: string | undefined;
83635
83635
  schSheetName?: string | undefined;
83636
- connections?: Partial<Record<"left" | "right" | "pin1" | "pin2", string | readonly string[] | string[]>> | undefined;
83636
+ connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "pin3" | "pin4", string | readonly string[] | string[]>> | undefined;
83637
83637
  schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
83638
83638
  pinVariant?: "two_pin" | "four_pin" | undefined;
83639
83639
  maxTraceLength?: number | undefined;
@@ -84220,7 +84220,7 @@ declare const crystalProps: z.ZodObject<{
84220
84220
  manufacturerPartNumber?: string | undefined;
84221
84221
  schSectionName?: string | undefined;
84222
84222
  schSheetName?: string | undefined;
84223
- connections?: Partial<Record<"left" | "right" | "pin1" | "pin2", string | readonly string[] | string[]>> | undefined;
84223
+ connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "pin3" | "pin4", string | readonly string[] | string[]>> | undefined;
84224
84224
  schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
84225
84225
  pinVariant?: "two_pin" | "four_pin" | undefined;
84226
84226
  maxTraceLength?: string | number | undefined;
@@ -115556,7 +115556,7 @@ interface NetLabelProps {
115556
115556
  schRotation?: number | string;
115557
115557
  anchorSide?: "left" | "top" | "right" | "bottom";
115558
115558
  }
115559
- declare const netLabelProps: z.ZodObject<{
115559
+ declare const netLabelProps: z.ZodEffects<z.ZodObject<{
115560
115560
  net: z.ZodOptional<z.ZodString>;
115561
115561
  connection: z.ZodOptional<z.ZodString>;
115562
115562
  connectsTo: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -115580,6 +115580,22 @@ declare const netLabelProps: z.ZodObject<{
115580
115580
  net?: string | undefined;
115581
115581
  connection?: string | undefined;
115582
115582
  anchorSide?: "left" | "right" | "top" | "bottom" | undefined;
115583
+ }>, {
115584
+ schX?: number | undefined;
115585
+ schY?: number | undefined;
115586
+ schRotation?: number | undefined;
115587
+ connectsTo?: string | string[] | undefined;
115588
+ net?: string | undefined;
115589
+ connection?: string | undefined;
115590
+ anchorSide?: "left" | "right" | "top" | "bottom" | undefined;
115591
+ }, {
115592
+ schX?: string | number | undefined;
115593
+ schY?: string | number | undefined;
115594
+ schRotation?: string | number | undefined;
115595
+ connectsTo?: string | string[] | undefined;
115596
+ net?: string | undefined;
115597
+ connection?: string | undefined;
115598
+ anchorSide?: "left" | "right" | "top" | "bottom" | undefined;
115583
115599
  }>;
115584
115600
 
115585
115601
  type PushButtonProps<T extends PinLabelsProp | string = string> = ChipProps<T>;
package/dist/index.js CHANGED
@@ -16861,7 +16861,14 @@ expectTypesMatch(true);
16861
16861
  // lib/components/crystal.ts
16862
16862
  import { capacitance, distance as distance16, frequency } from "circuit-json";
16863
16863
  import { z as z51 } from "zod";
16864
- var crystalPins = lrPins;
16864
+ var crystalPins = [
16865
+ "pin1",
16866
+ "left",
16867
+ "pin2",
16868
+ "right",
16869
+ "pin3",
16870
+ "pin4"
16871
+ ];
16865
16872
  var crystalProps = commonComponentProps.extend({
16866
16873
  frequency,
16867
16874
  loadCapacitance: capacitance,
@@ -17395,7 +17402,13 @@ var netLabelProps = z73.object({
17395
17402
  schY: distance.optional(),
17396
17403
  schRotation: rotation4.optional(),
17397
17404
  anchorSide: z73.enum(["left", "top", "right", "bottom"]).optional()
17398
- });
17405
+ }).refine(
17406
+ (props) => props.net === void 0 || props.connection === void 0,
17407
+ {
17408
+ message: "net and connection cannot be provided together",
17409
+ path: ["connection"]
17410
+ }
17411
+ );
17399
17412
  expectTypesMatch(true);
17400
17413
 
17401
17414
  // lib/components/push-button.ts