@tscircuit/3d-viewer 0.0.436 → 0.0.437

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27997,6 +27997,17 @@ var tuple = (...args) => args;
27997
27997
  import { useRef as useRef2, useEffect as useEffect8, useState as useState4 } from "react";
27998
27998
  import ReactDOM from "react-dom";
27999
27999
  import * as THREE7 from "three";
28000
+
28001
+ // lib/utils/z-index-map.ts
28002
+ var zIndexMap = {
28003
+ clickToInteractOverlay: 100,
28004
+ htmlElements: 95,
28005
+ orientationCube: 95,
28006
+ contextMenu: 90,
28007
+ appearanceMenu: 91
28008
+ };
28009
+
28010
+ // src/react-three/Html.tsx
28000
28011
  var Html = ({ children, position, style }) => {
28001
28012
  const { camera, renderer } = useThree();
28002
28013
  const el = useRef2(document.createElement("div"));
@@ -28026,7 +28037,7 @@ var Html = ({ children, position, style }) => {
28026
28037
  el.current.style.left = `${x}px`;
28027
28038
  el.current.style.top = `${y}px`;
28028
28039
  el.current.style.pointerEvents = "none";
28029
- el.current.style.zIndex = "1000";
28040
+ el.current.style.zIndex = zIndexMap.htmlElements.toString();
28030
28041
  if (style) {
28031
28042
  Object.assign(el.current.style, style);
28032
28043
  }
@@ -28241,7 +28252,7 @@ import * as THREE15 from "three";
28241
28252
  // package.json
28242
28253
  var package_default = {
28243
28254
  name: "@tscircuit/3d-viewer",
28244
- version: "0.0.435",
28255
+ version: "0.0.436",
28245
28256
  main: "./dist/index.js",
28246
28257
  module: "./dist/index.js",
28247
28258
  type: "module",
@@ -29218,7 +29229,7 @@ var OrientationCubeCanvas = () => {
29218
29229
  left: 0,
29219
29230
  width: 120,
29220
29231
  height: 120,
29221
- zIndex: 1e3
29232
+ zIndex: zIndexMap.orientationCube
29222
29233
  }
29223
29234
  }
29224
29235
  );
@@ -29352,7 +29363,7 @@ var CadViewerContainer = forwardRef2(
29352
29363
  position: "absolute",
29353
29364
  inset: 0,
29354
29365
  cursor: "pointer",
29355
- zIndex: 10,
29366
+ zIndex: zIndexMap.clickToInteractOverlay,
29356
29367
  display: "flex",
29357
29368
  alignItems: "center",
29358
29369
  justifyContent: "center"
@@ -39534,7 +39545,7 @@ var contentStyles = {
39534
39545
  border: "1px solid #333333",
39535
39546
  padding: "4px",
39536
39547
  minWidth: 160,
39537
- zIndex: 10001,
39548
+ zIndex: zIndexMap.appearanceMenu,
39538
39549
  fontSize: 14,
39539
39550
  fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
39540
39551
  };
@@ -39741,7 +39752,7 @@ var contentStyles2 = {
39741
39752
  border: "1px solid #333333",
39742
39753
  padding: "4px",
39743
39754
  minWidth: 160,
39744
- zIndex: 1e4,
39755
+ zIndex: zIndexMap.contextMenu,
39745
39756
  fontSize: 14,
39746
39757
  fontWeight: 400,
39747
39758
  fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.436",
3
+ "version": "0.0.437",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",