Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "@tscircuit/footprinter",
"dependencies": {
"@tscircuit/mm": "^0.0.8",
"zod": "^3.23.8",
"zod": "^3.25.74",
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
Expand Down Expand Up @@ -517,10 +517,14 @@

"yn": ["[email protected]", "", {}, "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q=="],

"zod": ["[email protected].64", "", {}, "sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g=="],
"zod": ["[email protected].74", "", {}, "sha512-J8poo92VuhKjNknViHRAIuuN6li/EwFbAC8OedzI8uxpEPGiXHGQu9wemIAioIpqgfB4SySaJhdk0mH5Y4ICBg=="],

"@jridgewell/gen-mapping/@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="],

"@tscircuit/footprinter/zod": ["[email protected]", "", {}, "sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g=="],

"circuit-json/zod": ["[email protected]", "", {}, "sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g=="],

"circuit-to-svg/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw=="],

"color/color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@tscircuit/mm": "^0.0.8",
"zod": "^3.23.8"
"zod": "^3.25.74"
},
"peerDependencies": {
"circuit-json": "*"
Expand Down
1 change: 1 addition & 0 deletions src/fn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export { pushbutton } from "./pushbutton"
export { stampboard } from "./stampboard"
export { stampreceiver } from "./stampreceiver"
export { lqfp } from "./lqfp"
export { tqfp } from "./tqfp"
export { breakoutheaders } from "./breakoutheaders"
export { hc49 } from "./hc49"
export { pad } from "./pad"
Expand Down
11 changes: 11 additions & 0 deletions src/fn/tqfp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { AnyCircuitElement } from "circuit-json"
import type { z } from "zod"
import { qfp, qfp_def } from "./qfp"

export const tqfp_def = qfp_def

export const tqfp = (
raw_params: z.input<typeof tqfp_def>,
): { circuitJson: AnyCircuitElement[]; parameters: any } => {
return qfp(raw_params)
}
1 change: 1 addition & 0 deletions src/footprinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export type Footprinter = {
ms013: () => FootprinterParamsBuilder<"w" | "p">
ms012: () => FootprinterParamsBuilder<"w" | "p">
lqfp: (num_pins?: number) => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">
tqfp: (num_pins?: number) => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">
sma: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">
smf: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">
smb: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">
Expand Down
1 change: 1 addition & 0 deletions tests/__snapshots__/tqfp64_w10_h10_pl1_pw0.25mm.snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/get-footprint-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ test("getFootprintNamesByType groups footprint names by component type", () => {
expect(normalFootprintNames).toContain("dip")
expect(normalFootprintNames).toContain("soic")
expect(normalFootprintNames).toContain("qfp")
expect(normalFootprintNames).toContain("tqfp")
expect(normalFootprintNames).not.toContain("res")
expect(normalFootprintNames).not.toContain("cap")
expect(normalFootprintNames).not.toContain("diode")
Expand Down
12 changes: 12 additions & 0 deletions tests/tqfp.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { test, expect } from "bun:test"
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
import { fp } from "../src/footprinter"

test("tqfp64_w10_h10_pl1_pw0.25mm", () => {
const soup = fp.string("tqfp64_w10_h10_pl1_pw0.25mm").circuitJson()
const svgContent = convertCircuitJsonToPcbSvg(soup)
expect(svgContent).toMatchSvgSnapshot(
import.meta.path,
"tqfp64_w10_h10_pl1_pw0.25mm",
)
})
Loading