@tscircuit/3d-viewer 0.0.376 → 0.0.378
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 +8 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25836,6 +25836,9 @@ var Html = ({ children, position, style }) => {
|
|
|
25836
25836
|
useEffect8(() => {
|
|
25837
25837
|
const rendererNode = renderer?.domElement.parentNode;
|
|
25838
25838
|
if (!rendererNode) return;
|
|
25839
|
+
if (rendererNode.style.position !== "relative" && rendererNode.style.position !== "absolute") {
|
|
25840
|
+
rendererNode.style.position = "relative";
|
|
25841
|
+
}
|
|
25839
25842
|
rendererNode.appendChild(el.current);
|
|
25840
25843
|
setPortal(ReactDOM.createPortal(children, el.current));
|
|
25841
25844
|
return () => {
|
|
@@ -25852,9 +25855,10 @@ var Html = ({ children, position, style }) => {
|
|
|
25852
25855
|
const x = Math.round((vector.x + 1) / 2 * rect.width);
|
|
25853
25856
|
const y = Math.round((-vector.y + 1) / 2 * rect.height);
|
|
25854
25857
|
el.current.style.position = "absolute";
|
|
25855
|
-
el.current.style.left = `${
|
|
25856
|
-
el.current.style.top = `${
|
|
25858
|
+
el.current.style.left = `${x}px`;
|
|
25859
|
+
el.current.style.top = `${y}px`;
|
|
25857
25860
|
el.current.style.pointerEvents = "none";
|
|
25861
|
+
el.current.style.zIndex = "1000";
|
|
25858
25862
|
if (style) {
|
|
25859
25863
|
Object.assign(el.current.style, style);
|
|
25860
25864
|
}
|
|
@@ -25998,7 +26002,7 @@ import * as THREE11 from "three";
|
|
|
25998
26002
|
// package.json
|
|
25999
26003
|
var package_default = {
|
|
26000
26004
|
name: "@tscircuit/3d-viewer",
|
|
26001
|
-
version: "0.0.
|
|
26005
|
+
version: "0.0.377",
|
|
26002
26006
|
main: "./dist/index.js",
|
|
26003
26007
|
module: "./dist/index.js",
|
|
26004
26008
|
type: "module",
|
|
@@ -26045,7 +26049,7 @@ var package_default = {
|
|
|
26045
26049
|
"@storybook/blocks": "9.0.0-alpha.17",
|
|
26046
26050
|
"@storybook/react-vite": "^9.1.5",
|
|
26047
26051
|
"@tscircuit/circuit-json-util": "^0.0.67",
|
|
26048
|
-
"@tscircuit/core": "^0.0.
|
|
26052
|
+
"@tscircuit/core": "^0.0.715",
|
|
26049
26053
|
"@tscircuit/props": "^0.0.312",
|
|
26050
26054
|
"@types/jsdom": "^21.1.7",
|
|
26051
26055
|
"@types/react": "19",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.378",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@storybook/blocks": "9.0.0-alpha.17",
|
|
48
48
|
"@storybook/react-vite": "^9.1.5",
|
|
49
49
|
"@tscircuit/circuit-json-util": "^0.0.67",
|
|
50
|
-
"@tscircuit/core": "^0.0.
|
|
50
|
+
"@tscircuit/core": "^0.0.715",
|
|
51
51
|
"@tscircuit/props": "^0.0.312",
|
|
52
52
|
"@types/jsdom": "^21.1.7",
|
|
53
53
|
"@types/react": "19",
|