@tscircuit/pcb-viewer 1.11.289 → 1.11.291

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
@@ -9494,14 +9494,6 @@ import { lineAlphabet, svgAlphabet } from "@tscircuit/alphabet";
9494
9494
  // src/lib/convert-text-to-lines.ts
9495
9495
  var LETTER_HEIGHT_TO_WIDTH_RATIO = 0.6;
9496
9496
  var LETTER_HEIGHT_TO_SPACE_RATIO = 0.2;
9497
- var LOWERCASE_BASELINE_OFFSET = (() => {
9498
- const referenceLetters = ["a", "c", "e", "m", "n", "o", "r", "s", "u", "x"];
9499
- const offsets = referenceLetters.map((letter) => lineAlphabet[letter]).filter((lines) => lines && lines.length > 0).map(
9500
- (lines) => Math.min(...lines.map((line) => Math.min(line.y1, line.y2)))
9501
- );
9502
- return offsets.length > 0 ? Math.min(...offsets) : 0;
9503
- })();
9504
- var getBaselineOffsetForLetter = (letter) => letter >= "a" && letter <= "z" ? LOWERCASE_BASELINE_OFFSET : 0;
9505
9497
  var getTextGeometry = (text) => {
9506
9498
  const target_height = text.size * 0.7;
9507
9499
  const target_width_char = target_height * LETTER_HEIGHT_TO_WIDTH_RATIO;
@@ -9515,9 +9507,7 @@ var getTextGeometry = (text) => {
9515
9507
  return line.length * target_width_char + (line.length - 1) * space_between_chars;
9516
9508
  }) : [];
9517
9509
  const width = line_widths.length > 0 ? Math.max(...line_widths) : 0;
9518
- const hasLowercase = /[a-z]/.test(text.text);
9519
- const baselineOffset = hasLowercase ? LOWERCASE_BASELINE_OFFSET * target_height : 0;
9520
- const height = line_count > 0 ? line_count * target_height + (line_count - 1) * space_between_lines + baselineOffset : 0;
9510
+ const height = line_count > 0 ? line_count * target_height + (line_count - 1) * space_between_lines : 0;
9521
9511
  return {
9522
9512
  text_lines,
9523
9513
  line_count,
@@ -9562,7 +9552,6 @@ var convertTextToLines = (text) => {
9562
9552
  for (let letterIndex = 0; letterIndex < text_lines[lineIndex].length; letterIndex++) {
9563
9553
  const letter = text_lines[lineIndex][letterIndex];
9564
9554
  const letterLines = lineAlphabet[letter] ?? lineAlphabet[letter.toUpperCase()];
9565
- const baselineOffset = getBaselineOffsetForLetter(letter);
9566
9555
  if (!letterLines) {
9567
9556
  current_x_origin_for_char_box += target_width_char + space_between_chars;
9568
9557
  continue;
@@ -9573,15 +9562,13 @@ var convertTextToLines = (text) => {
9573
9562
  x2: norm_x2,
9574
9563
  y2: norm_y2
9575
9564
  } of letterLines) {
9576
- const adjusted_y1 = norm_y1 - baselineOffset;
9577
- const adjusted_y2 = norm_y2 - baselineOffset;
9578
9565
  lines.push({
9579
9566
  _pcb_drawing_object_id: getNewPcbDrawingObjectId("line"),
9580
9567
  pcb_drawing_type: "line",
9581
9568
  x1: current_x_origin_for_char_box + target_width_char * norm_x1,
9582
- y1: text.y + lineYOffset + target_height * adjusted_y1,
9569
+ y1: text.y + lineYOffset + target_height * norm_y1,
9583
9570
  x2: current_x_origin_for_char_box + target_width_char * norm_x2,
9584
- y2: text.y + lineYOffset + target_height * adjusted_y2,
9571
+ y2: text.y + lineYOffset + target_height * norm_y2,
9585
9572
  width: strokeWidth,
9586
9573
  layer: text.layer,
9587
9574
  unit: text.unit,
@@ -12386,7 +12373,7 @@ function ifSetsMatchExactly(set1, set2) {
12386
12373
 
12387
12374
  // src/components/MouseElementTracker.tsx
12388
12375
  import { useState as useState7, useMemo as useMemo5 } from "react";
12389
- import { applyToPoint as applyToPoint14, inverse as inverse5 } from "transformation-matrix";
12376
+ import { applyToPoint as applyToPoint15, inverse as inverse5 } from "transformation-matrix";
12390
12377
 
12391
12378
  // src/components/ElementOverlayBox.tsx
12392
12379
  import { useEffect as useEffect11, useState as useState6 } from "react";
@@ -12692,6 +12679,7 @@ var COLORS = {
12692
12679
  // src/components/AnchorOffsetOverlay/common/guards.ts
12693
12680
  var isPcbComponent = (element) => element?.type === "pcb_component";
12694
12681
  var isPcbGroup = (element) => element?.type === "pcb_group";
12682
+ var isPcbPanel = (element) => element?.type === "pcb_panel";
12695
12683
  var isPcbBoard = (element) => element?.type === "pcb_board";
12696
12684
 
12697
12685
  // src/components/AnchorOffsetOverlay/Board/index.tsx
@@ -13270,8 +13258,217 @@ var GroupAnchorOffsetOverlay = ({
13270
13258
  );
13271
13259
  };
13272
13260
 
13261
+ // src/components/AnchorOffsetOverlay/Panel/index.tsx
13262
+ import { applyToPoint as applyToPoint14 } from "transformation-matrix";
13263
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
13264
+ var PanelAnchorOffsetOverlay = ({
13265
+ elements,
13266
+ highlightedPrimitives,
13267
+ transform,
13268
+ containerWidth,
13269
+ containerHeight
13270
+ }) => {
13271
+ const panels = elements.filter((el) => isPcbPanel(el));
13272
+ const boards = elements.filter((el) => isPcbBoard(el));
13273
+ const hoveredBoardIds = highlightedPrimitives.map((primitive) => {
13274
+ if (isPcbBoard(primitive._element)) {
13275
+ return primitive._element.pcb_board_id;
13276
+ }
13277
+ return null;
13278
+ }).filter((id) => Boolean(id));
13279
+ const isShowingAnchorOffsets = useGlobalStore(
13280
+ (state) => state.is_showing_group_anchor_offsets
13281
+ );
13282
+ if (!isShowingAnchorOffsets && hoveredBoardIds.length === 0) {
13283
+ return null;
13284
+ }
13285
+ const boardTargets = boards.map((board) => {
13286
+ const panelId = board.pcb_panel_id;
13287
+ const positionMode = board.position_mode;
13288
+ if (!panelId || positionMode !== "relative_to_panel_anchor") return null;
13289
+ const panel = panels.find((p) => p.pcb_panel_id === panelId);
13290
+ return panel ? { board, panel, type: "board" } : null;
13291
+ }).filter(
13292
+ (target) => Boolean(target)
13293
+ );
13294
+ if (boardTargets.length === 0) return null;
13295
+ const shouldShowAllTargets = hoveredBoardIds.length === 0;
13296
+ const labelStyle = {
13297
+ color: COLORS.LABEL_TEXT,
13298
+ mixBlendMode: "difference",
13299
+ pointerEvents: "none",
13300
+ fontSize: VISUAL_CONFIG.LABEL_FONT_SIZE,
13301
+ fontFamily: "monospace",
13302
+ fontWeight: "bold"
13303
+ };
13304
+ const targetEntries = boardTargets.filter((target) => {
13305
+ return shouldShowAllTargets || hoveredBoardIds.includes(target.board.pcb_board_id);
13306
+ });
13307
+ if (targetEntries.length === 0) return null;
13308
+ const panelAnchorScreens = /* @__PURE__ */ new Map();
13309
+ return /* @__PURE__ */ jsx14(
13310
+ "div",
13311
+ {
13312
+ style: {
13313
+ position: "absolute",
13314
+ left: 0,
13315
+ top: 0,
13316
+ width: containerWidth,
13317
+ height: containerHeight,
13318
+ overflow: "hidden",
13319
+ pointerEvents: "none",
13320
+ zIndex: zIndexMap.dimensionOverlay
13321
+ },
13322
+ children: /* @__PURE__ */ jsxs11(
13323
+ "svg",
13324
+ {
13325
+ style: {
13326
+ position: "absolute",
13327
+ left: 0,
13328
+ top: 0,
13329
+ pointerEvents: "none"
13330
+ },
13331
+ width: containerWidth,
13332
+ height: containerHeight,
13333
+ children: [
13334
+ targetEntries.map((target) => {
13335
+ const anchorPosition = target.panel.center;
13336
+ const anchorKey = target.panel.pcb_panel_id;
13337
+ let targetCenter;
13338
+ let targetId;
13339
+ let displayOffsetX;
13340
+ let displayOffsetY;
13341
+ targetCenter = target.board.center;
13342
+ targetId = target.board.pcb_board_id;
13343
+ displayOffsetX = target.board.display_offset_x;
13344
+ displayOffsetY = target.board.display_offset_y;
13345
+ if (!panelAnchorScreens.has(anchorKey)) {
13346
+ const screenPoint = applyToPoint14(transform, anchorPosition);
13347
+ panelAnchorScreens.set(anchorKey, screenPoint);
13348
+ }
13349
+ const anchorMarkerScreen = panelAnchorScreens.get(anchorKey);
13350
+ const targetScreen = applyToPoint14(transform, targetCenter);
13351
+ const offsetX = targetCenter.x - anchorPosition.x;
13352
+ const offsetY = targetCenter.y - anchorPosition.y;
13353
+ const xLineLength = Math.abs(targetScreen.x - anchorMarkerScreen.x);
13354
+ const yLineLength = Math.abs(targetScreen.y - anchorMarkerScreen.y);
13355
+ const isTargetAboveAnchor = targetScreen.y < anchorMarkerScreen.y;
13356
+ const isTargetRightOfAnchor = targetScreen.x > anchorMarkerScreen.x;
13357
+ const xLabelOffset = isTargetAboveAnchor ? VISUAL_CONFIG.LABEL_OFFSET_ABOVE : VISUAL_CONFIG.LABEL_OFFSET_BELOW;
13358
+ const yLabelOffset = isTargetRightOfAnchor ? VISUAL_CONFIG.LABEL_OFFSET_RIGHT : VISUAL_CONFIG.LABEL_OFFSET_LEFT;
13359
+ const shouldShowXLabel = xLineLength > VISUAL_CONFIG.MIN_LINE_LENGTH_FOR_LABEL;
13360
+ const shouldShowYLabel = yLineLength > VISUAL_CONFIG.MIN_LINE_LENGTH_FOR_LABEL;
13361
+ const xLabelText = `${displayOffsetX ?? offsetX.toFixed(2)}mm`;
13362
+ const yLabelText = `${displayOffsetY ?? offsetY.toFixed(2)}mm`;
13363
+ return /* @__PURE__ */ jsxs11("g", { children: [
13364
+ /* @__PURE__ */ jsx14(
13365
+ "line",
13366
+ {
13367
+ x1: anchorMarkerScreen.x,
13368
+ y1: anchorMarkerScreen.y,
13369
+ x2: targetScreen.x,
13370
+ y2: anchorMarkerScreen.y,
13371
+ stroke: COLORS.OFFSET_LINE,
13372
+ strokeWidth: VISUAL_CONFIG.LINE_STROKE_WIDTH,
13373
+ strokeDasharray: VISUAL_CONFIG.LINE_DASH_PATTERN
13374
+ }
13375
+ ),
13376
+ /* @__PURE__ */ jsx14(
13377
+ "line",
13378
+ {
13379
+ x1: targetScreen.x,
13380
+ y1: anchorMarkerScreen.y,
13381
+ x2: targetScreen.x,
13382
+ y2: targetScreen.y,
13383
+ stroke: COLORS.OFFSET_LINE,
13384
+ strokeWidth: VISUAL_CONFIG.LINE_STROKE_WIDTH,
13385
+ strokeDasharray: VISUAL_CONFIG.LINE_DASH_PATTERN
13386
+ }
13387
+ ),
13388
+ /* @__PURE__ */ jsx14(
13389
+ "circle",
13390
+ {
13391
+ cx: targetScreen.x,
13392
+ cy: targetScreen.y,
13393
+ r: VISUAL_CONFIG.COMPONENT_MARKER_RADIUS,
13394
+ fill: COLORS.COMPONENT_MARKER_FILL,
13395
+ stroke: COLORS.COMPONENT_MARKER_STROKE,
13396
+ strokeWidth: 1
13397
+ }
13398
+ ),
13399
+ shouldShowXLabel && /* @__PURE__ */ jsx14(
13400
+ "foreignObject",
13401
+ {
13402
+ x: Math.min(anchorMarkerScreen.x, targetScreen.x),
13403
+ y: anchorMarkerScreen.y + xLabelOffset,
13404
+ width: Math.abs(targetScreen.x - anchorMarkerScreen.x),
13405
+ height: 20,
13406
+ style: { overflow: "visible" },
13407
+ children: /* @__PURE__ */ jsx14("div", { style: { ...labelStyle, textAlign: "center" }, children: xLabelText })
13408
+ }
13409
+ ),
13410
+ shouldShowYLabel && /* @__PURE__ */ jsx14(
13411
+ "foreignObject",
13412
+ {
13413
+ x: targetScreen.x + yLabelOffset,
13414
+ y: Math.min(anchorMarkerScreen.y, targetScreen.y),
13415
+ width: VISUAL_CONFIG.Y_LABEL_MIN_WIDTH,
13416
+ height: Math.abs(targetScreen.y - anchorMarkerScreen.y),
13417
+ style: { overflow: "visible" },
13418
+ children: /* @__PURE__ */ jsx14(
13419
+ "div",
13420
+ {
13421
+ style: {
13422
+ ...labelStyle,
13423
+ display: "flex",
13424
+ alignItems: "center",
13425
+ justifyContent: isTargetRightOfAnchor ? "flex-start" : "flex-end",
13426
+ whiteSpace: "nowrap",
13427
+ padding: "0 4px",
13428
+ height: "100%"
13429
+ },
13430
+ children: yLabelText
13431
+ }
13432
+ )
13433
+ }
13434
+ )
13435
+ ] }, `${target.panel.pcb_panel_id}-${targetId}-${target.type}`);
13436
+ }),
13437
+ Array.from(panelAnchorScreens.entries()).map(
13438
+ ([panelId, anchorScreen]) => /* @__PURE__ */ jsxs11("g", { children: [
13439
+ /* @__PURE__ */ jsx14(
13440
+ "line",
13441
+ {
13442
+ x1: anchorScreen.x - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
13443
+ y1: anchorScreen.y,
13444
+ x2: anchorScreen.x + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
13445
+ y2: anchorScreen.y,
13446
+ stroke: COLORS.OFFSET_LINE,
13447
+ strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
13448
+ }
13449
+ ),
13450
+ /* @__PURE__ */ jsx14(
13451
+ "line",
13452
+ {
13453
+ x1: anchorScreen.x,
13454
+ y1: anchorScreen.y - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
13455
+ x2: anchorScreen.x,
13456
+ y2: anchorScreen.y + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
13457
+ stroke: COLORS.OFFSET_LINE,
13458
+ strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
13459
+ }
13460
+ )
13461
+ ] }, `anchor-${panelId}`)
13462
+ )
13463
+ ]
13464
+ }
13465
+ )
13466
+ }
13467
+ );
13468
+ };
13469
+
13273
13470
  // src/components/MouseElementTracker.tsx
13274
- import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
13471
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
13275
13472
  var getPolygonBoundingBox = (points) => {
13276
13473
  if (points.length === 0) return null;
13277
13474
  let minX = points[0].x;
@@ -13417,7 +13614,7 @@ var MouseElementTracker = ({
13417
13614
  h = "h" in primitive ? primitive.h : "r" in primitive ? primitive.r * 2 : "rX" in primitive && "rY" in primitive ? primitive.rY * 2 : 0;
13418
13615
  }
13419
13616
  if (!basePoint) continue;
13420
- const screenPos = applyToPoint14(transform, basePoint);
13617
+ const screenPos = applyToPoint15(transform, basePoint);
13421
13618
  const screenSize = {
13422
13619
  w: w * transform.a,
13423
13620
  h: h * transform.a
@@ -13442,7 +13639,7 @@ var MouseElementTracker = ({
13442
13639
  }, [mousedPrimitives, transform]);
13443
13640
  const handleInteraction = (x, y, transform2, primitives2) => {
13444
13641
  setMousePos({ x, y });
13445
- const rwPoint = applyToPoint14(inverse5(transform2), { x, y });
13642
+ const rwPoint = applyToPoint15(inverse5(transform2), { x, y });
13446
13643
  const newMousedPrimitives = getPrimitivesUnderPoint(
13447
13644
  primitives2,
13448
13645
  rwPoint,
@@ -13457,7 +13654,7 @@ var MouseElementTracker = ({
13457
13654
  setMousedPrimitives(newMousedPrimitives);
13458
13655
  onMouseHoverOverPrimitives(newMousedPrimitives);
13459
13656
  };
13460
- return /* @__PURE__ */ jsxs11(
13657
+ return /* @__PURE__ */ jsxs12(
13461
13658
  "div",
13462
13659
  {
13463
13660
  ref: containerRef,
@@ -13481,7 +13678,7 @@ var MouseElementTracker = ({
13481
13678
  },
13482
13679
  children: [
13483
13680
  children,
13484
- /* @__PURE__ */ jsx14(
13681
+ /* @__PURE__ */ jsx15(
13485
13682
  ElementOverlayBox,
13486
13683
  {
13487
13684
  elements,
@@ -13489,8 +13686,8 @@ var MouseElementTracker = ({
13489
13686
  highlightedPrimitives
13490
13687
  }
13491
13688
  ),
13492
- transform && /* @__PURE__ */ jsxs11(Fragment7, { children: [
13493
- /* @__PURE__ */ jsx14(
13689
+ transform && /* @__PURE__ */ jsxs12(Fragment7, { children: [
13690
+ /* @__PURE__ */ jsx15(
13494
13691
  BoardAnchorOffsetOverlay,
13495
13692
  {
13496
13693
  elements,
@@ -13500,7 +13697,7 @@ var MouseElementTracker = ({
13500
13697
  containerHeight: height
13501
13698
  }
13502
13699
  ),
13503
- /* @__PURE__ */ jsx14(
13700
+ /* @__PURE__ */ jsx15(
13504
13701
  GroupAnchorOffsetOverlay,
13505
13702
  {
13506
13703
  elements,
@@ -13509,6 +13706,16 @@ var MouseElementTracker = ({
13509
13706
  containerWidth: width,
13510
13707
  containerHeight: height
13511
13708
  }
13709
+ ),
13710
+ /* @__PURE__ */ jsx15(
13711
+ PanelAnchorOffsetOverlay,
13712
+ {
13713
+ elements,
13714
+ highlightedPrimitives,
13715
+ transform,
13716
+ containerWidth: width,
13717
+ containerHeight: height
13718
+ }
13512
13719
  )
13513
13720
  ] })
13514
13721
  ]
@@ -13517,10 +13724,10 @@ var MouseElementTracker = ({
13517
13724
  };
13518
13725
 
13519
13726
  // src/components/PcbGroupOverlay.tsx
13520
- import { applyToPoint as applyToPoint15 } from "transformation-matrix";
13727
+ import { applyToPoint as applyToPoint16 } from "transformation-matrix";
13521
13728
  import { identity as identity8 } from "transformation-matrix";
13522
13729
  import { useRef as useRef9, useEffect as useEffect12 } from "react";
13523
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
13730
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
13524
13731
  var GROUP_COLORS = [
13525
13732
  "rgb(255, 100, 100)",
13526
13733
  "rgb(100, 255, 100)",
@@ -13675,10 +13882,10 @@ var PcbGroupOverlay = ({
13675
13882
  minY -= totalPadding;
13676
13883
  maxY += totalPadding;
13677
13884
  }
13678
- const topLeft = applyToPoint15(transform, { x: minX, y: maxY });
13679
- const topRight = applyToPoint15(transform, { x: maxX, y: maxY });
13680
- const bottomLeft = applyToPoint15(transform, { x: minX, y: minY });
13681
- const bottomRight = applyToPoint15(transform, { x: maxX, y: minY });
13885
+ const topLeft = applyToPoint16(transform, { x: minX, y: maxY });
13886
+ const topRight = applyToPoint16(transform, { x: maxX, y: maxY });
13887
+ const bottomLeft = applyToPoint16(transform, { x: minX, y: minY });
13888
+ const bottomRight = applyToPoint16(transform, { x: maxX, y: minY });
13682
13889
  const groupColor = GROUP_COLORS[groupIndex % GROUP_COLORS.length];
13683
13890
  ctx.strokeStyle = groupColor;
13684
13891
  ctx.lineWidth = 2;
@@ -13728,7 +13935,7 @@ var PcbGroupOverlay = ({
13728
13935
  x: group.anchor_position[0] ?? 0,
13729
13936
  y: group.anchor_position[1] ?? 0
13730
13937
  } : { x: group.anchor_position.x, y: group.anchor_position.y };
13731
- const anchorScreenPos = applyToPoint15(transform, anchorPositionValue);
13938
+ const anchorScreenPos = applyToPoint16(transform, anchorPositionValue);
13732
13939
  ctx.strokeStyle = "white";
13733
13940
  ctx.lineWidth = 1.5;
13734
13941
  ctx.setLineDash([]);
@@ -13753,14 +13960,14 @@ var PcbGroupOverlay = ({
13753
13960
  is_showing_group_anchor_offsets,
13754
13961
  hoveredComponentIds
13755
13962
  ]);
13756
- return /* @__PURE__ */ jsxs12(
13963
+ return /* @__PURE__ */ jsxs13(
13757
13964
  "div",
13758
13965
  {
13759
13966
  ref: containerRef,
13760
13967
  style: { position: "relative", width: "100%", height: "100%" },
13761
13968
  children: [
13762
13969
  children,
13763
- /* @__PURE__ */ jsx15(
13970
+ /* @__PURE__ */ jsx16(
13764
13971
  "canvas",
13765
13972
  {
13766
13973
  ref: canvasRef,
@@ -13780,9 +13987,9 @@ var PcbGroupOverlay = ({
13780
13987
  };
13781
13988
 
13782
13989
  // src/components/RatsNestOverlay.tsx
13783
- import { applyToPoint as applyToPoint16, identity as identity9 } from "transformation-matrix";
13990
+ import { applyToPoint as applyToPoint17, identity as identity9 } from "transformation-matrix";
13784
13991
  import { useMemo as useMemo6 } from "react";
13785
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
13992
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
13786
13993
  var RatsNestOverlay = ({ transform, soup, children }) => {
13787
13994
  const isShowingRatsNest = useGlobalStore((s) => s.is_showing_rats_nest);
13788
13995
  const { netMap, idToNetMap } = useMemo6(
@@ -13845,9 +14052,9 @@ var RatsNestOverlay = ({ transform, soup, children }) => {
13845
14052
  }, [soup, netMap, idToNetMap, isShowingRatsNest]);
13846
14053
  if (!soup || !isShowingRatsNest) return children;
13847
14054
  if (!transform) transform = identity9();
13848
- return /* @__PURE__ */ jsxs13("div", { style: { position: "relative" }, children: [
14055
+ return /* @__PURE__ */ jsxs14("div", { style: { position: "relative" }, children: [
13849
14056
  children,
13850
- /* @__PURE__ */ jsx16(
14057
+ /* @__PURE__ */ jsx17(
13851
14058
  "svg",
13852
14059
  {
13853
14060
  style: {
@@ -13861,9 +14068,9 @@ var RatsNestOverlay = ({ transform, soup, children }) => {
13861
14068
  zIndex: zIndexMap.ratsNestOverlay
13862
14069
  },
13863
14070
  children: ratsNestLines.map(({ key, startPoint, endPoint, isInNet }) => {
13864
- const transformedStart = applyToPoint16(transform, startPoint);
13865
- const transformedEnd = applyToPoint16(transform, endPoint);
13866
- return /* @__PURE__ */ jsx16(
14071
+ const transformedStart = applyToPoint17(transform, startPoint);
14072
+ const transformedEnd = applyToPoint17(transform, endPoint);
14073
+ return /* @__PURE__ */ jsx17(
13867
14074
  "line",
13868
14075
  {
13869
14076
  x1: transformedStart.x,
@@ -13889,7 +14096,7 @@ import { css as css3 } from "@emotion/css";
13889
14096
  // package.json
13890
14097
  var package_default = {
13891
14098
  name: "@tscircuit/pcb-viewer",
13892
- version: "1.11.288",
14099
+ version: "1.11.290",
13893
14100
  main: "dist/index.js",
13894
14101
  type: "module",
13895
14102
  repository: "tscircuit/pcb-viewer",
@@ -13939,10 +14146,10 @@ var package_default = {
13939
14146
  },
13940
14147
  dependencies: {
13941
14148
  "@emotion/css": "^11.11.2",
13942
- "@tscircuit/alphabet": "^0.0.8",
14149
+ "@tscircuit/alphabet": "^0.0.9",
13943
14150
  "@tscircuit/math-utils": "^0.0.29",
13944
14151
  "@vitejs/plugin-react": "^5.0.2",
13945
- "circuit-json": "^0.0.333",
14152
+ "circuit-json": "^0.0.342",
13946
14153
  "circuit-to-svg": "^0.0.271",
13947
14154
  color: "^4.2.3",
13948
14155
  "react-supergrid": "^1.0.10",
@@ -13995,9 +14202,9 @@ var useIsSmallScreen = () => {
13995
14202
  };
13996
14203
 
13997
14204
  // src/components/ToolbarOverlay.tsx
13998
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
14205
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
13999
14206
  var LayerButton = ({ name, selected, onClick }) => {
14000
- return /* @__PURE__ */ jsxs14(
14207
+ return /* @__PURE__ */ jsxs15(
14001
14208
  "div",
14002
14209
  {
14003
14210
  className: css3`
@@ -14013,8 +14220,8 @@ var LayerButton = ({ name, selected, onClick }) => {
14013
14220
  `,
14014
14221
  onClick,
14015
14222
  children: [
14016
- /* @__PURE__ */ jsx17("span", { style: { marginRight: 2, opacity: selected ? 1 : 0 }, children: "\u2022" }),
14017
- /* @__PURE__ */ jsx17(
14223
+ /* @__PURE__ */ jsx18("span", { style: { marginRight: 2, opacity: selected ? 1 : 0 }, children: "\u2022" }),
14224
+ /* @__PURE__ */ jsx18(
14018
14225
  "span",
14019
14226
  {
14020
14227
  style: {
@@ -14034,7 +14241,7 @@ var ToolbarButton = ({
14034
14241
  isSmallScreen,
14035
14242
  onClick,
14036
14243
  ...props
14037
- }) => /* @__PURE__ */ jsx17(
14244
+ }) => /* @__PURE__ */ jsx18(
14038
14245
  "div",
14039
14246
  {
14040
14247
  ...props,
@@ -14071,7 +14278,7 @@ var CheckboxMenuItem = ({
14071
14278
  checked,
14072
14279
  onClick
14073
14280
  }) => {
14074
- return /* @__PURE__ */ jsxs14(
14281
+ return /* @__PURE__ */ jsxs15(
14075
14282
  "div",
14076
14283
  {
14077
14284
  className: css3`
@@ -14098,15 +14305,15 @@ var CheckboxMenuItem = ({
14098
14305
  onClick();
14099
14306
  },
14100
14307
  children: [
14101
- /* @__PURE__ */ jsx17("input", { type: "checkbox", checked, onChange: () => {
14308
+ /* @__PURE__ */ jsx18("input", { type: "checkbox", checked, onChange: () => {
14102
14309
  }, readOnly: true }),
14103
- /* @__PURE__ */ jsx17("span", { style: { color: "#eee" }, children: label })
14310
+ /* @__PURE__ */ jsx18("span", { style: { color: "#eee" }, children: label })
14104
14311
  ]
14105
14312
  }
14106
14313
  );
14107
14314
  };
14108
14315
  var RadioMenuItem = ({ label, checked, onClick }) => {
14109
- return /* @__PURE__ */ jsxs14(
14316
+ return /* @__PURE__ */ jsxs15(
14110
14317
  "div",
14111
14318
  {
14112
14319
  className: css3`
@@ -14133,9 +14340,9 @@ var RadioMenuItem = ({ label, checked, onClick }) => {
14133
14340
  onClick();
14134
14341
  },
14135
14342
  children: [
14136
- /* @__PURE__ */ jsx17("input", { type: "radio", checked, onChange: () => {
14343
+ /* @__PURE__ */ jsx18("input", { type: "radio", checked, onChange: () => {
14137
14344
  }, readOnly: true }),
14138
- /* @__PURE__ */ jsx17("span", { style: { color: "#eee" }, children: label })
14345
+ /* @__PURE__ */ jsx18("span", { style: { color: "#eee" }, children: label })
14139
14346
  ]
14140
14347
  }
14141
14348
  );
@@ -14287,7 +14494,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14287
14494
  setErrorsOpen(false);
14288
14495
  }
14289
14496
  }, [isViewMenuOpen]);
14290
- return /* @__PURE__ */ jsxs14(
14497
+ return /* @__PURE__ */ jsxs15(
14291
14498
  "div",
14292
14499
  {
14293
14500
  style: { position: "relative", zIndex: "999 !important" },
@@ -14295,7 +14502,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14295
14502
  onMouseLeave: handleMouseLeave,
14296
14503
  children: [
14297
14504
  children,
14298
- /* @__PURE__ */ jsxs14(
14505
+ /* @__PURE__ */ jsxs15(
14299
14506
  "div",
14300
14507
  {
14301
14508
  style: {
@@ -14316,7 +14523,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14316
14523
  ]
14317
14524
  }
14318
14525
  ),
14319
- /* @__PURE__ */ jsxs14(
14526
+ /* @__PURE__ */ jsxs15(
14320
14527
  "div",
14321
14528
  {
14322
14529
  "data-toolbar-overlay": true,
@@ -14339,7 +14546,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14339
14546
  fontFamily: "sans-serif"
14340
14547
  },
14341
14548
  children: [
14342
- /* @__PURE__ */ jsxs14(
14549
+ /* @__PURE__ */ jsxs15(
14343
14550
  ToolbarButton,
14344
14551
  {
14345
14552
  isSmallScreen,
@@ -14350,10 +14557,10 @@ var ToolbarOverlay = ({ children, elements }) => {
14350
14557
  }
14351
14558
  },
14352
14559
  children: [
14353
- /* @__PURE__ */ jsxs14("div", { children: [
14560
+ /* @__PURE__ */ jsxs15("div", { children: [
14354
14561
  "layer:",
14355
14562
  " ",
14356
- /* @__PURE__ */ jsx17(
14563
+ /* @__PURE__ */ jsx18(
14357
14564
  "span",
14358
14565
  {
14359
14566
  style: {
@@ -14365,7 +14572,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14365
14572
  }
14366
14573
  )
14367
14574
  ] }),
14368
- isLayerMenuOpen && /* @__PURE__ */ jsx17("div", { style: { marginTop: 4, minWidth: 120 }, children: processedLayers.map((layer) => /* @__PURE__ */ jsx17(
14575
+ isLayerMenuOpen && /* @__PURE__ */ jsx18("div", { style: { marginTop: 4, minWidth: 120 }, children: processedLayers.map((layer) => /* @__PURE__ */ jsx18(
14369
14576
  LayerButton,
14370
14577
  {
14371
14578
  name: layer,
@@ -14379,7 +14586,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14379
14586
  ]
14380
14587
  }
14381
14588
  ),
14382
- /* @__PURE__ */ jsx17(
14589
+ /* @__PURE__ */ jsx18(
14383
14590
  ToolbarButton,
14384
14591
  {
14385
14592
  isSmallScreen,
@@ -14388,13 +14595,13 @@ var ToolbarOverlay = ({ children, elements }) => {
14388
14595
  ...errorCount > 0 ? { color: "red" } : {}
14389
14596
  },
14390
14597
  onClick: handleErrorsToggle,
14391
- children: /* @__PURE__ */ jsxs14("div", { children: [
14598
+ children: /* @__PURE__ */ jsxs15("div", { children: [
14392
14599
  errorCount,
14393
14600
  " errors"
14394
14601
  ] })
14395
14602
  }
14396
14603
  ),
14397
- isErrorsOpen && errorCount > 0 && /* @__PURE__ */ jsx17(
14604
+ isErrorsOpen && errorCount > 0 && /* @__PURE__ */ jsx18(
14398
14605
  "div",
14399
14606
  {
14400
14607
  style: {
@@ -14414,14 +14621,14 @@ var ToolbarOverlay = ({ children, elements }) => {
14414
14621
  },
14415
14622
  children: errorElements.map((e, i) => {
14416
14623
  const errorId = e.pcb_trace_error_id || `error_${i}_${e.error_type}_${e.message?.slice(0, 20)}`;
14417
- return /* @__PURE__ */ jsxs14(
14624
+ return /* @__PURE__ */ jsxs15(
14418
14625
  "div",
14419
14626
  {
14420
14627
  style: {
14421
14628
  borderBottom: i < errorElements.length - 1 ? "1px solid #444" : "none"
14422
14629
  },
14423
14630
  children: [
14424
- /* @__PURE__ */ jsxs14(
14631
+ /* @__PURE__ */ jsxs15(
14425
14632
  "div",
14426
14633
  {
14427
14634
  style: {
@@ -14472,7 +14679,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14472
14679
  }
14473
14680
  },
14474
14681
  children: [
14475
- /* @__PURE__ */ jsx17(
14682
+ /* @__PURE__ */ jsx18(
14476
14683
  "div",
14477
14684
  {
14478
14685
  style: {
@@ -14486,7 +14693,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14486
14693
  children: e.error_type
14487
14694
  }
14488
14695
  ),
14489
- /* @__PURE__ */ jsx17(
14696
+ /* @__PURE__ */ jsx18(
14490
14697
  "div",
14491
14698
  {
14492
14699
  style: {
@@ -14501,7 +14708,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14501
14708
  children: e.message
14502
14709
  }
14503
14710
  ),
14504
- /* @__PURE__ */ jsx17(
14711
+ /* @__PURE__ */ jsx18(
14505
14712
  "div",
14506
14713
  {
14507
14714
  ref: (el) => {
@@ -14521,7 +14728,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14521
14728
  ]
14522
14729
  }
14523
14730
  ),
14524
- /* @__PURE__ */ jsx17(
14731
+ /* @__PURE__ */ jsx18(
14525
14732
  "div",
14526
14733
  {
14527
14734
  ref: (el) => {
@@ -14534,7 +14741,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14534
14741
  backgroundColor: "#1a1a1a",
14535
14742
  borderTop: "1px solid #444"
14536
14743
  },
14537
- children: /* @__PURE__ */ jsx17(
14744
+ children: /* @__PURE__ */ jsx18(
14538
14745
  "div",
14539
14746
  {
14540
14747
  style: {
@@ -14557,58 +14764,58 @@ var ToolbarOverlay = ({ children, elements }) => {
14557
14764
  })
14558
14765
  }
14559
14766
  ),
14560
- /* @__PURE__ */ jsx17(
14767
+ /* @__PURE__ */ jsx18(
14561
14768
  ToolbarButton,
14562
14769
  {
14563
14770
  isSmallScreen,
14564
14771
  style: {},
14565
14772
  onClick: handleEditTraceToggle,
14566
- children: /* @__PURE__ */ jsxs14("div", { children: [
14773
+ children: /* @__PURE__ */ jsxs15("div", { children: [
14567
14774
  editModes.in_draw_trace_mode ? "\u2716 " : "",
14568
14775
  "Edit Traces"
14569
14776
  ] })
14570
14777
  }
14571
14778
  ),
14572
- /* @__PURE__ */ jsx17(
14779
+ /* @__PURE__ */ jsx18(
14573
14780
  ToolbarButton,
14574
14781
  {
14575
14782
  isSmallScreen,
14576
14783
  style: {},
14577
14784
  onClick: handleMoveComponentToggle,
14578
- children: /* @__PURE__ */ jsxs14("div", { children: [
14785
+ children: /* @__PURE__ */ jsxs15("div", { children: [
14579
14786
  editModes.in_move_footprint_mode ? "\u2716 " : "",
14580
14787
  "Move Components"
14581
14788
  ] })
14582
14789
  }
14583
14790
  ),
14584
- /* @__PURE__ */ jsx17(
14791
+ /* @__PURE__ */ jsx18(
14585
14792
  ToolbarButton,
14586
14793
  {
14587
14794
  isSmallScreen,
14588
14795
  style: {},
14589
14796
  onClick: handleRatsNestToggle,
14590
- children: /* @__PURE__ */ jsxs14("div", { children: [
14797
+ children: /* @__PURE__ */ jsxs15("div", { children: [
14591
14798
  viewSettings.is_showing_rats_nest ? "\u2716 " : "",
14592
14799
  "Rats Nest"
14593
14800
  ] })
14594
14801
  }
14595
14802
  ),
14596
- /* @__PURE__ */ jsx17(
14803
+ /* @__PURE__ */ jsx18(
14597
14804
  ToolbarButton,
14598
14805
  {
14599
14806
  isSmallScreen,
14600
14807
  style: measureToolArmed ? { backgroundColor: "#444" } : {},
14601
14808
  onClick: handleMeasureToolClick,
14602
- children: /* @__PURE__ */ jsx17("div", { children: "\u{1F4CF}" })
14809
+ children: /* @__PURE__ */ jsx18("div", { children: "\u{1F4CF}" })
14603
14810
  }
14604
14811
  ),
14605
- /* @__PURE__ */ jsx17(
14812
+ /* @__PURE__ */ jsx18(
14606
14813
  ToolbarButton,
14607
14814
  {
14608
14815
  isSmallScreen,
14609
14816
  onClick: handleViewMenuToggle,
14610
- children: /* @__PURE__ */ jsxs14("div", { children: [
14611
- /* @__PURE__ */ jsxs14(
14817
+ children: /* @__PURE__ */ jsxs15("div", { children: [
14818
+ /* @__PURE__ */ jsxs15(
14612
14819
  "div",
14613
14820
  {
14614
14821
  style: {
@@ -14618,7 +14825,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14618
14825
  },
14619
14826
  children: [
14620
14827
  "View",
14621
- /* @__PURE__ */ jsx17(
14828
+ /* @__PURE__ */ jsx18(
14622
14829
  "span",
14623
14830
  {
14624
14831
  style: {
@@ -14633,8 +14840,8 @@ var ToolbarOverlay = ({ children, elements }) => {
14633
14840
  ]
14634
14841
  }
14635
14842
  ),
14636
- isViewMenuOpen && /* @__PURE__ */ jsxs14("div", { style: { marginTop: 4, minWidth: 120 }, children: [
14637
- /* @__PURE__ */ jsx17(
14843
+ isViewMenuOpen && /* @__PURE__ */ jsxs15("div", { style: { marginTop: 4, minWidth: 120 }, children: [
14844
+ /* @__PURE__ */ jsx18(
14638
14845
  CheckboxMenuItem,
14639
14846
  {
14640
14847
  label: "Show All Trace Lengths",
@@ -14646,7 +14853,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14646
14853
  }
14647
14854
  }
14648
14855
  ),
14649
- /* @__PURE__ */ jsx17(
14856
+ /* @__PURE__ */ jsx18(
14650
14857
  CheckboxMenuItem,
14651
14858
  {
14652
14859
  label: "Show Autorouting Animation",
@@ -14658,7 +14865,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14658
14865
  }
14659
14866
  }
14660
14867
  ),
14661
- /* @__PURE__ */ jsx17(
14868
+ /* @__PURE__ */ jsx18(
14662
14869
  CheckboxMenuItem,
14663
14870
  {
14664
14871
  label: "Show DRC Errors",
@@ -14668,7 +14875,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14668
14875
  }
14669
14876
  }
14670
14877
  ),
14671
- /* @__PURE__ */ jsx17(
14878
+ /* @__PURE__ */ jsx18(
14672
14879
  CheckboxMenuItem,
14673
14880
  {
14674
14881
  label: "Show Copper Pours",
@@ -14680,7 +14887,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14680
14887
  }
14681
14888
  }
14682
14889
  ),
14683
- /* @__PURE__ */ jsx17(
14890
+ /* @__PURE__ */ jsx18(
14684
14891
  CheckboxMenuItem,
14685
14892
  {
14686
14893
  label: "Show Solder Mask",
@@ -14690,7 +14897,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14690
14897
  }
14691
14898
  }
14692
14899
  ),
14693
- /* @__PURE__ */ jsx17(
14900
+ /* @__PURE__ */ jsx18(
14694
14901
  CheckboxMenuItem,
14695
14902
  {
14696
14903
  label: "Show Group Anchor Offsets",
@@ -14702,7 +14909,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14702
14909
  }
14703
14910
  }
14704
14911
  ),
14705
- /* @__PURE__ */ jsx17(
14912
+ /* @__PURE__ */ jsx18(
14706
14913
  CheckboxMenuItem,
14707
14914
  {
14708
14915
  label: "Show PCB Groups",
@@ -14712,8 +14919,8 @@ var ToolbarOverlay = ({ children, elements }) => {
14712
14919
  }
14713
14920
  }
14714
14921
  ),
14715
- viewSettings.is_showing_pcb_groups && /* @__PURE__ */ jsxs14("div", { style: { marginLeft: 16 }, children: [
14716
- /* @__PURE__ */ jsx17(
14922
+ viewSettings.is_showing_pcb_groups && /* @__PURE__ */ jsxs15("div", { style: { marginLeft: 16 }, children: [
14923
+ /* @__PURE__ */ jsx18(
14717
14924
  RadioMenuItem,
14718
14925
  {
14719
14926
  label: "Show All Groups",
@@ -14723,7 +14930,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14723
14930
  }
14724
14931
  }
14725
14932
  ),
14726
- /* @__PURE__ */ jsx17(
14933
+ /* @__PURE__ */ jsx18(
14727
14934
  RadioMenuItem,
14728
14935
  {
14729
14936
  label: "Show Named Groups",
@@ -14747,7 +14954,7 @@ var ToolbarOverlay = ({ children, elements }) => {
14747
14954
  };
14748
14955
 
14749
14956
  // src/components/CanvasElementsRenderer.tsx
14750
- import { jsx as jsx18 } from "react/jsx-runtime";
14957
+ import { jsx as jsx19 } from "react/jsx-runtime";
14751
14958
  var CanvasElementsRenderer = (props) => {
14752
14959
  const { transform, elements } = props;
14753
14960
  const hoveredErrorId = useGlobalStore((state) => state.hovered_error_id);
@@ -14835,14 +15042,14 @@ var CanvasElementsRenderer = (props) => {
14835
15042
  },
14836
15043
  [connectivityMap]
14837
15044
  );
14838
- return /* @__PURE__ */ jsx18(
15045
+ return /* @__PURE__ */ jsx19(
14839
15046
  MouseElementTracker,
14840
15047
  {
14841
15048
  elements: elementsToRender,
14842
15049
  transform,
14843
15050
  primitives: primitivesWithoutInteractionMetadata,
14844
15051
  onMouseHoverOverPrimitives: onMouseOverPrimitives,
14845
- children: /* @__PURE__ */ jsx18(
15052
+ children: /* @__PURE__ */ jsx19(
14846
15053
  EditPlacementOverlay,
14847
15054
  {
14848
15055
  disabled: !props.allowEditing,
@@ -14851,7 +15058,7 @@ var CanvasElementsRenderer = (props) => {
14851
15058
  cancelPanDrag: props.cancelPanDrag,
14852
15059
  onCreateEditEvent: props.onCreateEditEvent,
14853
15060
  onModifyEditEvent: props.onModifyEditEvent,
14854
- children: /* @__PURE__ */ jsx18(
15061
+ children: /* @__PURE__ */ jsx19(
14855
15062
  EditTraceHintOverlay,
14856
15063
  {
14857
15064
  disabled: !props.allowEditing,
@@ -14860,29 +15067,29 @@ var CanvasElementsRenderer = (props) => {
14860
15067
  cancelPanDrag: props.cancelPanDrag,
14861
15068
  onCreateEditEvent: props.onCreateEditEvent,
14862
15069
  onModifyEditEvent: props.onModifyEditEvent,
14863
- children: /* @__PURE__ */ jsx18(
15070
+ children: /* @__PURE__ */ jsx19(
14864
15071
  DimensionOverlay,
14865
15072
  {
14866
15073
  transform,
14867
15074
  focusOnHover: props.focusOnHover,
14868
15075
  primitives: primitivesWithoutInteractionMetadata,
14869
- children: /* @__PURE__ */ jsx18(ToolbarOverlay, { elements, children: /* @__PURE__ */ jsx18(ErrorOverlay, { transform, elements, children: /* @__PURE__ */ jsx18(RatsNestOverlay, { transform, soup: elements, children: /* @__PURE__ */ jsx18(
15076
+ children: /* @__PURE__ */ jsx19(ToolbarOverlay, { elements, children: /* @__PURE__ */ jsx19(ErrorOverlay, { transform, elements, children: /* @__PURE__ */ jsx19(RatsNestOverlay, { transform, soup: elements, children: /* @__PURE__ */ jsx19(
14870
15077
  PcbGroupOverlay,
14871
15078
  {
14872
15079
  transform,
14873
15080
  elements,
14874
15081
  hoveredComponentIds,
14875
- children: /* @__PURE__ */ jsx18(
15082
+ children: /* @__PURE__ */ jsx19(
14876
15083
  DebugGraphicsOverlay,
14877
15084
  {
14878
15085
  transform,
14879
15086
  debugGraphics: props.debugGraphics,
14880
- children: /* @__PURE__ */ jsx18(
15087
+ children: /* @__PURE__ */ jsx19(
14881
15088
  WarningGraphicsOverlay,
14882
15089
  {
14883
15090
  transform,
14884
15091
  elements,
14885
- children: /* @__PURE__ */ jsx18(
15092
+ children: /* @__PURE__ */ jsx19(
14886
15093
  CanvasPrimitiveRenderer,
14887
15094
  {
14888
15095
  transform,
@@ -14951,7 +15158,7 @@ var calculateCircuitJsonKey = (circuitJson) => {
14951
15158
  };
14952
15159
 
14953
15160
  // src/PCBViewer.tsx
14954
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
15161
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
14955
15162
  var defaultTransform = compose7(translate11(400, 300), scale5(40, -40));
14956
15163
  var PCBViewer = ({
14957
15164
  circuitJson,
@@ -15045,20 +15252,20 @@ var PCBViewer = ({
15045
15252
  }),
15046
15253
  [initialState, disablePcbGroups]
15047
15254
  );
15048
- return /* @__PURE__ */ jsxs15(
15255
+ return /* @__PURE__ */ jsxs16(
15049
15256
  "div",
15050
15257
  {
15051
15258
  ref: transformRef,
15052
15259
  style: { position: "relative" },
15053
15260
  onContextMenu: (event) => event.preventDefault(),
15054
15261
  children: [
15055
- /* @__PURE__ */ jsx19("div", { ref, children: /* @__PURE__ */ jsxs15(
15262
+ /* @__PURE__ */ jsx20("div", { ref, children: /* @__PURE__ */ jsxs16(
15056
15263
  ContextProviders,
15057
15264
  {
15058
15265
  initialState: mergedInitialState,
15059
15266
  disablePcbGroups,
15060
15267
  children: [
15061
- /* @__PURE__ */ jsx19(
15268
+ /* @__PURE__ */ jsx20(
15062
15269
  CanvasElementsRenderer,
15063
15270
  {
15064
15271
  transform,
@@ -15083,11 +15290,11 @@ var PCBViewer = ({
15083
15290
  },
15084
15291
  refDimensions.width
15085
15292
  ),
15086
- /* @__PURE__ */ jsx19(ToastContainer, {})
15293
+ /* @__PURE__ */ jsx20(ToastContainer, {})
15087
15294
  ]
15088
15295
  }
15089
15296
  ) }),
15090
- clickToInteractEnabled && !isInteractionEnabled && /* @__PURE__ */ jsx19(
15297
+ clickToInteractEnabled && !isInteractionEnabled && /* @__PURE__ */ jsx20(
15091
15298
  "div",
15092
15299
  {
15093
15300
  onClick: () => {
@@ -15124,7 +15331,7 @@ var PCBViewer = ({
15124
15331
  justifyContent: "center",
15125
15332
  touchAction: "pan-x pan-y pinch-zoom"
15126
15333
  },
15127
- children: /* @__PURE__ */ jsx19(
15334
+ children: /* @__PURE__ */ jsx20(
15128
15335
  "div",
15129
15336
  {
15130
15337
  style: {