@tscircuit/pcb-viewer 1.11.250 → 1.11.252

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
@@ -7127,21 +7127,18 @@ var convertElementToPrimitives = (element, allElements) => {
7127
7127
  case "pcb_board": {
7128
7128
  const { width, height, center, outline } = element;
7129
7129
  if (outline && outline.length > 2) {
7130
- return outline.map((point, index, array) => {
7131
- return {
7132
- _pcb_drawing_object_id: `line_${globalPcbDrawingObjectCount++}`,
7133
- pcb_drawing_type: "line",
7134
- x1: point.x,
7135
- y1: point.y,
7136
- x2: index === array.length - 1 ? array[0].x : array[index + 1].x,
7137
- y2: index === array.length - 1 ? array[0].y : array[index + 1].y,
7138
- width: 1,
7139
- // Add the required width property
7140
- zoomIndependent: true,
7141
- layer: "board",
7142
- _element: element
7143
- };
7144
- });
7130
+ return outline.map((point, index, array) => ({
7131
+ _pcb_drawing_object_id: `line_${globalPcbDrawingObjectCount++}`,
7132
+ pcb_drawing_type: "line",
7133
+ x1: point.x,
7134
+ y1: point.y,
7135
+ x2: index === array.length - 1 ? array[0].x : array[index + 1].x,
7136
+ y2: index === array.length - 1 ? array[0].y : array[index + 1].y,
7137
+ width: 1,
7138
+ zoomIndependent: true,
7139
+ layer: "board",
7140
+ _element: element
7141
+ }));
7145
7142
  }
7146
7143
  return [
7147
7144
  {
@@ -7152,7 +7149,6 @@ var convertElementToPrimitives = (element, allElements) => {
7152
7149
  x2: center.x + width / 2,
7153
7150
  y2: center.y - height / 2,
7154
7151
  width: 1,
7155
- // Add the required width property
7156
7152
  zoomIndependent: true,
7157
7153
  layer: "board",
7158
7154
  _element: element
@@ -7165,7 +7161,6 @@ var convertElementToPrimitives = (element, allElements) => {
7165
7161
  x2: center.x + width / 2,
7166
7162
  y2: center.y + height / 2,
7167
7163
  width: 1,
7168
- // Add the required width property
7169
7164
  zoomIndependent: true,
7170
7165
  layer: "board",
7171
7166
  _element: element
@@ -7178,7 +7173,6 @@ var convertElementToPrimitives = (element, allElements) => {
7178
7173
  x2: center.x - width / 2,
7179
7174
  y2: center.y + height / 2,
7180
7175
  width: 1,
7181
- // Add the required width property
7182
7176
  zoomIndependent: true,
7183
7177
  layer: "board",
7184
7178
  _element: element
@@ -7191,7 +7185,6 @@ var convertElementToPrimitives = (element, allElements) => {
7191
7185
  x2: center.x + width / 2,
7192
7186
  y2: center.y + height / 2,
7193
7187
  width: 1,
7194
- // Add the required width property
7195
7188
  zoomIndependent: true,
7196
7189
  layer: "board",
7197
7190
  _element: element
@@ -7286,6 +7279,26 @@ var convertElementToPrimitives = (element, allElements) => {
7286
7279
  _parent_source_component
7287
7280
  }
7288
7281
  ];
7282
+ } else if (element.hole_shape === "pill" || element.hole_shape === "rotated_pill") {
7283
+ const { x, y, hole_width, hole_height } = element;
7284
+ if (typeof hole_width !== "number" || typeof hole_height !== "number") {
7285
+ return [];
7286
+ }
7287
+ return [
7288
+ {
7289
+ _pcb_drawing_object_id: `pill_${globalPcbDrawingObjectCount++}`,
7290
+ pcb_drawing_type: "pill",
7291
+ x,
7292
+ y,
7293
+ w: hole_width,
7294
+ h: hole_height,
7295
+ layer: "drill",
7296
+ _element: element,
7297
+ _parent_pcb_component,
7298
+ _parent_source_component,
7299
+ ccw_rotation: element.ccw_rotation
7300
+ }
7301
+ ];
7289
7302
  }
7290
7303
  return [];
7291
7304
  }
@@ -12359,7 +12372,7 @@ import { css as css3 } from "@emotion/css";
12359
12372
  // package.json
12360
12373
  var package_default = {
12361
12374
  name: "@tscircuit/pcb-viewer",
12362
- version: "1.11.249",
12375
+ version: "1.11.251",
12363
12376
  main: "dist/index.js",
12364
12377
  type: "module",
12365
12378
  repository: "tscircuit/pcb-viewer",
@@ -12411,7 +12424,7 @@ var package_default = {
12411
12424
  "@emotion/css": "^11.11.2",
12412
12425
  "@tscircuit/alphabet": "^0.0.3",
12413
12426
  "@vitejs/plugin-react": "^5.0.2",
12414
- "circuit-json": "^0.0.295",
12427
+ "circuit-json": "^0.0.302",
12415
12428
  "circuit-to-svg": "^0.0.240",
12416
12429
  color: "^4.2.3",
12417
12430
  "react-supergrid": "^1.0.10",