@tscircuit/pcb-viewer 1.10.14 → 1.10.16

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
@@ -11947,6 +11947,16 @@ var scaleOnly = function(mat) {
11947
11947
  if (Math.abs(mat.a) !== Math.abs(mat.d)) throw new Error("Cannot scale non-uniformly");
11948
11948
  return value * Math.abs(mat.a);
11949
11949
  };
11950
+ // src/lib/util/z-index-map.ts
11951
+ var zIndexMap = {
11952
+ elementOverlay: 30,
11953
+ dimensionOverlay: 30,
11954
+ editTraceHintOverlay: 30,
11955
+ errorOverlay: 30,
11956
+ ratsNestOverlay: 20,
11957
+ toolbarOverlay: 20,
11958
+ topLayer: 10
11959
+ };
11950
11960
  // src/lib/Drawer.ts
11951
11961
  var LAYER_NAME_TO_COLOR = _object_spread({
11952
11962
  // Standard colors, you shouldn't use these except for testing
@@ -12246,7 +12256,7 @@ var Drawer = /*#__PURE__*/ function() {
12246
12256
  order.forEach(function(layer, i) {
12247
12257
  var canvas = canvasLayerMap[layer];
12248
12258
  if (!canvas) return;
12249
- canvas.style.zIndex = "".concat(100 - i);
12259
+ canvas.style.zIndex = "".concat(zIndexMap.topLayer - i);
12250
12260
  canvas.style.opacity = opaqueLayers.has(layer) ? "1" : "0.5";
12251
12261
  });
12252
12262
  }
@@ -13297,7 +13307,7 @@ var HighlightedPrimitiveBoxWithText = function(param) {
13297
13307
  var color2 = (_layerColorHightlightMap_primitive__element_layer = layerColorHightlightMap[primitive === null || primitive === void 0 ? void 0 : (_primitive__element = primitive._element) === null || _primitive__element === void 0 ? void 0 : _primitive__element.layer]) !== null && _layerColorHightlightMap_primitive__element_layer !== void 0 ? _layerColorHightlightMap_primitive__element_layer : "red";
13298
13308
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", {
13299
13309
  style: {
13300
- zIndex: 98,
13310
+ zIndex: zIndexMap.elementOverlay,
13301
13311
  position: "absolute",
13302
13312
  left: x - w / 2 - 8,
13303
13313
  top: y - h / 2 - 8,
@@ -13612,7 +13622,7 @@ var DimensionOverlay = function(param) {
13612
13622
  marginTop: arrowScreenBounds.flipY ? 0 : -20,
13613
13623
  fontSize: 12,
13614
13624
  fontFamily: "sans-serif",
13615
- zIndex: 1e3
13625
+ zIndex: zIndexMap.dimensionOverlay
13616
13626
  },
13617
13627
  children: Math.abs(dStart.x - dEnd.x).toFixed(2)
13618
13628
  }),
@@ -13630,7 +13640,7 @@ var DimensionOverlay = function(param) {
13630
13640
  mixBlendMode: "difference",
13631
13641
  fontSize: 12,
13632
13642
  fontFamily: "sans-serif",
13633
- zIndex: 1e3
13643
+ zIndex: zIndexMap.dimensionOverlay
13634
13644
  },
13635
13645
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
13636
13646
  style: {
@@ -13647,7 +13657,7 @@ var DimensionOverlay = function(param) {
13647
13657
  top: 0,
13648
13658
  pointerEvents: "none",
13649
13659
  mixBlendMode: "difference",
13650
- zIndex: 1e3
13660
+ zIndex: zIndexMap.dimensionOverlay
13651
13661
  },
13652
13662
  width: containerBounds.width,
13653
13663
  height: containerBounds.height,
@@ -13737,7 +13747,7 @@ var import_css = require("@emotion/css");
13737
13747
  // package.json
13738
13748
  var package_default = {
13739
13749
  name: "@tscircuit/pcb-viewer",
13740
- version: "1.10.13",
13750
+ version: "1.10.15",
13741
13751
  main: "dist/index.js",
13742
13752
  repository: "tscircuit/pcb-viewer",
13743
13753
  license: "MIT",
@@ -13752,7 +13762,7 @@ var package_default = {
13752
13762
  "dist"
13753
13763
  ],
13754
13764
  devDependencies: {
13755
- "@biomejs/biome": "^1.7.3",
13765
+ "@biomejs/biome": "^1.9.4",
13756
13766
  "@semantic-release/commit-analyzer": "^9.0.2",
13757
13767
  "@semantic-release/git": "^10.0.1",
13758
13768
  "@semantic-release/npm": "^9.0.1",
@@ -13964,7 +13974,7 @@ var ToolbarOverlay = function(param) {
13964
13974
  top: 16,
13965
13975
  left: 16,
13966
13976
  transition: isMouseOverContainer ? "opacity 100ms linear" : "opacity 1s linear",
13967
- zIndex: 100,
13977
+ zIndex: zIndexMap.toolbarOverlay,
13968
13978
  color: "red",
13969
13979
  display: "flex",
13970
13980
  fontSize: 12,
@@ -14109,7 +14119,7 @@ var ErrorSVG = function(param) {
14109
14119
  top: 0,
14110
14120
  pointerEvents: "none",
14111
14121
  mixBlendMode: "difference",
14112
- zIndex: 1e3
14122
+ zIndex: zIndexMap.errorOverlay
14113
14123
  },
14114
14124
  width: "100%",
14115
14125
  height: "100%",
@@ -14606,7 +14616,7 @@ var EditTraceHintOverlay = function(param) {
14606
14616
  top: 0,
14607
14617
  pointerEvents: "none",
14608
14618
  mixBlendMode: "difference",
14609
- zIndex: 1e3
14619
+ zIndex: zIndexMap.editTraceHintOverlay
14610
14620
  },
14611
14621
  width: containerBounds === null || containerBounds === void 0 ? void 0 : containerBounds.width,
14612
14622
  height: containerBounds === null || containerBounds === void 0 ? void 0 : containerBounds.height,
@@ -14659,7 +14669,7 @@ var EditTraceHintOverlay = function(param) {
14659
14669
  top: 0,
14660
14670
  pointerEvents: "none",
14661
14671
  mixBlendMode: "difference",
14662
- zIndex: 1e3
14672
+ zIndex: zIndexMap.editTraceHintOverlay
14663
14673
  },
14664
14674
  width: containerBounds === null || containerBounds === void 0 ? void 0 : containerBounds.width,
14665
14675
  height: containerBounds === null || containerBounds === void 0 ? void 0 : containerBounds.height,
@@ -14771,7 +14781,7 @@ var RatsNestOverlay = function(param) {
14771
14781
  height: "100%",
14772
14782
  pointerEvents: "none",
14773
14783
  opacity: 0.5,
14774
- zIndex: 100
14784
+ zIndex: zIndexMap.ratsNestOverlay
14775
14785
  },
14776
14786
  children: groups.map(function(group, index) {
14777
14787
  var points = group.map(function(port) {