diff --git a/.storybook/preview.ts b/.storybook/preview.ts index 37914b1..62a4ea3 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -1,4 +1,4 @@ -import type { Preview } from "@storybook/react"; +import type { Preview } from "@storybook/react" const preview: Preview = { parameters: { @@ -9,6 +9,6 @@ const preview: Preview = { }, }, }, -}; +} -export default preview; +export default preview diff --git a/bun.lockb b/bun.lockb index c80be13..2af0d45 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/sch/svg-object-fns/create-svg-objects-from-sch-component.ts b/lib/sch/svg-object-fns/create-svg-objects-from-sch-component.ts index e3e7462..1aef835 100644 --- a/lib/sch/svg-object-fns/create-svg-objects-from-sch-component.ts +++ b/lib/sch/svg-object-fns/create-svg-objects-from-sch-component.ts @@ -4,16 +4,16 @@ import { getSvg, symbols } from "schematic-symbols" import { parseSync } from "svgson" interface PortArrangementCenter { - x: number - y: number - trueIndex: number - pinNumber: number - side: "left" | "right" | "top" | "bottom" - distanceFromEdge: number + x: number + y: number + trueIndex: number + pinNumber: number + side: "left" | "right" | "top" | "bottom" + distanceFromEdge: number } interface PortArrangement extends SchematicPort { - center: PortArrangementCenter + center: PortArrangementCenter } export function createSchematicComponent( @@ -140,7 +140,7 @@ export function createSchematicComponent( const portLength = 0.2 const circleRadius = 0.05 - for (const port of (schematicPorts as PortArrangement[])) { + for (const port of schematicPorts as PortArrangement[]) { const { x, y, pinNumber } = port.center let endX = x let endY = y diff --git a/package.json b/package.json index 6414807..df143e6 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "version": "0.0.40", "description": "Convert Circuit JSON to SVG", "main": "dist/index.js", - "files": [ - "dist" - ], + "files": ["dist"], "scripts": { "start": "storybook dev -p 6006", "prepublish": "npm run build", @@ -48,7 +46,7 @@ "@tscircuit/soup-util": "^0.0.28", "@types/node": "^22.5.5", "circuit-json": "*", - "schematic-symbols": "^0.0.32", + "schematic-symbols": "^0.0.79", "svgson": "^5.3.1", "transformation-matrix": "^2.16.1" } diff --git a/stories/net-label-not-overlap.stories.tsx b/stories/net-label-not-overlap.stories.tsx index 717ed01..df78b47 100644 --- a/stories/net-label-not-overlap.stories.tsx +++ b/stories/net-label-not-overlap.stories.tsx @@ -1,5 +1,8 @@ import React, { useEffect, useState } from "react" -import { circuitJsonToSchematicSvg, convertCircuitJsonToPcbSvg } from "../lib/index.js" +import { + circuitJsonToSchematicSvg, + convertCircuitJsonToPcbSvg, +} from "../lib/index.js" const soup: any = [ { diff --git a/stories/schematic-resistor-capacitor.stories.tsx b/stories/schematic-resistor-capacitor.stories.tsx index 43435f9..12fbdbe 100644 --- a/stories/schematic-resistor-capacitor.stories.tsx +++ b/stories/schematic-resistor-capacitor.stories.tsx @@ -1,4 +1,4 @@ -import { convertCircuitJsonToSchematicSvg } from "../lib/index.js"; +import { convertCircuitJsonToSchematicSvg } from "../lib/index.js" const soup: any = [ { @@ -788,15 +788,15 @@ const soup: any = [ source_component_id: "source_component_1", footprinter_string: "0402", }, -]; +] export const ResistorCapacitorSch = () => { - const result = convertCircuitJsonToSchematicSvg(soup); + const result = convertCircuitJsonToSchematicSvg(soup) - return
; -}; + return +} export default { title: "Resistor and Capacitor Schematic", component: ResistorCapacitorSch, -}; +} diff --git a/tests/pcb/silkscreen-with-hole-and-trace.test.ts b/tests/pcb/silkscreen-with-hole-and-trace.test.ts index d4da9c5..2e13635 100644 --- a/tests/pcb/silkscreen-with-hole-and-trace.test.ts +++ b/tests/pcb/silkscreen-with-hole-and-trace.test.ts @@ -1075,5 +1075,7 @@ const pcbSoup: any[] = [ ] test("Silkscreen with PCB Plated Hole", () => { - expect(convertCircuitJsonToPcbSvg(pcbSoup)).toMatchSvgSnapshot(import.meta.path) + expect(convertCircuitJsonToPcbSvg(pcbSoup)).toMatchSvgSnapshot( + import.meta.path, + ) }) diff --git a/tests/sch/__snapshots__/kicad-theme-demo.snap.svg b/tests/sch/__snapshots__/kicad-theme-demo.snap.svg index 16d197b..5d6b4e7 100644 --- a/tests/sch/__snapshots__/kicad-theme-demo.snap.svg +++ b/tests/sch/__snapshots__/kicad-theme-demo.snap.svg @@ -7,4 +7,4 @@ .pin-number { font-size: 0.15px; fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { font-size: 0.25px; fill: rgb(0, 100, 100); } -