@tscircuit/core 0.0.117 → 0.0.118
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 +103 -74
- package/dist/index.js +15 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
|
5
5
|
import { PcbTraceError, PcbPlacementError, LayerRef, AnyCircuitElement, AnySourceComponent, RouteHintPoint } from 'circuit-json';
|
|
6
6
|
import { SoupUtilObjects } from '@tscircuit/soup-util';
|
|
7
7
|
import { Matrix } from 'transformation-matrix';
|
|
8
|
-
import * as
|
|
9
|
-
import { traceProps, groupProps, boardProps, capacitorProps, chipProps, diodeProps, jumperProps, ledProps, powerSourceProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, holeProps, pcbKeepoutProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, traceHintProps, viaProps } from '@tscircuit/props';
|
|
8
|
+
import * as _tscircuit_props from '@tscircuit/props';
|
|
9
|
+
import { traceProps, groupProps, boardProps, capacitorProps, chipProps, diodeProps, jumperProps, ledProps, powerSourceProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, holeProps, pcbKeepoutProps, netAliasProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, traceHintProps, viaProps } from '@tscircuit/props';
|
|
10
10
|
|
|
11
11
|
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTraceHintsFromProps", "SourceRender", "SourceParentAttachment", "PortDiscovery", "PortMatching", "SourceTraceRender", "SchematicComponentRender", "SchematicLayout", "SchematicPortRender", "SchematicTraceRender", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbLayout", "PcbTraceRender", "PcbTraceHintRender", "PcbRouteNetIslands", "PcbComponentSizeCalculation", "CadModelRender"];
|
|
12
12
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
@@ -806,7 +806,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
806
806
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
807
807
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
808
808
|
}>>;
|
|
809
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
809
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
810
810
|
}, {
|
|
811
811
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
812
812
|
}>, {
|
|
@@ -1062,7 +1062,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1062
1062
|
schY?: number | undefined;
|
|
1063
1063
|
schRotation?: number | undefined;
|
|
1064
1064
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
1065
|
-
footprint?:
|
|
1065
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
1066
1066
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
1067
1067
|
key?: any;
|
|
1068
1068
|
cadModel?: string | {
|
|
@@ -1136,7 +1136,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1136
1136
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
1137
1137
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1138
1138
|
} | undefined;
|
|
1139
|
-
footprint?:
|
|
1139
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
1140
1140
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
1141
1141
|
key?: any;
|
|
1142
1142
|
cadModel?: string | {
|
|
@@ -1253,7 +1253,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1253
1253
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
1254
1254
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1255
1255
|
}>>;
|
|
1256
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
1256
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
1257
1257
|
}, {
|
|
1258
1258
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
1259
1259
|
}>, {
|
|
@@ -1624,7 +1624,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1624
1624
|
schY?: number | undefined;
|
|
1625
1625
|
schRotation?: number | undefined;
|
|
1626
1626
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
1627
|
-
footprint?:
|
|
1627
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
1628
1628
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
1629
1629
|
key?: any;
|
|
1630
1630
|
cadModel?: string | {
|
|
@@ -1730,7 +1730,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1730
1730
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
1731
1731
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1732
1732
|
} | undefined;
|
|
1733
|
-
footprint?:
|
|
1733
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
1734
1734
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
1735
1735
|
key?: any;
|
|
1736
1736
|
cadModel?: string | {
|
|
@@ -1852,7 +1852,7 @@ declare class Diode extends NormalComponent<typeof diodeProps, PolarizedPassiveP
|
|
|
1852
1852
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
1853
1853
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1854
1854
|
}>>;
|
|
1855
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
1855
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
1856
1856
|
}, {
|
|
1857
1857
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
1858
1858
|
}>, {
|
|
@@ -2101,7 +2101,7 @@ declare class Diode extends NormalComponent<typeof diodeProps, PolarizedPassiveP
|
|
|
2101
2101
|
schY?: number | undefined;
|
|
2102
2102
|
schRotation?: number | undefined;
|
|
2103
2103
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
2104
|
-
footprint?:
|
|
2104
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
2105
2105
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2106
2106
|
key?: any;
|
|
2107
2107
|
cadModel?: string | {
|
|
@@ -2170,7 +2170,7 @@ declare class Diode extends NormalComponent<typeof diodeProps, PolarizedPassiveP
|
|
|
2170
2170
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
2171
2171
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
2172
2172
|
} | undefined;
|
|
2173
|
-
footprint?:
|
|
2173
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
2174
2174
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2175
2175
|
key?: any;
|
|
2176
2176
|
cadModel?: string | {
|
|
@@ -2258,7 +2258,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2258
2258
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
2259
2259
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
2260
2260
|
}>>;
|
|
2261
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
2261
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
2262
2262
|
}, {
|
|
2263
2263
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
2264
2264
|
}>, {
|
|
@@ -2630,7 +2630,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2630
2630
|
schY?: number | undefined;
|
|
2631
2631
|
schRotation?: number | undefined;
|
|
2632
2632
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
2633
|
-
footprint?:
|
|
2633
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
2634
2634
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2635
2635
|
key?: any;
|
|
2636
2636
|
cadModel?: string | {
|
|
@@ -2737,7 +2737,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2737
2737
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
2738
2738
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
2739
2739
|
} | undefined;
|
|
2740
|
-
footprint?:
|
|
2740
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
2741
2741
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2742
2742
|
key?: any;
|
|
2743
2743
|
cadModel?: string | {
|
|
@@ -2860,7 +2860,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
2860
2860
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
2861
2861
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
2862
2862
|
}>>;
|
|
2863
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
2863
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
2864
2864
|
}, {
|
|
2865
2865
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
2866
2866
|
}>, {
|
|
@@ -3111,7 +3111,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
3111
3111
|
schY?: number | undefined;
|
|
3112
3112
|
schRotation?: number | undefined;
|
|
3113
3113
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3114
|
-
footprint?:
|
|
3114
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
3115
3115
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
3116
3116
|
key?: any;
|
|
3117
3117
|
cadModel?: string | {
|
|
@@ -3181,7 +3181,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
3181
3181
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3182
3182
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3183
3183
|
} | undefined;
|
|
3184
|
-
footprint?:
|
|
3184
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
3185
3185
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
3186
3186
|
key?: any;
|
|
3187
3187
|
cadModel?: string | {
|
|
@@ -3270,7 +3270,7 @@ declare class PowerSource extends NormalComponent<typeof powerSourceProps, Polar
|
|
|
3270
3270
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3271
3271
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3272
3272
|
}>>;
|
|
3273
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
3273
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
3274
3274
|
}, {
|
|
3275
3275
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
3276
3276
|
}>, {
|
|
@@ -3522,7 +3522,7 @@ declare class PowerSource extends NormalComponent<typeof powerSourceProps, Polar
|
|
|
3522
3522
|
schY?: number | undefined;
|
|
3523
3523
|
schRotation?: number | undefined;
|
|
3524
3524
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3525
|
-
footprint?:
|
|
3525
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
3526
3526
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
3527
3527
|
key?: any;
|
|
3528
3528
|
cadModel?: string | {
|
|
@@ -3592,7 +3592,7 @@ declare class PowerSource extends NormalComponent<typeof powerSourceProps, Polar
|
|
|
3592
3592
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3593
3593
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3594
3594
|
} | undefined;
|
|
3595
|
-
footprint?:
|
|
3595
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
3596
3596
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
3597
3597
|
key?: any;
|
|
3598
3598
|
cadModel?: string | {
|
|
@@ -3680,7 +3680,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
3680
3680
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3681
3681
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3682
3682
|
}>>;
|
|
3683
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
3683
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
3684
3684
|
}, {
|
|
3685
3685
|
supplierPartNumbers: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
3686
3686
|
}>, {
|
|
@@ -3936,7 +3936,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
3936
3936
|
schY?: number | undefined;
|
|
3937
3937
|
schRotation?: number | undefined;
|
|
3938
3938
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3939
|
-
footprint?:
|
|
3939
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
3940
3940
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
3941
3941
|
key?: any;
|
|
3942
3942
|
cadModel?: string | {
|
|
@@ -4010,7 +4010,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
4010
4010
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
4011
4011
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
4012
4012
|
} | undefined;
|
|
4013
|
-
footprint?:
|
|
4013
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
4014
4014
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
4015
4015
|
key?: any;
|
|
4016
4016
|
cadModel?: string | {
|
|
@@ -4478,25 +4478,54 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
4478
4478
|
doInitialPcbPrimitiveRender(): void;
|
|
4479
4479
|
}
|
|
4480
4480
|
|
|
4481
|
-
declare const netAliasProps: z.ZodObject<{
|
|
4482
|
-
net: z.ZodString;
|
|
4483
|
-
}, "strip", z.ZodTypeAny, {
|
|
4484
|
-
net: string;
|
|
4485
|
-
}, {
|
|
4486
|
-
net: string;
|
|
4487
|
-
}>;
|
|
4488
4481
|
declare class NetAlias extends PrimitiveComponent<typeof netAliasProps> {
|
|
4489
4482
|
source_net_alias_id?: string;
|
|
4490
4483
|
get config(): {
|
|
4491
4484
|
componentName: string;
|
|
4492
|
-
zodProps:
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4485
|
+
zodProps: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
4486
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4487
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4488
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4489
|
+
schX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4490
|
+
schY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4491
|
+
schRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
4492
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
4493
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
4494
|
+
}, "strip", zod.ZodTypeAny, {
|
|
4495
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
4496
|
+
}, {
|
|
4497
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
4498
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
4499
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
4500
|
+
}>>;
|
|
4501
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
4502
|
+
}, {
|
|
4503
|
+
net: zod.ZodOptional<zod.ZodString>;
|
|
4504
|
+
}>, "strip", zod.ZodTypeAny, {
|
|
4505
|
+
pcbX?: number | undefined;
|
|
4506
|
+
pcbY?: number | undefined;
|
|
4507
|
+
pcbRotation?: number | undefined;
|
|
4508
|
+
schX?: number | undefined;
|
|
4509
|
+
schY?: number | undefined;
|
|
4510
|
+
schRotation?: number | undefined;
|
|
4511
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
4512
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
4513
|
+
net?: string | undefined;
|
|
4496
4514
|
}, {
|
|
4497
|
-
|
|
4515
|
+
pcbX?: string | number | undefined;
|
|
4516
|
+
pcbY?: string | number | undefined;
|
|
4517
|
+
pcbRotation?: string | number | undefined;
|
|
4518
|
+
schX?: string | number | undefined;
|
|
4519
|
+
schY?: string | number | undefined;
|
|
4520
|
+
schRotation?: string | number | undefined;
|
|
4521
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
4522
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
4523
|
+
} | undefined;
|
|
4524
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
4525
|
+
net?: string | undefined;
|
|
4498
4526
|
}>;
|
|
4499
4527
|
};
|
|
4528
|
+
initPorts(): void;
|
|
4500
4529
|
doInitialSchematicComponentRender(): void;
|
|
4501
4530
|
}
|
|
4502
4531
|
|
|
@@ -5146,7 +5175,7 @@ declare class Via extends PrimitiveComponent<typeof viaProps> {
|
|
|
5146
5175
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5147
5176
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5148
5177
|
}>>;
|
|
5149
|
-
footprint: zod.ZodOptional<zod.ZodType<
|
|
5178
|
+
footprint: zod.ZodOptional<zod.ZodType<_tscircuit_props.Footprint, zod.ZodTypeDef, _tscircuit_props.Footprint>>;
|
|
5150
5179
|
}, {
|
|
5151
5180
|
fromLayer: zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
5152
5181
|
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
@@ -5180,7 +5209,7 @@ declare class Via extends PrimitiveComponent<typeof viaProps> {
|
|
|
5180
5209
|
schY?: number | undefined;
|
|
5181
5210
|
schRotation?: number | undefined;
|
|
5182
5211
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
5183
|
-
footprint?:
|
|
5212
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
5184
5213
|
}, {
|
|
5185
5214
|
fromLayer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5186
5215
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
@@ -5199,7 +5228,7 @@ declare class Via extends PrimitiveComponent<typeof viaProps> {
|
|
|
5199
5228
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5200
5229
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5201
5230
|
} | undefined;
|
|
5202
|
-
footprint?:
|
|
5231
|
+
footprint?: _tscircuit_props.Footprint | undefined;
|
|
5203
5232
|
}>;
|
|
5204
5233
|
};
|
|
5205
5234
|
getAvailablePcbLayers(): string[];
|
|
@@ -5240,44 +5269,44 @@ declare const createUseComponent: <C extends React.ComponentType<any>, PiD exten
|
|
|
5240
5269
|
declare global {
|
|
5241
5270
|
namespace JSX {
|
|
5242
5271
|
interface IntrinsicElements {
|
|
5243
|
-
resistor:
|
|
5244
|
-
capacitor:
|
|
5245
|
-
inductor:
|
|
5246
|
-
diode:
|
|
5247
|
-
led:
|
|
5248
|
-
board:
|
|
5249
|
-
jumper:
|
|
5250
|
-
bug:
|
|
5251
|
-
chip:
|
|
5252
|
-
powersource:
|
|
5253
|
-
via:
|
|
5254
|
-
schematicbox:
|
|
5255
|
-
schematicline:
|
|
5256
|
-
schematicpath:
|
|
5257
|
-
schematictext:
|
|
5258
|
-
smtpad:
|
|
5259
|
-
platedhole:
|
|
5260
|
-
keepout:
|
|
5261
|
-
hole:
|
|
5262
|
-
port:
|
|
5263
|
-
group:
|
|
5264
|
-
netalias:
|
|
5265
|
-
net:
|
|
5266
|
-
trace:
|
|
5272
|
+
resistor: _tscircuit_props.ResistorProps;
|
|
5273
|
+
capacitor: _tscircuit_props.CapacitorProps;
|
|
5274
|
+
inductor: _tscircuit_props.InductorProps;
|
|
5275
|
+
diode: _tscircuit_props.DiodeProps;
|
|
5276
|
+
led: _tscircuit_props.LedProps;
|
|
5277
|
+
board: _tscircuit_props.BoardProps;
|
|
5278
|
+
jumper: _tscircuit_props.JumperProps;
|
|
5279
|
+
bug: _tscircuit_props.ChipProps;
|
|
5280
|
+
chip: _tscircuit_props.ChipProps;
|
|
5281
|
+
powersource: _tscircuit_props.PowerSourceProps;
|
|
5282
|
+
via: _tscircuit_props.ViaProps;
|
|
5283
|
+
schematicbox: _tscircuit_props.SchematicBoxProps;
|
|
5284
|
+
schematicline: _tscircuit_props.SchematicLineProps;
|
|
5285
|
+
schematicpath: _tscircuit_props.SchematicPathProps;
|
|
5286
|
+
schematictext: _tscircuit_props.SchematicTextProps;
|
|
5287
|
+
smtpad: _tscircuit_props.SmtPadProps;
|
|
5288
|
+
platedhole: _tscircuit_props.PlatedHoleProps;
|
|
5289
|
+
keepout: _tscircuit_props.PcbKeepoutProps;
|
|
5290
|
+
hole: _tscircuit_props.HoleProps;
|
|
5291
|
+
port: _tscircuit_props.PortProps;
|
|
5292
|
+
group: _tscircuit_props.GroupProps;
|
|
5293
|
+
netalias: _tscircuit_props.NetAliasProps;
|
|
5294
|
+
net: _tscircuit_props.NetProps;
|
|
5295
|
+
trace: _tscircuit_props.TraceProps;
|
|
5267
5296
|
custom: any;
|
|
5268
|
-
component:
|
|
5297
|
+
component: _tscircuit_props.ComponentProps;
|
|
5269
5298
|
footprint: any;
|
|
5270
|
-
silkscreentext:
|
|
5271
|
-
silkscreenpath:
|
|
5272
|
-
silkscreenline:
|
|
5273
|
-
silkscreenrect:
|
|
5274
|
-
silkscreencircle:
|
|
5275
|
-
tracehint:
|
|
5276
|
-
pcbtrace:
|
|
5277
|
-
fabricationnotetext:
|
|
5278
|
-
fabricationnotepath:
|
|
5279
|
-
constraint:
|
|
5280
|
-
constrainedlayout:
|
|
5299
|
+
silkscreentext: _tscircuit_props.SilkscreenTextProps;
|
|
5300
|
+
silkscreenpath: _tscircuit_props.SilkscreenPathProps;
|
|
5301
|
+
silkscreenline: _tscircuit_props.SilkscreenLineProps;
|
|
5302
|
+
silkscreenrect: _tscircuit_props.SilkscreenRectProps;
|
|
5303
|
+
silkscreencircle: _tscircuit_props.SilkscreenCircleProps;
|
|
5304
|
+
tracehint: _tscircuit_props.TraceHintProps;
|
|
5305
|
+
pcbtrace: _tscircuit_props.PcbTraceProps;
|
|
5306
|
+
fabricationnotetext: _tscircuit_props.FabricationNoteTextProps;
|
|
5307
|
+
fabricationnotepath: _tscircuit_props.FabricationNotePathProps;
|
|
5308
|
+
constraint: _tscircuit_props.ConstraintProps;
|
|
5309
|
+
constrainedlayout: _tscircuit_props.ConstrainedLayoutProps;
|
|
5281
5310
|
jscad: any;
|
|
5282
5311
|
}
|
|
5283
5312
|
}
|
package/dist/index.js
CHANGED
|
@@ -3483,10 +3483,10 @@ var Diode = class extends NormalComponent {
|
|
|
3483
3483
|
}
|
|
3484
3484
|
initPorts() {
|
|
3485
3485
|
this.add(
|
|
3486
|
-
new Port({ name: "pin1", pinNumber: 1, aliases: ["anode", "pos"] })
|
|
3486
|
+
new Port({ name: "pin1", pinNumber: 1, aliases: ["anode", "pos", "left"] })
|
|
3487
3487
|
);
|
|
3488
3488
|
this.add(
|
|
3489
|
-
new Port({ name: "pin2", pinNumber: 2, aliases: ["cathode", "neg"] })
|
|
3489
|
+
new Port({ name: "pin2", pinNumber: 2, aliases: ["cathode", "neg", "right"] })
|
|
3490
3490
|
);
|
|
3491
3491
|
}
|
|
3492
3492
|
pos = this.portMap.pin1;
|
|
@@ -3582,8 +3582,8 @@ var Led = class extends NormalComponent {
|
|
|
3582
3582
|
};
|
|
3583
3583
|
}
|
|
3584
3584
|
initPorts() {
|
|
3585
|
-
this.add(new Port({ name: "pin1", pinNumber: 1, aliases: ["anode", "pos"] }));
|
|
3586
|
-
this.add(new Port({ name: "pin2", pinNumber: 2, aliases: ["cathode", "neg"] }));
|
|
3585
|
+
this.add(new Port({ name: "pin1", pinNumber: 1, aliases: ["anode", "pos", "left"] }));
|
|
3586
|
+
this.add(new Port({ name: "pin2", pinNumber: 2, aliases: ["cathode", "neg", "right"] }));
|
|
3587
3587
|
}
|
|
3588
3588
|
pos = this.portMap.pin1;
|
|
3589
3589
|
anode = this.portMap.pin1;
|
|
@@ -3803,10 +3803,7 @@ var FabricationNoteText = class extends PrimitiveComponent {
|
|
|
3803
3803
|
};
|
|
3804
3804
|
|
|
3805
3805
|
// lib/components/primitive-components/NetAlias.ts
|
|
3806
|
-
import {
|
|
3807
|
-
var netAliasProps = z9.object({
|
|
3808
|
-
net: z9.string()
|
|
3809
|
-
});
|
|
3806
|
+
import { netAliasProps } from "@tscircuit/props";
|
|
3810
3807
|
var NetAlias = class extends PrimitiveComponent {
|
|
3811
3808
|
source_net_alias_id;
|
|
3812
3809
|
get config() {
|
|
@@ -3815,13 +3812,22 @@ var NetAlias = class extends PrimitiveComponent {
|
|
|
3815
3812
|
zodProps: netAliasProps
|
|
3816
3813
|
};
|
|
3817
3814
|
}
|
|
3815
|
+
initPorts() {
|
|
3816
|
+
this.add(
|
|
3817
|
+
new Port({
|
|
3818
|
+
name: "pin1",
|
|
3819
|
+
pinNumber: 1,
|
|
3820
|
+
aliases: ["anode", "pos", "left"]
|
|
3821
|
+
})
|
|
3822
|
+
);
|
|
3823
|
+
}
|
|
3818
3824
|
doInitialSchematicComponentRender() {
|
|
3819
3825
|
const { db } = this.root;
|
|
3820
3826
|
const { _parsedProps: props } = this;
|
|
3821
3827
|
const netAlias = db.schematic_net_label.insert({
|
|
3822
3828
|
text: props.net,
|
|
3823
3829
|
source_net_id: props.net,
|
|
3824
|
-
center: { x: 0, y: 0 },
|
|
3830
|
+
center: { x: props.schX ?? 0, y: props.schY ?? 0 },
|
|
3825
3831
|
anchor_side: "bottom"
|
|
3826
3832
|
});
|
|
3827
3833
|
this.source_net_alias_id = netAlias.source_net_id;
|