@tscircuit/core 0.0.353 → 0.0.355

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
@@ -1,5 +1,5 @@
1
1
  import * as _tscircuit_props from '@tscircuit/props';
2
- import { subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, SchematicPortArrangement, groupProps, boardProps, capacitorProps, chipProps, diodeProps, jumperProps, ledProps, powerSourceProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, subcircuitProps, holeProps, pcbKeepoutProps, netAliasProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, CapacitorProps, ChipProps, ResistorProps, ManualEditEvent, manual_edits_file } from '@tscircuit/props';
2
+ import { subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, SchematicPortArrangement, groupProps, boardProps, capacitorProps, chipProps, diodeProps, jumperProps, ledProps, powerSourceProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, subcircuitProps, holeProps, pcbKeepoutProps, netAliasProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, CapacitorProps, ChipProps, ResistorProps, ManualEditEvent, manual_edits_file, ChipConnections } from '@tscircuit/props';
3
3
  import React, { ReactElement, DetailedHTMLProps, SVGProps } from 'react';
4
4
  export { createElement } from 'react';
5
5
  import * as zod from 'zod';
@@ -2363,7 +2363,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2363
2363
  symbolName: zod.ZodOptional<zod.ZodString>;
2364
2364
  }>, {
2365
2365
  manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
2366
- pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>>>;
2366
+ pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
2367
2367
  internallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
2368
2368
  externallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
2369
2369
  schPinArrangement: zod.ZodOptional<zod.ZodObject<{
@@ -2598,7 +2598,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2598
2598
  schWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
2599
2599
  schHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
2600
2600
  noSchematicRepresentation: zod.ZodOptional<zod.ZodBoolean>;
2601
- connections: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
2601
+ connections: zod.ZodOptional<zod.ZodPipeline<zod.ZodType<Partial<Record<string, string | string[] | readonly string[]>>, zod.ZodTypeDef, Partial<Record<string, string | string[] | readonly string[]>>>, zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
2602
2602
  }>, "strip", zod.ZodTypeAny, {
2603
2603
  name: string;
2604
2604
  pcbX?: number | undefined;
@@ -2669,7 +2669,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2669
2669
  schWidth?: number | undefined;
2670
2670
  schHeight?: number | undefined;
2671
2671
  manufacturerPartNumber?: string | undefined;
2672
- pinLabels?: Record<string | number, string | readonly string[]> | undefined;
2672
+ pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
2673
2673
  internallyConnectedPins?: string[][] | undefined;
2674
2674
  externallyConnectedPins?: string[][] | undefined;
2675
2675
  schPinArrangement?: {
@@ -2736,7 +2736,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2736
2736
  }> | undefined;
2737
2737
  schPinSpacing?: number | undefined;
2738
2738
  noSchematicRepresentation?: boolean | undefined;
2739
- connections?: Record<string | number, string | readonly string[] | string[]> | undefined;
2739
+ connections?: Record<string, string | readonly string[] | string[]> | undefined;
2740
2740
  }, {
2741
2741
  name: string;
2742
2742
  pcbX?: string | number | undefined;
@@ -2809,7 +2809,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2809
2809
  schWidth?: string | number | undefined;
2810
2810
  schHeight?: string | number | undefined;
2811
2811
  manufacturerPartNumber?: string | undefined;
2812
- pinLabels?: Record<string | number, string | readonly string[]> | undefined;
2812
+ pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
2813
2813
  internallyConnectedPins?: string[][] | undefined;
2814
2814
  externallyConnectedPins?: string[][] | undefined;
2815
2815
  schPinArrangement?: {
@@ -2876,7 +2876,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
2876
2876
  }> | undefined;
2877
2877
  schPinSpacing?: string | number | undefined;
2878
2878
  noSchematicRepresentation?: boolean | undefined;
2879
- connections?: Record<string | number, string | readonly string[] | string[]> | undefined;
2879
+ connections?: Partial<Record<string, string | string[] | readonly string[]>> | undefined;
2880
2880
  }>;
2881
2881
  shouldRenderAsSchematicBox: boolean;
2882
2882
  };
@@ -8635,7 +8635,7 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
8635
8635
  get config(): {
8636
8636
  componentName: string;
8637
8637
  schematicSymbolName: BaseSymbolName;
8638
- zodProps: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
8638
+ zodProps: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
8639
8639
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
8640
8640
  pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
8641
8641
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -8892,8 +8892,244 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
8892
8892
  children: zod.ZodOptional<zod.ZodAny>;
8893
8893
  symbolName: zod.ZodOptional<zod.ZodString>;
8894
8894
  }>, {
8895
+ manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
8896
+ pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
8895
8897
  internallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
8896
- }>, "strip", zod.ZodTypeAny, {
8898
+ externallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
8899
+ schPinArrangement: zod.ZodOptional<zod.ZodObject<{
8900
+ leftSize: zod.ZodOptional<zod.ZodNumber>;
8901
+ topSize: zod.ZodOptional<zod.ZodNumber>;
8902
+ rightSize: zod.ZodOptional<zod.ZodNumber>;
8903
+ bottomSize: zod.ZodOptional<zod.ZodNumber>;
8904
+ leftPinCount: zod.ZodOptional<zod.ZodNumber>;
8905
+ rightPinCount: zod.ZodOptional<zod.ZodNumber>;
8906
+ topPinCount: zod.ZodOptional<zod.ZodNumber>;
8907
+ bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
8908
+ leftSide: zod.ZodOptional<zod.ZodObject<{
8909
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8910
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8911
+ }, "strip", zod.ZodTypeAny, {
8912
+ pins: (string | number)[];
8913
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8914
+ }, {
8915
+ pins: (string | number)[];
8916
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8917
+ }>>;
8918
+ rightSide: zod.ZodOptional<zod.ZodObject<{
8919
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8920
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8921
+ }, "strip", zod.ZodTypeAny, {
8922
+ pins: (string | number)[];
8923
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8924
+ }, {
8925
+ pins: (string | number)[];
8926
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8927
+ }>>;
8928
+ topSide: zod.ZodOptional<zod.ZodObject<{
8929
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8930
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8931
+ }, "strip", zod.ZodTypeAny, {
8932
+ pins: (string | number)[];
8933
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8934
+ }, {
8935
+ pins: (string | number)[];
8936
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8937
+ }>>;
8938
+ bottomSide: zod.ZodOptional<zod.ZodObject<{
8939
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8940
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8941
+ }, "strip", zod.ZodTypeAny, {
8942
+ pins: (string | number)[];
8943
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8944
+ }, {
8945
+ pins: (string | number)[];
8946
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8947
+ }>>;
8948
+ }, "strip", zod.ZodTypeAny, {
8949
+ leftSize?: number | undefined;
8950
+ topSize?: number | undefined;
8951
+ rightSize?: number | undefined;
8952
+ bottomSize?: number | undefined;
8953
+ leftSide?: {
8954
+ pins: (string | number)[];
8955
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8956
+ } | undefined;
8957
+ topSide?: {
8958
+ pins: (string | number)[];
8959
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8960
+ } | undefined;
8961
+ rightSide?: {
8962
+ pins: (string | number)[];
8963
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8964
+ } | undefined;
8965
+ bottomSide?: {
8966
+ pins: (string | number)[];
8967
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8968
+ } | undefined;
8969
+ leftPinCount?: number | undefined;
8970
+ rightPinCount?: number | undefined;
8971
+ topPinCount?: number | undefined;
8972
+ bottomPinCount?: number | undefined;
8973
+ }, {
8974
+ leftSize?: number | undefined;
8975
+ topSize?: number | undefined;
8976
+ rightSize?: number | undefined;
8977
+ bottomSize?: number | undefined;
8978
+ leftSide?: {
8979
+ pins: (string | number)[];
8980
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8981
+ } | undefined;
8982
+ topSide?: {
8983
+ pins: (string | number)[];
8984
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8985
+ } | undefined;
8986
+ rightSide?: {
8987
+ pins: (string | number)[];
8988
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8989
+ } | undefined;
8990
+ bottomSide?: {
8991
+ pins: (string | number)[];
8992
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8993
+ } | undefined;
8994
+ leftPinCount?: number | undefined;
8995
+ rightPinCount?: number | undefined;
8996
+ topPinCount?: number | undefined;
8997
+ bottomPinCount?: number | undefined;
8998
+ }>>;
8999
+ schPortArrangement: zod.ZodOptional<zod.ZodObject<{
9000
+ leftSize: zod.ZodOptional<zod.ZodNumber>;
9001
+ topSize: zod.ZodOptional<zod.ZodNumber>;
9002
+ rightSize: zod.ZodOptional<zod.ZodNumber>;
9003
+ bottomSize: zod.ZodOptional<zod.ZodNumber>;
9004
+ leftPinCount: zod.ZodOptional<zod.ZodNumber>;
9005
+ rightPinCount: zod.ZodOptional<zod.ZodNumber>;
9006
+ topPinCount: zod.ZodOptional<zod.ZodNumber>;
9007
+ bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
9008
+ leftSide: zod.ZodOptional<zod.ZodObject<{
9009
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
9010
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
9011
+ }, "strip", zod.ZodTypeAny, {
9012
+ pins: (string | number)[];
9013
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9014
+ }, {
9015
+ pins: (string | number)[];
9016
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9017
+ }>>;
9018
+ rightSide: zod.ZodOptional<zod.ZodObject<{
9019
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
9020
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
9021
+ }, "strip", zod.ZodTypeAny, {
9022
+ pins: (string | number)[];
9023
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9024
+ }, {
9025
+ pins: (string | number)[];
9026
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9027
+ }>>;
9028
+ topSide: zod.ZodOptional<zod.ZodObject<{
9029
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
9030
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
9031
+ }, "strip", zod.ZodTypeAny, {
9032
+ pins: (string | number)[];
9033
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9034
+ }, {
9035
+ pins: (string | number)[];
9036
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9037
+ }>>;
9038
+ bottomSide: zod.ZodOptional<zod.ZodObject<{
9039
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
9040
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
9041
+ }, "strip", zod.ZodTypeAny, {
9042
+ pins: (string | number)[];
9043
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9044
+ }, {
9045
+ pins: (string | number)[];
9046
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9047
+ }>>;
9048
+ }, "strip", zod.ZodTypeAny, {
9049
+ leftSize?: number | undefined;
9050
+ topSize?: number | undefined;
9051
+ rightSize?: number | undefined;
9052
+ bottomSize?: number | undefined;
9053
+ leftSide?: {
9054
+ pins: (string | number)[];
9055
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9056
+ } | undefined;
9057
+ topSide?: {
9058
+ pins: (string | number)[];
9059
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9060
+ } | undefined;
9061
+ rightSide?: {
9062
+ pins: (string | number)[];
9063
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9064
+ } | undefined;
9065
+ bottomSide?: {
9066
+ pins: (string | number)[];
9067
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9068
+ } | undefined;
9069
+ leftPinCount?: number | undefined;
9070
+ rightPinCount?: number | undefined;
9071
+ topPinCount?: number | undefined;
9072
+ bottomPinCount?: number | undefined;
9073
+ }, {
9074
+ leftSize?: number | undefined;
9075
+ topSize?: number | undefined;
9076
+ rightSize?: number | undefined;
9077
+ bottomSize?: number | undefined;
9078
+ leftSide?: {
9079
+ pins: (string | number)[];
9080
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9081
+ } | undefined;
9082
+ topSide?: {
9083
+ pins: (string | number)[];
9084
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9085
+ } | undefined;
9086
+ rightSide?: {
9087
+ pins: (string | number)[];
9088
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9089
+ } | undefined;
9090
+ bottomSide?: {
9091
+ pins: (string | number)[];
9092
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9093
+ } | undefined;
9094
+ leftPinCount?: number | undefined;
9095
+ rightPinCount?: number | undefined;
9096
+ topPinCount?: number | undefined;
9097
+ bottomPinCount?: number | undefined;
9098
+ }>>;
9099
+ schPinStyle: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
9100
+ marginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9101
+ marginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9102
+ marginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9103
+ marginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9104
+ leftMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9105
+ rightMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9106
+ topMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9107
+ bottomMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9108
+ }, "strip", zod.ZodTypeAny, {
9109
+ marginLeft?: number | undefined;
9110
+ marginRight?: number | undefined;
9111
+ marginTop?: number | undefined;
9112
+ marginBottom?: number | undefined;
9113
+ leftMargin?: number | undefined;
9114
+ rightMargin?: number | undefined;
9115
+ topMargin?: number | undefined;
9116
+ bottomMargin?: number | undefined;
9117
+ }, {
9118
+ marginLeft?: string | number | undefined;
9119
+ marginRight?: string | number | undefined;
9120
+ marginTop?: string | number | undefined;
9121
+ marginBottom?: string | number | undefined;
9122
+ leftMargin?: string | number | undefined;
9123
+ rightMargin?: string | number | undefined;
9124
+ topMargin?: string | number | undefined;
9125
+ bottomMargin?: string | number | undefined;
9126
+ }>>>;
9127
+ schPinSpacing: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9128
+ schWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9129
+ schHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
9130
+ noSchematicRepresentation: zod.ZodOptional<zod.ZodBoolean>;
9131
+ connections: zod.ZodOptional<zod.ZodPipeline<zod.ZodType<Partial<Record<string, string | string[] | readonly string[]>>, zod.ZodTypeDef, Partial<Record<string, string | string[] | readonly string[]>>>, zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
9132
+ }>, {}>, "strip", zod.ZodTypeAny, {
8897
9133
  name: string;
8898
9134
  pcbX?: number | undefined;
8899
9135
  pcbY?: number | undefined;
@@ -8960,7 +9196,77 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
8960
9196
  } | undefined;
8961
9197
  children?: any;
8962
9198
  symbolName?: string | undefined;
9199
+ schWidth?: number | undefined;
9200
+ schHeight?: number | undefined;
9201
+ manufacturerPartNumber?: string | undefined;
9202
+ pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
8963
9203
  internallyConnectedPins?: string[][] | undefined;
9204
+ externallyConnectedPins?: string[][] | undefined;
9205
+ schPinArrangement?: {
9206
+ leftSize?: number | undefined;
9207
+ topSize?: number | undefined;
9208
+ rightSize?: number | undefined;
9209
+ bottomSize?: number | undefined;
9210
+ leftSide?: {
9211
+ pins: (string | number)[];
9212
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9213
+ } | undefined;
9214
+ topSide?: {
9215
+ pins: (string | number)[];
9216
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9217
+ } | undefined;
9218
+ rightSide?: {
9219
+ pins: (string | number)[];
9220
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9221
+ } | undefined;
9222
+ bottomSide?: {
9223
+ pins: (string | number)[];
9224
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9225
+ } | undefined;
9226
+ leftPinCount?: number | undefined;
9227
+ rightPinCount?: number | undefined;
9228
+ topPinCount?: number | undefined;
9229
+ bottomPinCount?: number | undefined;
9230
+ } | undefined;
9231
+ schPortArrangement?: {
9232
+ leftSize?: number | undefined;
9233
+ topSize?: number | undefined;
9234
+ rightSize?: number | undefined;
9235
+ bottomSize?: number | undefined;
9236
+ leftSide?: {
9237
+ pins: (string | number)[];
9238
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9239
+ } | undefined;
9240
+ topSide?: {
9241
+ pins: (string | number)[];
9242
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9243
+ } | undefined;
9244
+ rightSide?: {
9245
+ pins: (string | number)[];
9246
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9247
+ } | undefined;
9248
+ bottomSide?: {
9249
+ pins: (string | number)[];
9250
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9251
+ } | undefined;
9252
+ leftPinCount?: number | undefined;
9253
+ rightPinCount?: number | undefined;
9254
+ topPinCount?: number | undefined;
9255
+ bottomPinCount?: number | undefined;
9256
+ } | undefined;
9257
+ schPinStyle?: Record<string, {
9258
+ marginLeft?: number | undefined;
9259
+ marginRight?: number | undefined;
9260
+ marginTop?: number | undefined;
9261
+ marginBottom?: number | undefined;
9262
+ leftMargin?: number | undefined;
9263
+ rightMargin?: number | undefined;
9264
+ topMargin?: number | undefined;
9265
+ bottomMargin?: number | undefined;
9266
+ }> | undefined;
9267
+ schPinSpacing?: number | undefined;
9268
+ noSchematicRepresentation?: boolean | undefined;
9269
+ connections?: Record<string, string | readonly string[] | string[]> | undefined;
8964
9270
  }, {
8965
9271
  name: string;
8966
9272
  pcbX?: string | number | undefined;
@@ -9030,7 +9336,77 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
9030
9336
  } | undefined;
9031
9337
  children?: any;
9032
9338
  symbolName?: string | undefined;
9339
+ schWidth?: string | number | undefined;
9340
+ schHeight?: string | number | undefined;
9341
+ manufacturerPartNumber?: string | undefined;
9342
+ pinLabels?: Record<string, string | readonly string[] | string[]> | undefined;
9033
9343
  internallyConnectedPins?: string[][] | undefined;
9344
+ externallyConnectedPins?: string[][] | undefined;
9345
+ schPinArrangement?: {
9346
+ leftSize?: number | undefined;
9347
+ topSize?: number | undefined;
9348
+ rightSize?: number | undefined;
9349
+ bottomSize?: number | undefined;
9350
+ leftSide?: {
9351
+ pins: (string | number)[];
9352
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9353
+ } | undefined;
9354
+ topSide?: {
9355
+ pins: (string | number)[];
9356
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9357
+ } | undefined;
9358
+ rightSide?: {
9359
+ pins: (string | number)[];
9360
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9361
+ } | undefined;
9362
+ bottomSide?: {
9363
+ pins: (string | number)[];
9364
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9365
+ } | undefined;
9366
+ leftPinCount?: number | undefined;
9367
+ rightPinCount?: number | undefined;
9368
+ topPinCount?: number | undefined;
9369
+ bottomPinCount?: number | undefined;
9370
+ } | undefined;
9371
+ schPortArrangement?: {
9372
+ leftSize?: number | undefined;
9373
+ topSize?: number | undefined;
9374
+ rightSize?: number | undefined;
9375
+ bottomSize?: number | undefined;
9376
+ leftSide?: {
9377
+ pins: (string | number)[];
9378
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9379
+ } | undefined;
9380
+ topSide?: {
9381
+ pins: (string | number)[];
9382
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9383
+ } | undefined;
9384
+ rightSide?: {
9385
+ pins: (string | number)[];
9386
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9387
+ } | undefined;
9388
+ bottomSide?: {
9389
+ pins: (string | number)[];
9390
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
9391
+ } | undefined;
9392
+ leftPinCount?: number | undefined;
9393
+ rightPinCount?: number | undefined;
9394
+ topPinCount?: number | undefined;
9395
+ bottomPinCount?: number | undefined;
9396
+ } | undefined;
9397
+ schPinStyle?: Record<string, {
9398
+ marginLeft?: string | number | undefined;
9399
+ marginRight?: string | number | undefined;
9400
+ marginTop?: string | number | undefined;
9401
+ marginBottom?: string | number | undefined;
9402
+ leftMargin?: string | number | undefined;
9403
+ rightMargin?: string | number | undefined;
9404
+ topMargin?: string | number | undefined;
9405
+ bottomMargin?: string | number | undefined;
9406
+ }> | undefined;
9407
+ schPinSpacing?: string | number | undefined;
9408
+ noSchematicRepresentation?: boolean | undefined;
9409
+ connections?: Partial<Record<string, string | string[] | readonly string[]>> | undefined;
9034
9410
  }>;
9035
9411
  sourceFtype: "simple_push_button";
9036
9412
  };
@@ -11108,9 +11484,9 @@ type RenderEvent = {
11108
11484
  */
11109
11485
  declare const getPhaseTimingsFromRenderEvents: (renderEvents: RenderEvent[]) => Record<string, number>;
11110
11486
 
11111
- type Nums16 = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16";
11112
- type Nums40 = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40";
11113
- type PinNumbers100 = "pin1" | "pin2" | "pin3" | "pin4" | "pin5" | "pin6" | "pin7" | "pin8" | "pin9" | "pin10" | "pin11" | "pin12" | "pin13" | "pin14" | "pin15" | "pin16" | "pin17" | "pin18" | "pin19" | "pin20" | "pin21" | "pin22" | "pin23" | "pin24" | "pin25" | "pin26" | "pin27" | "pin28" | "pin29" | "pin30" | "pin31" | "pin32" | "pin33" | "pin34" | "pin35" | "pin36" | "pin37" | "pin38" | "pin39" | "pin40" | "pin41" | "pin42" | "pin43" | "pin44" | "pin45" | "pin46" | "pin47" | "pin48" | "pin49" | "pin50" | "pin51" | "pin52" | "pin53" | "pin54" | "pin55" | "pin56" | "pin57" | "pin58" | "pin59" | "pin60" | "pin61" | "pin62" | "pin63" | "pin64" | "pin65" | "pin66" | "pin67" | "pin68" | "pin69" | "pin70" | "pin71" | "pin72" | "pin73" | "pin74" | "pin75" | "pin76" | "pin77" | "pin78" | "pin79" | "pin80" | "pin81" | "pin82" | "pin83" | "pin84" | "pin85" | "pin86" | "pin87" | "pin88" | "pin89" | "pin90" | "pin91" | "pin92" | "pin93" | "pin94" | "pin95" | "pin96" | "pin97" | "pin98" | "pin99" | "pin100";
11487
+ type Nums16 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16";
11488
+ type Nums40 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40";
11489
+ type PinNumbers100 = "pin0" | "pin1" | "pin2" | "pin3" | "pin4" | "pin5" | "pin6" | "pin7" | "pin8" | "pin9" | "pin10" | "pin11" | "pin12" | "pin13" | "pin14" | "pin15" | "pin16" | "pin17" | "pin18" | "pin19" | "pin20" | "pin21" | "pin22" | "pin23" | "pin24" | "pin25" | "pin26" | "pin27" | "pin28" | "pin29" | "pin30" | "pin31" | "pin32" | "pin33" | "pin34" | "pin35" | "pin36" | "pin37" | "pin38" | "pin39" | "pin40" | "pin41" | "pin42" | "pin43" | "pin44" | "pin45" | "pin46" | "pin47" | "pin48" | "pin49" | "pin50" | "pin51" | "pin52" | "pin53" | "pin54" | "pin55" | "pin56" | "pin57" | "pin58" | "pin59" | "pin60" | "pin61" | "pin62" | "pin63" | "pin64" | "pin65" | "pin66" | "pin67" | "pin68" | "pin69" | "pin70" | "pin71" | "pin72" | "pin73" | "pin74" | "pin75" | "pin76" | "pin77" | "pin78" | "pin79" | "pin80" | "pin81" | "pin82" | "pin83" | "pin84" | "pin85" | "pin86" | "pin87" | "pin88" | "pin89" | "pin90" | "pin91" | "pin92" | "pin93" | "pin94" | "pin95" | "pin96" | "pin97" | "pin98" | "pin99" | "pin100";
11114
11490
  type CommonPinNames = "pos" | "neg" | "V5" | "V3_3" | "PWR" | "VCC" | "VDD" | "GND" | `D${Nums40}` | `GP${Nums40}` | `GPIO${Nums40}` | "DP" | "DN" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | "OUT" | "DISCH" | "EN" | "IN" | "CLK" | "DATA" | "THRES" | "TRIG" | "RESET" | `A${Nums40}` | `B${Nums40}` | PinNumbers100;
11115
11491
  type TransistorPinNames = "base" | "collector" | "emitter";
11116
11492
 
@@ -11139,11 +11515,16 @@ type PolarizedSel = Record<`C${Nums40}` | `L${Nums40}` | `LED${Nums40}` | `D${Nu
11139
11515
  type CommonNetNames = "VCC" | "GND" | "VDD" | "PWR" | "V5" | "V3_3";
11140
11516
  type TransistorSel = Record<`Q${Nums40}`, Record<TransistorPinNames, string>>;
11141
11517
  type JumperSel = Record<`J${Nums40}`, Record<PinNumbers100 | CommonPinNames, string>>;
11142
- type ChipSel = Record<`U${Nums40}`, Record<CommonPinNames, string>>;
11518
+ type ChipSel = Record<`U${Nums40}`, Record<CommonPinNames, string> & ChipFnSel>;
11143
11519
  type NetSel = Record<"net", Record<CommonNetNames, string>>;
11144
11520
  type ConnectionSel = Record<`CN${Nums40}`, Record<CommonPinNames, string>>;
11145
11521
  type SubcircuitSel = Record<"subcircuit", Record<`S${Nums40}`, SelWithoutSubcircuit>>;
11146
11522
  type SelWithoutSubcircuit = NonPolarizedSel & PolarizedSel & TransistorSel & JumperSel & ChipSel & SwSel & NetSel & ConnectionSel;
11523
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
11524
+ type ChipFn<T extends ChipProps<any>> = (props: T) => any;
11525
+ type ChipFnSel = <T extends ChipFn<any> | string>(chipFn?: T) => UnionToIntersection<T extends ChipFn<any> ? ChipConnections<T> : T extends string ? {
11526
+ [K in T]: string;
11527
+ } : never>;
11147
11528
  type Sel = SubcircuitSel & SelWithoutSubcircuit;
11148
11529
  declare const sel: Sel;
11149
11530
 
package/dist/index.js CHANGED
@@ -2246,7 +2246,7 @@ var Port = class extends PrimitiveComponent {
2246
2246
  const { db } = this.root;
2247
2247
  if (!this.schematic_port_id) {
2248
2248
  throw new Error(
2249
- `Can't get schematic port position after layout, no schematic_port_id`
2249
+ `Can't get schematic port position after layout for "${this.getString()}", no schematic_port_id`
2250
2250
  );
2251
2251
  }
2252
2252
  const schematic_port = db.schematic_port.get(this.schematic_port_id);
@@ -4573,15 +4573,22 @@ var NormalComponent = class extends PrimitiveComponent {
4573
4573
  for (const symPort of sym.ports) {
4574
4574
  const pinNumber = getPinNumberFromLabels(symPort.labels);
4575
4575
  if (!pinNumber) continue;
4576
- const port = getPortFromHints(
4577
- symPort.labels.concat(
4578
- opts.additionalAliases?.[`pin${pinNumber}`] ?? []
4579
- )
4576
+ const existingPort = portsToCreate.find(
4577
+ (p) => p._parsedProps.pinNumber === Number(pinNumber)
4580
4578
  );
4581
- if (port) {
4582
- port.originDescription = `schematicSymbol:labels[0]:${symPort.labels[0]}`;
4583
- port.schematicSymbolPortDef = symPort;
4584
- portsToCreate.push(port);
4579
+ if (existingPort) {
4580
+ existingPort.schematicSymbolPortDef = symPort;
4581
+ } else {
4582
+ const port = getPortFromHints(
4583
+ symPort.labels.concat(
4584
+ opts.additionalAliases?.[`pin${pinNumber}`] ?? []
4585
+ )
4586
+ );
4587
+ if (port) {
4588
+ port.originDescription = `schematicSymbol:labels[0]:${symPort.labels[0]}`;
4589
+ port.schematicSymbolPortDef = symPort;
4590
+ portsToCreate.push(port);
4591
+ }
4585
4592
  }
4586
4593
  }
4587
4594
  this.addAll(portsToCreate);
@@ -5243,7 +5250,7 @@ var CapacityMeshAutorouter = class {
5243
5250
  }
5244
5251
  const iterationsPerSecond = (this.solver.iterations - startIterations) / (Date.now() - startTime) * 1e3;
5245
5252
  this.cycleCount++;
5246
- const debugGraphics = this.solver.activeSubSolver?.visualize() || void 0;
5253
+ const debugGraphics = this.solver?.preview() || void 0;
5247
5254
  const progress = this.solver.progress;
5248
5255
  this.emitEvent({
5249
5256
  type: "progress",
@@ -7314,7 +7321,7 @@ import { identity as identity4 } from "transformation-matrix";
7314
7321
  var package_default = {
7315
7322
  name: "@tscircuit/core",
7316
7323
  type: "module",
7317
- version: "0.0.352",
7324
+ version: "0.0.354",
7318
7325
  types: "dist/index.d.ts",
7319
7326
  main: "dist/index.js",
7320
7327
  module: "dist/index.js",
@@ -7366,10 +7373,10 @@ var package_default = {
7366
7373
  },
7367
7374
  dependencies: {
7368
7375
  "@lume/kiwi": "^0.4.3",
7369
- "@tscircuit/capacity-autorouter": "^0.0.34",
7376
+ "@tscircuit/capacity-autorouter": "^0.0.36",
7370
7377
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
7371
7378
  "@tscircuit/math-utils": "^0.0.9",
7372
- "@tscircuit/props": "^0.0.159",
7379
+ "@tscircuit/props": "^0.0.163",
7373
7380
  "@tscircuit/schematic-autolayout": "^0.0.6",
7374
7381
  "@tscircuit/soup-util": "^0.0.41",
7375
7382
  "circuit-json": "^0.0.153",
@@ -7666,34 +7673,54 @@ var sel = new Proxy(
7666
7673
  {},
7667
7674
  {
7668
7675
  get: (_, prop1) => {
7669
- return new Proxy(
7670
- {},
7671
- {
7672
- get: (_2, prop2) => {
7673
- if (prop1 === "net") {
7674
- return `net.${prop2}`;
7676
+ const fn = (...args) => {
7677
+ const chipFnOrPinType = args[0];
7678
+ return new Proxy(
7679
+ {},
7680
+ {
7681
+ get: (_2, pinName) => {
7682
+ return `.${prop1} > .${pinName}`;
7675
7683
  }
7676
- if (prop1 === "subcircuit") {
7677
- return new Proxy(
7678
- {},
7679
- {
7680
- get: (_3, prop3) => {
7681
- return new Proxy(
7682
- {},
7683
- {
7684
- get: (_4, prop4) => {
7685
- return `subcircuit.${prop2} > .${prop3} > .${prop4}`;
7686
- }
7684
+ }
7685
+ );
7686
+ };
7687
+ return new Proxy(fn, {
7688
+ // This handles dot notation access like sel.U1.PIN
7689
+ get: (_2, prop2) => {
7690
+ if (prop1 === "net") {
7691
+ return `net.${prop2}`;
7692
+ }
7693
+ if (prop1 === "subcircuit") {
7694
+ return new Proxy(
7695
+ {},
7696
+ {
7697
+ get: (_3, prop3) => {
7698
+ return new Proxy(
7699
+ {},
7700
+ {
7701
+ get: (_4, prop4) => {
7702
+ return `subcircuit.${prop2} > .${prop3} > .${prop4}`;
7687
7703
  }
7688
- );
7689
- }
7704
+ }
7705
+ );
7690
7706
  }
7691
- );
7692
- }
7693
- return `.${prop1} > .${prop2}`;
7707
+ }
7708
+ );
7694
7709
  }
7710
+ return `.${prop1} > .${prop2}`;
7711
+ },
7712
+ // This handles function calls like sel.U1(MyChip)
7713
+ apply: (target, _2, args) => {
7714
+ return new Proxy(
7715
+ {},
7716
+ {
7717
+ get: (_3, pinName) => {
7718
+ return `.${prop1} > .${pinName}`;
7719
+ }
7720
+ }
7721
+ );
7695
7722
  }
7696
- );
7723
+ });
7697
7724
  }
7698
7725
  }
7699
7726
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.353",
4
+ "version": "0.0.355",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -53,10 +53,10 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@lume/kiwi": "^0.4.3",
56
- "@tscircuit/capacity-autorouter": "^0.0.34",
56
+ "@tscircuit/capacity-autorouter": "^0.0.36",
57
57
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
58
58
  "@tscircuit/math-utils": "^0.0.9",
59
- "@tscircuit/props": "^0.0.159",
59
+ "@tscircuit/props": "^0.0.163",
60
60
  "@tscircuit/schematic-autolayout": "^0.0.6",
61
61
  "@tscircuit/soup-util": "^0.0.41",
62
62
  "circuit-json": "^0.0.153",