circuit-to-svg 0.0.171 → 0.0.173
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.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1446,7 +1446,7 @@ function getSoftwareUsedString(circuitJson) {
|
|
|
1446
1446
|
var package_default = {
|
|
1447
1447
|
name: "circuit-to-svg",
|
|
1448
1448
|
type: "module",
|
|
1449
|
-
version: "0.0.
|
|
1449
|
+
version: "0.0.172",
|
|
1450
1450
|
description: "Convert Circuit JSON to SVG",
|
|
1451
1451
|
main: "dist/index.js",
|
|
1452
1452
|
files: [
|
|
@@ -1489,7 +1489,7 @@ var package_default = {
|
|
|
1489
1489
|
"vite-tsconfig-paths": "^5.0.1",
|
|
1490
1490
|
"@tscircuit/checks": "^0.0.44",
|
|
1491
1491
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
1492
|
-
"@tscircuit/footprinter": "^0.0.
|
|
1492
|
+
"@tscircuit/footprinter": "^0.0.204"
|
|
1493
1493
|
},
|
|
1494
1494
|
peerDependencies: {
|
|
1495
1495
|
"circuit-json": "*",
|
|
@@ -5599,19 +5599,21 @@ var createSvgObjectsFromSchematicBox = ({
|
|
|
5599
5599
|
const yBottom = Math.max(topLeft.y, bottomRight.y);
|
|
5600
5600
|
const xLeft = Math.min(topLeft.x, bottomRight.x);
|
|
5601
5601
|
const xRight = Math.max(topLeft.x, bottomRight.x);
|
|
5602
|
+
const strokeWidthPx = getSchStrokeSize(transform);
|
|
5602
5603
|
const attributes = {
|
|
5603
5604
|
class: "schematic-box",
|
|
5604
5605
|
x: xLeft.toString(),
|
|
5605
5606
|
y: yTop.toString(),
|
|
5606
5607
|
width: (xRight - xLeft).toString(),
|
|
5607
5608
|
height: (yBottom - yTop).toString(),
|
|
5608
|
-
"stroke-width": `${
|
|
5609
|
-
"vector-effect": "non-scaling-stroke",
|
|
5609
|
+
"stroke-width": `${strokeWidthPx}px`,
|
|
5610
5610
|
stroke: colorMap2.schematic.component_outline || "black",
|
|
5611
5611
|
fill: "transparent"
|
|
5612
5612
|
};
|
|
5613
5613
|
if (schematicBox.is_dashed) {
|
|
5614
|
-
|
|
5614
|
+
const dashLength = 8 * strokeWidthPx;
|
|
5615
|
+
const gapLength = 4 * strokeWidthPx;
|
|
5616
|
+
attributes["stroke-dasharray"] = `${dashLength} ${gapLength}`;
|
|
5615
5617
|
}
|
|
5616
5618
|
return [
|
|
5617
5619
|
{
|