@skillpet/circuit 0.6.3 → 0.6.4
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/README.de.md +150 -0
- package/README.es.md +150 -0
- package/README.fr.md +150 -0
- package/README.ja.md +150 -0
- package/README.ko.md +150 -0
- package/README.md +26 -1
- package/README.zh-CN.md +150 -0
- package/dist/circuit.bundle.js +3 -4
- package/dist/circuit.bundle.min.js +5 -5
- package/dist/circuit.esm.js +3 -4
- package/dist/index.cjs +3 -4
- package/package.json +1 -1
package/dist/circuit.esm.js
CHANGED
|
@@ -15146,8 +15146,8 @@ var _SvgFigure = class _SvgFigure {
|
|
|
15146
15146
|
let [x0, y0] = this.xform(x, y);
|
|
15147
15147
|
const fontsize = opts.fontsize ?? 14;
|
|
15148
15148
|
let font = opts.fontfamily ?? "sans-serif";
|
|
15149
|
-
if (font.toLowerCase() === "sans
|
|
15150
|
-
font = "sans";
|
|
15149
|
+
if (font.toLowerCase() === "sans" || font.toLowerCase() === "arial") {
|
|
15150
|
+
font = "sans-serif";
|
|
15151
15151
|
}
|
|
15152
15152
|
const valign = opts.valign ?? "center";
|
|
15153
15153
|
if (valign === "base") {
|
|
@@ -15159,14 +15159,13 @@ var _SvgFigure = class _SvgFigure {
|
|
|
15159
15159
|
const rot = opts.rotation ?? 0;
|
|
15160
15160
|
const transform = rot !== 0 ? ` transform="rotate(${fmt(rot)} ${fmt(x0)} ${fmt(y0)})"` : "";
|
|
15161
15161
|
const color = opts.color ?? "black";
|
|
15162
|
-
const textY = y0 - fontsize;
|
|
15163
15162
|
let textContent;
|
|
15164
15163
|
if (opts.textDecoration) {
|
|
15165
15164
|
textContent = `<tspan text-decoration="${opts.textDecoration}">${escapeXml(s)}</tspan>`;
|
|
15166
15165
|
} else {
|
|
15167
15166
|
textContent = escapeXml(s);
|
|
15168
15167
|
}
|
|
15169
|
-
let inner2 = `<text x="${fmt(x0)}" y="${fmt(
|
|
15168
|
+
let inner2 = `<text x="${fmt(x0)}" y="${fmt(y0)}" dominant-baseline="${baseline}" fill="${escapeXml(color)}" font-size="${fmt(fontsize)}" font-family="${escapeXml(font)}" text-anchor="${anchor}"${transform}>${textContent}</text>`;
|
|
15170
15169
|
if (opts.href) {
|
|
15171
15170
|
inner2 = `<a href="${escapeXml(opts.href)}">${inner2}</a>`;
|
|
15172
15171
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -15533,8 +15533,8 @@ var _SvgFigure = class _SvgFigure {
|
|
|
15533
15533
|
let [x0, y0] = this.xform(x, y);
|
|
15534
15534
|
const fontsize = opts.fontsize ?? 14;
|
|
15535
15535
|
let font = opts.fontfamily ?? "sans-serif";
|
|
15536
|
-
if (font.toLowerCase() === "sans
|
|
15537
|
-
font = "sans";
|
|
15536
|
+
if (font.toLowerCase() === "sans" || font.toLowerCase() === "arial") {
|
|
15537
|
+
font = "sans-serif";
|
|
15538
15538
|
}
|
|
15539
15539
|
const valign = opts.valign ?? "center";
|
|
15540
15540
|
if (valign === "base") {
|
|
@@ -15546,14 +15546,13 @@ var _SvgFigure = class _SvgFigure {
|
|
|
15546
15546
|
const rot = opts.rotation ?? 0;
|
|
15547
15547
|
const transform = rot !== 0 ? ` transform="rotate(${fmt(rot)} ${fmt(x0)} ${fmt(y0)})"` : "";
|
|
15548
15548
|
const color = opts.color ?? "black";
|
|
15549
|
-
const textY = y0 - fontsize;
|
|
15550
15549
|
let textContent;
|
|
15551
15550
|
if (opts.textDecoration) {
|
|
15552
15551
|
textContent = `<tspan text-decoration="${opts.textDecoration}">${escapeXml(s)}</tspan>`;
|
|
15553
15552
|
} else {
|
|
15554
15553
|
textContent = escapeXml(s);
|
|
15555
15554
|
}
|
|
15556
|
-
let inner2 = `<text x="${fmt(x0)}" y="${fmt(
|
|
15555
|
+
let inner2 = `<text x="${fmt(x0)}" y="${fmt(y0)}" dominant-baseline="${baseline}" fill="${escapeXml(color)}" font-size="${fmt(fontsize)}" font-family="${escapeXml(font)}" text-anchor="${anchor}"${transform}>${textContent}</text>`;
|
|
15557
15556
|
if (opts.href) {
|
|
15558
15557
|
inner2 = `<a href="${escapeXml(opts.href)}">${inner2}</a>`;
|
|
15559
15558
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skillpet/circuit",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|