Skip to content
Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"bun-match-svg": "^0.0.12",
"circuit-json": "^0.0.411",
"circuit-json-to-connectivity-map": "^0.0.18",
"circuit-to-svg": "^0.0.354",
"circuit-to-svg": "^0.0.371",
"esbuild": "^0.21.4",
"esbuild-register": "^3.5.0",
"react": "^19.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod110.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -69,6 +70,7 @@ export const sod110 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
5 changes: 4 additions & 1 deletion src/fn/sod123.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand All @@ -19,9 +20,10 @@ export const sod123 = (
raw_params: z.input<typeof sod_def>,
): { circuitJson: AnyCircuitElement[]; parameters: any } => {
const parameters = sod_def.parse(raw_params)
const bodyHeight = length.parse(parameters.h)
const silkscreenRefText: SilkscreenRef = silkscreenRef(
0,
length.parse(parameters.h) / 4 + 0.4,
bodyHeight / 4 + 0.4,
0.3,
)

Expand All @@ -39,6 +41,7 @@ export const sod123 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
),
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod123f.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod123f = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod123fl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod123FL_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod123fl = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod123w.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod123w = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod128.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod128 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod323.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -71,6 +72,7 @@ export const sod323 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod323f.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod323f = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod323fl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod323FL_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod323fl = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod323w.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod323w_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod323w = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod523.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod523 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod723.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -71,6 +72,7 @@ export const sod723 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod80.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod80_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -71,6 +72,7 @@ export const sod80 = (

return {
circuitJson: sod80WithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod882.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod882 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod882d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { rectpad } from "../helpers/rectpad"
import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -72,6 +73,7 @@ export const sod882d = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
2 changes: 2 additions & 0 deletions src/fn/sod923.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { silkscreenRef, type SilkscreenRef } from "src/helpers/silkscreenRef"
import { length } from "circuit-json"
import { base_def } from "../helpers/zod/base_def"
import { createRectUnionOutline } from "src/helpers/rect-union-outline"
import { createFabricationNoteDiodeFromCopperPads } from "../helpers/create-fabrication-note-diode"

export const sod_def = base_def.extend({
fn: z.string(),
Expand Down Expand Up @@ -96,6 +97,7 @@ export const sod923 = (

return {
circuitJson: sodWithoutParsing(parameters).concat(
...createFabricationNoteDiodeFromCopperPads(parameters),
silkscreenLine as AnyCircuitElement,
silkscreenRefText as AnyCircuitElement,
courtyard as AnyCircuitElement,
Expand Down
Loading
Loading