circuit-to-svg 0.0.278 → 0.0.280
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 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2887,28 +2887,10 @@ function createSvgObjectsFromPcbTrace(trace, ctx) {
|
|
|
2887
2887
|
if (!layer) continue;
|
|
2888
2888
|
if (layerFilter && layer !== layerFilter) continue;
|
|
2889
2889
|
const copperColor = layerNameToColor(layer, colorMap2);
|
|
2890
|
-
const maskColor = colorMap2.
|
|
2890
|
+
const maskColor = colorMap2.soldermaskWithCopperUnderneath[layer];
|
|
2891
2891
|
const traceWidth = "width" in start ? start.width : "width" in end ? end.width : null;
|
|
2892
2892
|
const width = traceWidth ? (traceWidth * Math.abs(transform.a)).toString() : "0.3";
|
|
2893
2893
|
if (showSolderMask) {
|
|
2894
|
-
const copperObject = {
|
|
2895
|
-
name: "path",
|
|
2896
|
-
type: "element",
|
|
2897
|
-
value: "",
|
|
2898
|
-
children: [],
|
|
2899
|
-
attributes: {
|
|
2900
|
-
class: "pcb-trace",
|
|
2901
|
-
stroke: copperColor,
|
|
2902
|
-
fill: "none",
|
|
2903
|
-
d: `M ${startPoint[0]} ${startPoint[1]} L ${endPoint[0]} ${endPoint[1]}`,
|
|
2904
|
-
"stroke-width": width,
|
|
2905
|
-
"stroke-linecap": "round",
|
|
2906
|
-
"stroke-linejoin": "round",
|
|
2907
|
-
"shape-rendering": "crispEdges",
|
|
2908
|
-
"data-type": "pcb_trace",
|
|
2909
|
-
"data-pcb-layer": layer
|
|
2910
|
-
}
|
|
2911
|
-
};
|
|
2912
2894
|
const maskObject = {
|
|
2913
2895
|
name: "path",
|
|
2914
2896
|
type: "element",
|
|
@@ -2923,11 +2905,11 @@ function createSvgObjectsFromPcbTrace(trace, ctx) {
|
|
|
2923
2905
|
"stroke-linecap": "round",
|
|
2924
2906
|
"stroke-linejoin": "round",
|
|
2925
2907
|
"shape-rendering": "crispEdges",
|
|
2926
|
-
"data-type": "
|
|
2908
|
+
"data-type": "pcb_trace_soldermask",
|
|
2927
2909
|
"data-pcb-layer": layer
|
|
2928
2910
|
}
|
|
2929
2911
|
};
|
|
2930
|
-
svgObjects.push(maskObject
|
|
2912
|
+
svgObjects.push(maskObject);
|
|
2931
2913
|
} else {
|
|
2932
2914
|
const maskOnlyObject = {
|
|
2933
2915
|
name: "path",
|
|
@@ -5092,7 +5074,7 @@ function getSoftwareUsedString(circuitJson) {
|
|
|
5092
5074
|
var package_default = {
|
|
5093
5075
|
name: "circuit-to-svg",
|
|
5094
5076
|
type: "module",
|
|
5095
|
-
version: "0.0.
|
|
5077
|
+
version: "0.0.279",
|
|
5096
5078
|
description: "Convert Circuit JSON to SVG",
|
|
5097
5079
|
main: "dist/index.js",
|
|
5098
5080
|
files: [
|
|
@@ -5121,7 +5103,7 @@ var package_default = {
|
|
|
5121
5103
|
"react-cosmos": "7.0.0",
|
|
5122
5104
|
"react-cosmos-plugin-vite": "7.0.0",
|
|
5123
5105
|
"react-dom": "19.1.0",
|
|
5124
|
-
tscircuit: "^0.0.
|
|
5106
|
+
tscircuit: "^0.0.937",
|
|
5125
5107
|
tsup: "^8.0.2",
|
|
5126
5108
|
typescript: "^5.4.5",
|
|
5127
5109
|
"vite-tsconfig-paths": "^5.0.1"
|
|
@@ -5148,6 +5130,7 @@ var TYPE_PRIORITY = {
|
|
|
5148
5130
|
pcb_hole: 18,
|
|
5149
5131
|
pcb_plated_hole_drill: 19,
|
|
5150
5132
|
pcb_plated_hole: 20,
|
|
5133
|
+
pcb_trace_soldermask: 25,
|
|
5151
5134
|
pcb_trace: 30,
|
|
5152
5135
|
pcb_smtpad: 30,
|
|
5153
5136
|
pcb_copper_pour: 35,
|
|
@@ -5204,7 +5187,7 @@ function getLayerPriority(layer) {
|
|
|
5204
5187
|
return 3;
|
|
5205
5188
|
if (normalized.startsWith("inner")) {
|
|
5206
5189
|
const match = normalized.match(/\d+/);
|
|
5207
|
-
const layerIndex = match ? parseInt(match[0], 10) : 0;
|
|
5190
|
+
const layerIndex = match ? Number.parseInt(match[0], 10) : 0;
|
|
5208
5191
|
return 5 + layerIndex;
|
|
5209
5192
|
}
|
|
5210
5193
|
if (normalized === "through") return 18;
|