@tscircuit/3d-viewer 0.0.321 → 0.0.323

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 +14 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15880,6 +15880,7 @@ var HoverProvider = ({ children }) => {
15880
15880
  current2 = current2.parent;
15881
15881
  }
15882
15882
  if (isAncestor) {
15883
+ hoveredObjectRef.current.onUnhover();
15883
15884
  hoveredObjectRef.current = null;
15884
15885
  }
15885
15886
  }
@@ -101710,7 +101711,7 @@ import * as THREE10 from "three";
101710
101711
  // package.json
101711
101712
  var package_default = {
101712
101713
  name: "@tscircuit/3d-viewer",
101713
- version: "0.0.320",
101714
+ version: "0.0.322",
101714
101715
  main: "./dist/index.js",
101715
101716
  module: "./dist/index.js",
101716
101717
  type: "module",
@@ -103645,15 +103646,17 @@ var Error3d = ({
103645
103646
  setIsHovered(false);
103646
103647
  setHoverPosition(null);
103647
103648
  }, []);
103648
- let position = [0, 0, 0];
103649
- if (cad_component2?.position) {
103650
- position = [
103651
- cad_component2.position.x,
103652
- cad_component2.position.y,
103653
- cad_component2.position.z
103654
- ];
103655
- position = position.map((p) => Number.isNaN(p) ? 0 : p);
103656
- }
103649
+ const position = useMemo15(() => {
103650
+ if (cad_component2?.position) {
103651
+ const p = [
103652
+ cad_component2.position.x,
103653
+ cad_component2.position.y,
103654
+ cad_component2.position.z
103655
+ ];
103656
+ return p.map((val) => Number.isNaN(val) ? 0 : val);
103657
+ }
103658
+ return [0, 0, 0];
103659
+ }, [cad_component2]);
103657
103660
  const group = useMemo15(() => {
103658
103661
  const g = new THREE11.Group();
103659
103662
  g.position.fromArray(position);
@@ -103697,7 +103700,7 @@ var Error3d = ({
103697
103700
  position: hoverPosition,
103698
103701
  style: {
103699
103702
  fontFamily: "sans-serif",
103700
- transform: "translate3d(1rem, 1rem, 0)",
103703
+ transform: "translate3d(-1rem, 0rem, 0)",
103701
103704
  backgroundColor: "white",
103702
103705
  padding: "6px",
103703
103706
  borderRadius: "4px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.321",
3
+ "version": "0.0.323",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",