circuit-to-svg 0.0.267 → 0.0.268

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 CHANGED
@@ -3963,7 +3963,7 @@ function getSoftwareUsedString(circuitJson) {
3963
3963
  var package_default = {
3964
3964
  name: "circuit-to-svg",
3965
3965
  type: "module",
3966
- version: "0.0.266",
3966
+ version: "0.0.267",
3967
3967
  description: "Convert Circuit JSON to SVG",
3968
3968
  main: "dist/index.js",
3969
3969
  files: [
@@ -3987,7 +3987,7 @@ var package_default = {
3987
3987
  "bun-match-svg": "^0.0.12",
3988
3988
  esbuild: "^0.20.2",
3989
3989
  "performance-now": "^2.1.0",
3990
- "circuit-json": "^0.0.308",
3990
+ "circuit-json": "^0.0.309",
3991
3991
  react: "19.1.0",
3992
3992
  "react-cosmos": "7.0.0",
3993
3993
  "react-cosmos-plugin-vite": "7.0.0",
@@ -8914,6 +8914,13 @@ function createSvgObjectsFromSchVoltageProbe({
8914
8914
  `L ${tipX - arrowWidth * Math.cos((-50 + 210) * Math.PI / 180)},${tipY - arrowWidth * Math.sin((-50 + 210) * Math.PI / 180)}`,
8915
8915
  "Z"
8916
8916
  ].join(" ");
8917
+ const textParts = [];
8918
+ if (probe.name) {
8919
+ textParts.push(probe.name);
8920
+ }
8921
+ if (probe.voltage !== void 0) {
8922
+ textParts.push(`${probe.voltage}V`);
8923
+ }
8917
8924
  return [
8918
8925
  {
8919
8926
  name: "path",
@@ -8945,7 +8952,7 @@ function createSvgObjectsFromSchVoltageProbe({
8945
8952
  children: [
8946
8953
  {
8947
8954
  type: "text",
8948
- value: probe.voltage ? `${probe.voltage}V` : "",
8955
+ value: textParts.join(" "),
8949
8956
  name: "",
8950
8957
  attributes: {},
8951
8958
  children: []