Skip to content

Commit dafd150

Browse files
Hari KiranHari Kiran
authored andcommitted
Resolved conflits and pushing the changes
1 parent 3e3d3cd commit dafd150

File tree

5 files changed

+1934
-438
lines changed

5 files changed

+1934
-438
lines changed

package.json

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"3d-force-graph": "^1.73.4",
6+
"@craco/craco": "^7.1.0",
77
"@emotion/react": "^11.11.1",
88
"@emotion/styled": "^11.11.0",
99
"@mui/icons-material": "^5.14.3",
@@ -15,19 +15,31 @@
1515
"@types/jest": "^27.0.1",
1616
"@types/react": "^18.0.0",
1717
"@types/react-dom": "^18.0.0",
18-
"@types/three": "^0.169.0",
18+
"@types/three": "^0.174.0",
19+
"3d-force-graph": "^1.73.4",
20+
"ajv": "^8",
21+
"ajv-keywords": "^5",
1922
"axios": "^1.4.0",
23+
"bda": "^1.0.0",
24+
"bjd": "^0.3.2",
25+
"buffer": "^6.0.3",
2026
"dayjs": "^1.11.10",
27+
"jda": "^0.4.0",
28+
"jquery": "^3.7.1",
29+
"json-stringify-safe": "^5.0.1",
2130
"jwt-decode": "^3.1.2",
31+
"path-browserify": "^1.0.1",
2232
"query-string": "^8.1.0",
2333
"react": "^18.2.0",
2434
"react-dom": "^18.2.0",
2535
"react-json-view": "^1.21.3",
2636
"react-redux": "^8.1.2",
2737
"react-router-dom": "^6.15.0",
2838
"react-scripts": "^5.0.1",
29-
"three": "^0.169.0",
39+
"sharp": "^0.33.5",
40+
"stats-js": "^1.0.1",
3041
"typescript": "^5.1.6",
42+
"uplot": "^1.6.31",
3143
"web-vitals": "^2.1.0"
3244
},
3345
"devDependencies": {
@@ -47,10 +59,10 @@
4759
"prettier": "^2.3.1"
4860
},
4961
"scripts": {
50-
"start": "react-scripts start",
51-
"build": "react-scripts build",
52-
"test": "react-scripts test",
53-
"eject": "react-scripts eject"
62+
"start": "craco start",
63+
"build": "craco build",
64+
"test": "craco test",
65+
"eject": "craco eject"
5466
},
5567
"browserslist": {
5668
"production": [
@@ -66,6 +78,7 @@
6678
},
6779
"resolutions": {
6880
"postcss": "^8.4.31",
69-
"nth-check": "^2.0.1"
81+
"nth-check": "^2.0.1",
82+
"three": "0.174.0"
7083
}
7184
}

src/declare.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
11
declare module '*.png';
22
declare module '*.svg';
3+
4+
declare global {
5+
interface Window {
6+
dopreview: (key: any, idx: number, isinternal: boolean, hastime: any[]) => void;
7+
}
8+
}
9+
10+
declare module "./utils/preview.js" {
11+
export function dopreview(
12+
key: any,
13+
idx: number,
14+
isinternal?: boolean,
15+
hastime?: any
16+
): void;
17+
export function initcanvas(): void;
18+
export function drawpreview(data: any): void;
19+
export function update(): void;
20+
}
21+
22+
declare module "jda" {
23+
const jdata: any;
24+
export default jdata;
25+
}
26+
27+
declare module "bjd" {
28+
const bjdata: any;
29+
export default bjdata;
30+
}

src/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,27 @@ import store from "./redux/store";
2727
import { ThemeProvider } from "@mui/material/styles";
2828
import { CssBaseline } from "@mui/material";
2929
import theme from "./design/theme";
30+
import * as preview from "./utils/preview.js";
31+
32+
import { previewdataurl, previewdata, dopreview, drawpreview, update, initcanvas, createStats, setControlAngles, setcrosssectionsizes } from "./utils/preview.js";
3033

3134
// Get the root element
3235
const rootElement = document.getElementById("root") as HTMLElement;
3336

3437
// Create the root for rendering React
3538
const root = ReactDOM.createRoot(rootElement);
3639

40+
// Expose dopreview globally
41+
(window as any).previewdataurl = previewdataurl;
42+
(window as any).previewdata = previewdata;
43+
(window as any).dopreview = dopreview;
44+
(window as any).drawpreview = drawpreview;
45+
(window as any).initcanvas = initcanvas;
46+
(window as any).update = update;
47+
(window as any).createStats = createStats;
48+
(window as any).setControlAngles = setControlAngles;
49+
(window as any).setcrosssectionsizes = setcrosssectionsizes;
50+
3751
// Render the application
3852
root.render(
3953
<React.StrictMode>

0 commit comments

Comments
 (0)