easyeda 0.0.279 → 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/browser/index.js +5 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +6 -6
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3513,7 +3513,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
3513
3513
|
var package_default = {
|
|
3514
3514
|
name: "easyeda",
|
|
3515
3515
|
type: "module",
|
|
3516
|
-
version: "0.0.
|
|
3516
|
+
version: "0.0.279",
|
|
3517
3517
|
files: [
|
|
3518
3518
|
"dist"
|
|
3519
3519
|
],
|
|
@@ -11585,27 +11585,27 @@ var generateShapeTsx = ({
|
|
|
11585
11585
|
x: shape.position.x + shape.width / 2,
|
|
11586
11586
|
y: shape.position.y + shape.height / 2
|
|
11587
11587
|
});
|
|
11588
|
-
return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toMillimeters(shape.width)}} height={${toMillimeters(shape.height)}}
|
|
11588
|
+
return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toMillimeters(shape.width)}} height={${toMillimeters(shape.height)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
11589
11589
|
}
|
|
11590
11590
|
if (shape.type === "ELLIPSE") {
|
|
11591
11591
|
const center = transformPoint(shape.center);
|
|
11592
|
-
return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toMillimeters(Math.max(shape.radiusX, shape.radiusY))}}
|
|
11592
|
+
return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toMillimeters(Math.max(shape.radiusX, shape.radiusY))}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
11593
11593
|
}
|
|
11594
11594
|
if (shape.type === "POLYLINE" || shape.type === "POLYGON") {
|
|
11595
11595
|
const isPolygon = shape.type === "POLYGON";
|
|
11596
11596
|
const points = shape.points.map(transformPoint);
|
|
11597
11597
|
if (isPolygon && points.length > 0) points.push(points[0]);
|
|
11598
|
-
return `<schematicpath points={${JSON.stringify(points)}}
|
|
11598
|
+
return `<schematicpath points={${JSON.stringify(points)}} strokeColor=${JSON.stringify(isPolygon ? shape.lineColor : shape.color)}${isPolygon && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
11599
11599
|
}
|
|
11600
11600
|
if (shape.type === "PATH") {
|
|
11601
11601
|
const transformedPath = transformSvgPath(shape.pathData, origin);
|
|
11602
11602
|
if (!transformedPath) return void 0;
|
|
11603
|
-
return `<schematicpath svgPath=${JSON.stringify(transformedPath)}
|
|
11603
|
+
return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeColor=${JSON.stringify(shape.strokeColor)}${shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
11604
11604
|
}
|
|
11605
11605
|
if (shape.type === "ARC") {
|
|
11606
11606
|
const transformedPath = transformSvgPath(shape.pathData, origin);
|
|
11607
11607
|
if (!transformedPath) return void 0;
|
|
11608
|
-
return `<schematicpath svgPath=${JSON.stringify(transformedPath)}
|
|
11608
|
+
return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeColor=${JSON.stringify(shape.color)} />`;
|
|
11609
11609
|
}
|
|
11610
11610
|
if (shape.type === "TEXT") {
|
|
11611
11611
|
if (shape.visibility !== "1") return void 0;
|