@tscircuit/3d-viewer 0.0.324 → 0.0.326
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 +16 -12
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -16885,8 +16885,10 @@ import {
|
|
|
16885
16885
|
BufferGeometry,
|
|
16886
16886
|
Matrix4
|
|
16887
16887
|
} from "three";
|
|
16888
|
+
import React5, { useContext as useContext3 } from "react";
|
|
16889
|
+
import React23 from "react";
|
|
16888
16890
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
16889
|
-
import
|
|
16891
|
+
import React32 from "react";
|
|
16890
16892
|
import * as THREE22 from "three";
|
|
16891
16893
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
|
|
16892
16894
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16968,6 +16970,8 @@ function convertCSGToThreeGeom(csg) {
|
|
|
16968
16970
|
}
|
|
16969
16971
|
var hostConfig = createHostConfig(jscad);
|
|
16970
16972
|
var reconciler = ReactReconciler2(hostConfig);
|
|
16973
|
+
var ThreeContext2 = React5.createContext(null);
|
|
16974
|
+
var ThreeProvider = ThreeContext2.Provider;
|
|
16971
16975
|
var { createJSCADRoot } = createJSCADRenderer(jscad2);
|
|
16972
16976
|
|
|
16973
16977
|
// src/three-components/JscadModel.tsx
|
|
@@ -23603,7 +23607,7 @@ var require_react_development = __commonJS2({
|
|
|
23603
23607
|
}
|
|
23604
23608
|
return dispatcher;
|
|
23605
23609
|
}
|
|
23606
|
-
function
|
|
23610
|
+
function useContext4(Context) {
|
|
23607
23611
|
var dispatcher = resolveDispatcher();
|
|
23608
23612
|
{
|
|
23609
23613
|
if (Context._context !== void 0) {
|
|
@@ -24409,7 +24413,7 @@ var require_react_development = __commonJS2({
|
|
|
24409
24413
|
exports.startTransition = startTransition;
|
|
24410
24414
|
exports.unstable_act = act;
|
|
24411
24415
|
exports.useCallback = useCallback9;
|
|
24412
|
-
exports.useContext =
|
|
24416
|
+
exports.useContext = useContext4;
|
|
24413
24417
|
exports.useDebugValue = useDebugValue;
|
|
24414
24418
|
exports.useDeferredValue = useDeferredValue;
|
|
24415
24419
|
exports.useEffect = useEffect24;
|
|
@@ -99939,14 +99943,14 @@ var require_dist2 = __commonJS2({
|
|
|
99939
99943
|
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { ref: containerRef, style: { width: "100%", minHeight: "400px" } });
|
|
99940
99944
|
}
|
|
99941
99945
|
var jscad22 = __toESM22(require_src2(), 1);
|
|
99942
|
-
var
|
|
99946
|
+
var import_react36 = require_react();
|
|
99943
99947
|
var import_react_reconciler3 = __toESM22(require_react_reconciler(), 1);
|
|
99944
99948
|
var THREE28 = __toESM22(require_three(), 1);
|
|
99945
99949
|
var hostConfig2 = createHostConfig2(jscad22);
|
|
99946
99950
|
var reconciler2 = (0, import_react_reconciler3.default)(hostConfig2);
|
|
99947
99951
|
function useJSCADRenderer(children) {
|
|
99948
|
-
const container = (0,
|
|
99949
|
-
const root = (0,
|
|
99952
|
+
const container = (0, import_react36.useMemo)(() => [], []);
|
|
99953
|
+
const root = (0, import_react36.useMemo)(() => {
|
|
99950
99954
|
const root2 = reconciler2.createContainer(
|
|
99951
99955
|
container,
|
|
99952
99956
|
0,
|
|
@@ -99959,8 +99963,8 @@ var require_dist2 = __commonJS2({
|
|
|
99959
99963
|
);
|
|
99960
99964
|
return root2;
|
|
99961
99965
|
}, [container]);
|
|
99962
|
-
const [mesh, setMesh] = (0,
|
|
99963
|
-
(0,
|
|
99966
|
+
const [mesh, setMesh] = (0, import_react36.useState)(null);
|
|
99967
|
+
(0, import_react36.useEffect)(() => {
|
|
99964
99968
|
reconciler2.updateContainer(children, root, null, () => {
|
|
99965
99969
|
});
|
|
99966
99970
|
const scene = new THREE28.Scene();
|
|
@@ -100362,7 +100366,7 @@ var A2512 = ({ color = "#333" }) => {
|
|
|
100362
100366
|
] });
|
|
100363
100367
|
};
|
|
100364
100368
|
var import_jscad_fiber10 = __toESM2(require_dist2(), 1);
|
|
100365
|
-
var
|
|
100369
|
+
var import_react13 = __toESM2(require_react(), 1);
|
|
100366
100370
|
var import_jsx_runtime102 = __toESM2(require_jsx_runtime(), 1);
|
|
100367
100371
|
var import_jscad_fiber11 = __toESM2(require_dist2(), 1);
|
|
100368
100372
|
var import_jsx_runtime112 = __toESM2(require_jsx_runtime(), 1);
|
|
@@ -101711,7 +101715,7 @@ import * as THREE10 from "three";
|
|
|
101711
101715
|
// package.json
|
|
101712
101716
|
var package_default = {
|
|
101713
101717
|
name: "@tscircuit/3d-viewer",
|
|
101714
|
-
version: "0.0.
|
|
101718
|
+
version: "0.0.325",
|
|
101715
101719
|
main: "./dist/index.js",
|
|
101716
101720
|
module: "./dist/index.js",
|
|
101717
101721
|
type: "module",
|
|
@@ -101755,9 +101759,9 @@ var package_default = {
|
|
|
101755
101759
|
},
|
|
101756
101760
|
devDependencies: {
|
|
101757
101761
|
"@tscircuit/circuit-json-util": "^0.0.64",
|
|
101758
|
-
"@tscircuit/props": "^0.0.
|
|
101762
|
+
"@tscircuit/props": "^0.0.282",
|
|
101759
101763
|
"jscad-electronics": "^0.0.29",
|
|
101760
|
-
"jscad-fiber": "^0.0.
|
|
101764
|
+
"jscad-fiber": "^0.0.83",
|
|
101761
101765
|
"jscad-planner": "^0.0.13",
|
|
101762
101766
|
"react-use-gesture": "^9.1.3",
|
|
101763
101767
|
"@tscircuit/core": "^0.0.616",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.326",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@tscircuit/circuit-json-util": "^0.0.64",
|
|
47
|
-
"@tscircuit/props": "^0.0.
|
|
47
|
+
"@tscircuit/props": "^0.0.282",
|
|
48
48
|
"jscad-electronics": "^0.0.29",
|
|
49
|
-
"jscad-fiber": "^0.0.
|
|
49
|
+
"jscad-fiber": "^0.0.83",
|
|
50
50
|
"jscad-planner": "^0.0.13",
|
|
51
51
|
"react-use-gesture": "^9.1.3",
|
|
52
52
|
"@tscircuit/core": "^0.0.616",
|