@tscircuit/core 0.0.408 → 0.0.410
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 +43 -7
- package/dist/index.js +25 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2591,6 +2591,16 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2591
2591
|
topPinCount?: number | undefined;
|
|
2592
2592
|
bottomPinCount?: number | undefined;
|
|
2593
2593
|
}>>;
|
|
2594
|
+
pinCompatibleVariants: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
2595
|
+
manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
|
|
2596
|
+
supplierPartNumber: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
2597
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2598
|
+
manufacturerPartNumber?: string | undefined;
|
|
2599
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2600
|
+
}, {
|
|
2601
|
+
manufacturerPartNumber?: string | undefined;
|
|
2602
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2603
|
+
}>, "many">>;
|
|
2594
2604
|
schPinStyle: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2595
2605
|
marginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
2596
2606
|
marginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -2749,6 +2759,10 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2749
2759
|
topPinCount?: number | undefined;
|
|
2750
2760
|
bottomPinCount?: number | undefined;
|
|
2751
2761
|
} | undefined;
|
|
2762
|
+
pinCompatibleVariants?: {
|
|
2763
|
+
manufacturerPartNumber?: string | undefined;
|
|
2764
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2765
|
+
}[] | undefined;
|
|
2752
2766
|
schPinStyle?: Record<string, {
|
|
2753
2767
|
marginLeft?: number | undefined;
|
|
2754
2768
|
marginRight?: number | undefined;
|
|
@@ -2889,6 +2903,10 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2889
2903
|
topPinCount?: number | undefined;
|
|
2890
2904
|
bottomPinCount?: number | undefined;
|
|
2891
2905
|
} | undefined;
|
|
2906
|
+
pinCompatibleVariants?: {
|
|
2907
|
+
manufacturerPartNumber?: string | undefined;
|
|
2908
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2909
|
+
}[] | undefined;
|
|
2892
2910
|
schPinStyle?: Record<string, {
|
|
2893
2911
|
marginLeft?: string | number | undefined;
|
|
2894
2912
|
marginRight?: string | number | undefined;
|
|
@@ -6100,7 +6118,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6100
6118
|
rectPadHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
6101
6119
|
holeShape: zod.ZodOptional<zod.ZodLiteral<"circle">>;
|
|
6102
6120
|
padShape: zod.ZodOptional<zod.ZodLiteral<"rect">>;
|
|
6103
|
-
shape: zod.ZodOptional<zod.ZodLiteral<"
|
|
6121
|
+
shape: zod.ZodOptional<zod.ZodLiteral<"circular_hole_with_rect_pad">>;
|
|
6104
6122
|
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
6105
6123
|
}, "strip", zod.ZodTypeAny, {
|
|
6106
6124
|
holeDiameter: number;
|
|
@@ -6109,7 +6127,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6109
6127
|
pcbX?: number | undefined;
|
|
6110
6128
|
pcbY?: number | undefined;
|
|
6111
6129
|
name?: string | undefined;
|
|
6112
|
-
shape?: "
|
|
6130
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6113
6131
|
portHints?: (string | number)[] | undefined;
|
|
6114
6132
|
holeShape?: "circle" | undefined;
|
|
6115
6133
|
padShape?: "rect" | undefined;
|
|
@@ -6120,7 +6138,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6120
6138
|
pcbX?: string | number | undefined;
|
|
6121
6139
|
pcbY?: string | number | undefined;
|
|
6122
6140
|
name?: string | undefined;
|
|
6123
|
-
shape?: "
|
|
6141
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6124
6142
|
portHints?: (string | number)[] | undefined;
|
|
6125
6143
|
holeShape?: "circle" | undefined;
|
|
6126
6144
|
padShape?: "rect" | undefined;
|
|
@@ -6131,7 +6149,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6131
6149
|
pcbX?: number | undefined;
|
|
6132
6150
|
pcbY?: number | undefined;
|
|
6133
6151
|
name?: string | undefined;
|
|
6134
|
-
shape?: "
|
|
6152
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6135
6153
|
portHints?: (string | number)[] | undefined;
|
|
6136
6154
|
holeShape?: "circle" | undefined;
|
|
6137
6155
|
padShape?: "rect" | undefined;
|
|
@@ -6142,7 +6160,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6142
6160
|
pcbX?: string | number | undefined;
|
|
6143
6161
|
pcbY?: string | number | undefined;
|
|
6144
6162
|
name?: string | undefined;
|
|
6145
|
-
shape?: "
|
|
6163
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6146
6164
|
portHints?: (string | number)[] | undefined;
|
|
6147
6165
|
holeShape?: "circle" | undefined;
|
|
6148
6166
|
padShape?: "rect" | undefined;
|
|
@@ -6185,7 +6203,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6185
6203
|
pcbX?: number | undefined;
|
|
6186
6204
|
pcbY?: number | undefined;
|
|
6187
6205
|
name?: string | undefined;
|
|
6188
|
-
shape?: "
|
|
6206
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6189
6207
|
portHints?: (string | number)[] | undefined;
|
|
6190
6208
|
holeShape?: "circle" | undefined;
|
|
6191
6209
|
padShape?: "rect" | undefined;
|
|
@@ -6228,7 +6246,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
6228
6246
|
pcbX?: string | number | undefined;
|
|
6229
6247
|
pcbY?: string | number | undefined;
|
|
6230
6248
|
name?: string | undefined;
|
|
6231
|
-
shape?: "
|
|
6249
|
+
shape?: "circular_hole_with_rect_pad" | undefined;
|
|
6232
6250
|
portHints?: (string | number)[] | undefined;
|
|
6233
6251
|
holeShape?: "circle" | undefined;
|
|
6234
6252
|
padShape?: "rect" | undefined;
|
|
@@ -9772,6 +9790,16 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
9772
9790
|
topPinCount?: number | undefined;
|
|
9773
9791
|
bottomPinCount?: number | undefined;
|
|
9774
9792
|
}>>;
|
|
9793
|
+
pinCompatibleVariants: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
9794
|
+
manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
|
|
9795
|
+
supplierPartNumber: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, zod.ZodArray<zod.ZodString, "many">>>;
|
|
9796
|
+
}, "strip", zod.ZodTypeAny, {
|
|
9797
|
+
manufacturerPartNumber?: string | undefined;
|
|
9798
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
9799
|
+
}, {
|
|
9800
|
+
manufacturerPartNumber?: string | undefined;
|
|
9801
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
9802
|
+
}>, "many">>;
|
|
9775
9803
|
schPinStyle: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
9776
9804
|
marginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
9777
9805
|
marginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -9930,6 +9958,10 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
9930
9958
|
topPinCount?: number | undefined;
|
|
9931
9959
|
bottomPinCount?: number | undefined;
|
|
9932
9960
|
} | undefined;
|
|
9961
|
+
pinCompatibleVariants?: {
|
|
9962
|
+
manufacturerPartNumber?: string | undefined;
|
|
9963
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
9964
|
+
}[] | undefined;
|
|
9933
9965
|
schPinStyle?: Record<string, {
|
|
9934
9966
|
marginLeft?: number | undefined;
|
|
9935
9967
|
marginRight?: number | undefined;
|
|
@@ -10070,6 +10102,10 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
10070
10102
|
topPinCount?: number | undefined;
|
|
10071
10103
|
bottomPinCount?: number | undefined;
|
|
10072
10104
|
} | undefined;
|
|
10105
|
+
pinCompatibleVariants?: {
|
|
10106
|
+
manufacturerPartNumber?: string | undefined;
|
|
10107
|
+
supplierPartNumber?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
10108
|
+
}[] | undefined;
|
|
10073
10109
|
schPinStyle?: Record<string, {
|
|
10074
10110
|
marginLeft?: string | number | undefined;
|
|
10075
10111
|
marginRight?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1689,7 +1689,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1689
1689
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1690
1690
|
}) : db.pcb_smtpad.insert({
|
|
1691
1691
|
pcb_component_id,
|
|
1692
|
-
layer: props.layer ?? "top",
|
|
1692
|
+
layer: maybeFlipLayer(props.layer ?? "top"),
|
|
1693
1693
|
shape: "rotated_rect",
|
|
1694
1694
|
...{ width: props.width, height: props.height },
|
|
1695
1695
|
x: position.x,
|
|
@@ -1701,7 +1701,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1701
1701
|
});
|
|
1702
1702
|
if (pcb_smtpad.shape === "rect")
|
|
1703
1703
|
db.pcb_solder_paste.insert({
|
|
1704
|
-
layer:
|
|
1704
|
+
layer: maybeFlipLayer(props.layer ?? "top"),
|
|
1705
1705
|
shape: "rect",
|
|
1706
1706
|
// @ts-ignore: no idea why this is triggering
|
|
1707
1707
|
width: pcb_smtpad.width * 0.7,
|
|
@@ -1715,7 +1715,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1715
1715
|
});
|
|
1716
1716
|
if (pcb_smtpad.shape === "rotated_rect")
|
|
1717
1717
|
db.pcb_solder_paste.insert({
|
|
1718
|
-
layer:
|
|
1718
|
+
layer: maybeFlipLayer(props.layer ?? "top"),
|
|
1719
1719
|
shape: "rotated_rect",
|
|
1720
1720
|
// @ts-ignore: no idea why this is triggering
|
|
1721
1721
|
width: pcb_smtpad.width * 0.7,
|
|
@@ -1971,6 +1971,9 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
1971
1971
|
if (props.shape === "oval" || props.shape === "pill") {
|
|
1972
1972
|
return { width: props.outerWidth, height: props.outerHeight };
|
|
1973
1973
|
}
|
|
1974
|
+
if (props.shape === "circular_hole_with_rect_pad") {
|
|
1975
|
+
return { width: props.rectPadWidth, height: props.rectPadHeight };
|
|
1976
|
+
}
|
|
1974
1977
|
throw new Error(
|
|
1975
1978
|
`getPcbSize for shape "${props.shape}" not implemented for ${this.componentName}`
|
|
1976
1979
|
);
|
|
@@ -2097,6 +2100,22 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
2097
2100
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
2098
2101
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
2099
2102
|
});
|
|
2103
|
+
} else if (props.shape === "circular_hole_with_rect_pad") {
|
|
2104
|
+
const pcb_plated_hole = db.pcb_plated_hole.insert({
|
|
2105
|
+
pcb_component_id,
|
|
2106
|
+
pcb_port_id: this.matchedPort?.pcb_port_id,
|
|
2107
|
+
hole_diameter: props.holeDiameter,
|
|
2108
|
+
rect_pad_width: props.rectPadWidth,
|
|
2109
|
+
rect_pad_height: props.rectPadHeight,
|
|
2110
|
+
shape: "circular_hole_with_rect_pad",
|
|
2111
|
+
port_hints: this.getNameAndAliases(),
|
|
2112
|
+
x: position.x,
|
|
2113
|
+
y: position.y,
|
|
2114
|
+
layers: ["top", "bottom"],
|
|
2115
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
2116
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
2117
|
+
});
|
|
2118
|
+
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
2100
2119
|
}
|
|
2101
2120
|
}
|
|
2102
2121
|
doInitialPcbPortAttachment() {
|
|
@@ -8236,7 +8255,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
8236
8255
|
var package_default = {
|
|
8237
8256
|
name: "@tscircuit/core",
|
|
8238
8257
|
type: "module",
|
|
8239
|
-
version: "0.0.
|
|
8258
|
+
version: "0.0.409",
|
|
8240
8259
|
types: "dist/index.d.ts",
|
|
8241
8260
|
main: "dist/index.js",
|
|
8242
8261
|
module: "dist/index.js",
|
|
@@ -8287,10 +8306,10 @@ var package_default = {
|
|
|
8287
8306
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
8288
8307
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
8289
8308
|
"@tscircuit/math-utils": "^0.0.18",
|
|
8290
|
-
"@tscircuit/props": "^0.0.
|
|
8309
|
+
"@tscircuit/props": "^0.0.183",
|
|
8291
8310
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
8292
8311
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
8293
|
-
"circuit-json": "0.0.170",
|
|
8312
|
+
"circuit-json": "^0.0.170",
|
|
8294
8313
|
"schematic-symbols": "^0.0.132"
|
|
8295
8314
|
},
|
|
8296
8315
|
peerDependencies: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.410",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
53
53
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
54
54
|
"@tscircuit/math-utils": "^0.0.18",
|
|
55
|
-
"@tscircuit/props": "^0.0.
|
|
55
|
+
"@tscircuit/props": "^0.0.183",
|
|
56
56
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
57
57
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
58
|
-
"circuit-json": "0.0.170",
|
|
58
|
+
"circuit-json": "^0.0.170",
|
|
59
59
|
"schematic-symbols": "^0.0.132"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|