@tscircuit/pcb-viewer 1.11.264 → 1.11.266

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
@@ -7913,27 +7913,46 @@ var convertElementToPrimitives = (element, allElements) => {
7913
7913
  let layer;
7914
7914
  if (type === "pcb_silkscreen_path") {
7915
7915
  layer = element.layer === "bottom" ? "bottom_silkscreen" : "top_silkscreen";
7916
+ return route.slice(0, -1).map((point, index) => {
7917
+ const nextPoint = route[index + 1];
7918
+ return {
7919
+ _pcb_drawing_object_id: `line_${globalPcbDrawingObjectCount++}`,
7920
+ pcb_drawing_type: "line",
7921
+ x1: point.x,
7922
+ y1: point.y,
7923
+ x2: nextPoint.x,
7924
+ y2: nextPoint.y,
7925
+ width: element.stroke_width ?? 0.1,
7926
+ squareCap: false,
7927
+ layer,
7928
+ _element: element,
7929
+ _parent_pcb_component,
7930
+ _parent_source_component,
7931
+ _source_port
7932
+ };
7933
+ }).filter(Boolean);
7916
7934
  } else if (type === "pcb_fabrication_note_path") {
7917
7935
  layer = "top_fabrication";
7936
+ return route.slice(0, -1).map((point, index) => {
7937
+ const nextPoint = route[index + 1];
7938
+ return {
7939
+ _pcb_drawing_object_id: `line_${globalPcbDrawingObjectCount++}`,
7940
+ pcb_drawing_type: "line",
7941
+ x1: point.x,
7942
+ y1: point.y,
7943
+ x2: nextPoint.x,
7944
+ y2: nextPoint.y,
7945
+ width: element.stroke_width ?? 0.1,
7946
+ squareCap: false,
7947
+ layer,
7948
+ color: element.color,
7949
+ _element: element,
7950
+ _parent_pcb_component,
7951
+ _parent_source_component,
7952
+ _source_port
7953
+ };
7954
+ }).filter(Boolean);
7918
7955
  }
7919
- return route.slice(0, -1).map((point, index) => {
7920
- const nextPoint = route[index + 1];
7921
- return {
7922
- _pcb_drawing_object_id: `line_${globalPcbDrawingObjectCount++}`,
7923
- pcb_drawing_type: "line",
7924
- x1: point.x,
7925
- y1: point.y,
7926
- x2: nextPoint.x,
7927
- y2: nextPoint.y,
7928
- width: element.stroke_width ?? 0.1,
7929
- squareCap: false,
7930
- layer,
7931
- _element: element,
7932
- _parent_pcb_component,
7933
- _parent_source_component,
7934
- _source_port
7935
- };
7936
- }).filter(Boolean);
7937
7956
  }
7938
7957
  case "pcb_silkscreen_text": {
7939
7958
  return [
@@ -12828,7 +12847,7 @@ import { css as css3 } from "@emotion/css";
12828
12847
  // package.json
12829
12848
  var package_default = {
12830
12849
  name: "@tscircuit/pcb-viewer",
12831
- version: "1.11.263",
12850
+ version: "1.11.265",
12832
12851
  main: "dist/index.js",
12833
12852
  type: "module",
12834
12853
  repository: "tscircuit/pcb-viewer",
@@ -12880,7 +12899,7 @@ var package_default = {
12880
12899
  "@emotion/css": "^11.11.2",
12881
12900
  "@tscircuit/alphabet": "^0.0.3",
12882
12901
  "@vitejs/plugin-react": "^5.0.2",
12883
- "circuit-json": "^0.0.317",
12902
+ "circuit-json": "^0.0.321",
12884
12903
  "circuit-to-svg": "^0.0.271",
12885
12904
  color: "^4.2.3",
12886
12905
  "react-supergrid": "^1.0.10",