@tscircuit/pcb-viewer 1.11.232 → 1.11.234

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
@@ -7134,6 +7134,7 @@ var convertElementToPrimitives = (element, allElements) => {
7134
7134
  case "pcb_smtpad": {
7135
7135
  if (element.shape === "rect" || element.shape === "rotated_rect") {
7136
7136
  const { shape, x, y, width, height, layer, rect_border_radius } = element;
7137
+ const corner_radius = element.corner_radius ?? rect_border_radius ?? 0;
7137
7138
  return [
7138
7139
  {
7139
7140
  _pcb_drawing_object_id: `rect_${globalPcbDrawingObjectCount++}`,
@@ -7148,7 +7149,7 @@ var convertElementToPrimitives = (element, allElements) => {
7148
7149
  _parent_source_component,
7149
7150
  _source_port,
7150
7151
  ccw_rotation: element.ccw_rotation,
7151
- roundness: rect_border_radius
7152
+ roundness: corner_radius
7152
7153
  }
7153
7154
  ];
7154
7155
  } else if (element.shape === "circle") {
@@ -11197,22 +11198,27 @@ var getTextForHighlightedPrimitive = (prim) => {
11197
11198
  }
11198
11199
  case "pcb_smtpad":
11199
11200
  case "pcb_plated_hole": {
11200
- let s = "";
11201
+ const selectors = [];
11201
11202
  const port_hints = Array.from(
11202
11203
  new Set(
11203
11204
  (element.port_hints ?? []).concat(
11204
11205
  _source_port?.port_hints ?? []
11205
11206
  )
11206
11207
  )
11207
- ).filter((ph) => !/^[0-9]+$/.test(ph)).sort((a, b) => b.localeCompare(a));
11208
- if (_parent_source_component && "name" in _parent_source_component && _parent_source_component.name) {
11209
- s += `.${_parent_source_component.name}`;
11210
- if (port_hints.length > 0) s += " > ";
11211
- }
11208
+ ).filter((ph) => !/^[0-9]+$/.test(ph)).filter((ph) => !ph.includes("unnamed_")).sort((a, b) => b.localeCompare(a));
11209
+ const parentName = _parent_source_component && "name" in _parent_source_component && _parent_source_component.name && !_parent_source_component.name.includes("unnamed_") ? _parent_source_component.name : null;
11212
11210
  if (port_hints.length > 0) {
11213
- s += port_hints.map((ph) => `.${ph}`).join(", ");
11211
+ if (parentName) {
11212
+ selectors.push(
11213
+ ...port_hints.map((ph) => `${parentName}.${ph}`)
11214
+ );
11215
+ } else {
11216
+ selectors.push(...port_hints);
11217
+ }
11218
+ } else if (parentName) {
11219
+ selectors.push(parentName);
11214
11220
  }
11215
- return s;
11221
+ return selectors.join(", ");
11216
11222
  }
11217
11223
  default: {
11218
11224
  return "";
@@ -11903,7 +11909,7 @@ import { css as css3 } from "@emotion/css";
11903
11909
  // package.json
11904
11910
  var package_default = {
11905
11911
  name: "@tscircuit/pcb-viewer",
11906
- version: "1.11.231",
11912
+ version: "1.11.233",
11907
11913
  main: "dist/index.js",
11908
11914
  type: "module",
11909
11915
  repository: "tscircuit/pcb-viewer",
@@ -11954,7 +11960,7 @@ var package_default = {
11954
11960
  dependencies: {
11955
11961
  "@emotion/css": "^11.11.2",
11956
11962
  "@vitejs/plugin-react": "^5.0.2",
11957
- "circuit-json": "^0.0.280",
11963
+ "circuit-json": "^0.0.282",
11958
11964
  "circuit-to-svg": "^0.0.240",
11959
11965
  color: "^4.2.3",
11960
11966
  "react-supergrid": "^1.0.10",