circuit-to-canvas 0.0.12 → 0.0.13
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/package.json +2 -2
- package/tests/elements/__snapshots__/fabrication-note-text-descenders.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-copper-text-knockout.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-fabrication-note-rect-dashed.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-note-rect-dashed-stroke.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-silkscreen.snap.png +0 -0
- package/tests/elements/__snapshots__/silkscreen-text-bottom.snap.png +0 -0
- package/tests/elements/pcb-board.test.ts +1 -1
- package/tests/elements/pcb-copper-pour.test.ts +1 -1
- package/tests/elements/pcb-copper-text.test.ts +1 -1
- package/tests/elements/pcb-cutout.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-path-custom-color.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-path-thick-stroke.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-path.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-rect-all-features.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-rect-corner-radius.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-rect-custom-color.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-rect-dashed.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-rect-default-color.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-text-descenders.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-text-full-charset.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-text-rgba-color.test.ts +1 -1
- package/tests/elements/pcb-fabrication-note-text-small.test.ts +1 -1
- package/tests/elements/pcb-hole.test.ts +1 -1
- package/tests/elements/pcb-note-path.test.ts +1 -1
- package/tests/elements/pcb-note-rect-all-features.test.ts +1 -1
- package/tests/elements/pcb-note-rect-dashed-stroke.test.ts +1 -1
- package/tests/elements/pcb-note-rect-filled-no-stroke.test.ts +1 -1
- package/tests/elements/pcb-note-text-anchor-alignment.test.ts +1 -1
- package/tests/elements/pcb-note-text-custom-color.test.ts +1 -1
- package/tests/elements/pcb-note-text-small.test.ts +1 -1
- package/tests/elements/pcb-plated-hole.test.ts +1 -1
- package/tests/elements/pcb-silkscreen.test.ts +1 -1
- package/tests/elements/pcb-smtpad.test.ts +1 -1
- package/tests/elements/pcb-trace.test.ts +1 -1
- package/tests/elements/pcb-via.test.ts +1 -1
- package/tests/shapes/circle.test.ts +1 -1
- package/tests/shapes/oval.test.ts +1 -1
- package/tests/shapes/pill.test.ts +1 -1
- package/tests/shapes/rect.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circuit-to-canvas",
|
|
3
3
|
"main": "dist/index.js",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsup-node ./lib/index.ts --format esm --dts",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@biomejs/biome": "^2.3.8",
|
|
13
|
+
"@napi-rs/canvas": "^0.1.84",
|
|
13
14
|
"@resvg/resvg-js": "^2.6.2",
|
|
14
15
|
"@tscircuit/alphabet": "^0.0.9",
|
|
15
16
|
"@tscircuit/circuit-json-util": "^0.0.73",
|
|
16
17
|
"@tscircuit/math-utils": "^0.0.29",
|
|
17
18
|
"@types/bun": "latest",
|
|
18
19
|
"bun-match-svg": "^0.0.14",
|
|
19
|
-
"canvas": "^3.2.0",
|
|
20
20
|
"circuit-json": "^0.0.335",
|
|
21
21
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
22
22
|
"circuit-to-svg": "^0.0.297",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, test } from "bun:test"
|
|
2
|
-
import { createCanvas } from "canvas"
|
|
2
|
+
import { createCanvas } from "@napi-rs/canvas"
|
|
3
3
|
import type { PcbCopperText } from "circuit-json"
|
|
4
4
|
import { scale } from "transformation-matrix"
|
|
5
5
|
import { CircuitToCanvasDrawer } from "../../lib/drawer"
|