Skip to content

Commit 1b34a06

Browse files
authored
Merge pull request #16 from bcdev/forman-server_side_panels_for_xcv
Refactorings towards usage as library
2 parents 465497c + d64cb66 commit 1b34a06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1628
-617
lines changed

dashi/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ dist-ssr
2323
*.sln
2424
*.sw?
2525
coverage/
26+
stats.html

dashi/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
</head>
99
<body>
1010
<div id="root"></div>
11-
<script type="module" src="/src/main.tsx"></script>
11+
<script type="module" src="/src/demo/main.tsx"></script>
1212
</body>
1313
</html>

dashi/package-lock.json

Lines changed: 837 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashi/package.json

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
22
"name": "dashi",
33
"private": true,
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"type": "module",
6+
"files": ["dist"],
7+
"exports": {
8+
".": {
9+
"types": "./dist/lib/index.d.ts",
10+
"module": "./dist/lib/index.js"
11+
}
12+
},
613
"scripts": {
714
"dev": "vite",
815
"test": "vitest",
@@ -12,18 +19,24 @@
1219
"preview": "vite preview"
1320
},
1421
"dependencies": {
15-
"@emotion/react": "^11.13.3",
16-
"@emotion/styled": "^11.13.0",
17-
"@fontsource/roboto": "^5.1.0",
18-
"@mui/material": "^6.1.1",
19-
"microdiff": "^1.4.0",
2022
"plotly.js": "^2.35.2",
21-
"react": "^18.3.1",
22-
"react-dom": "^18.3.1",
23+
"microdiff": "^1.4.0",
2324
"react-plotly.js": "^2.6.0",
24-
"zustand": "^5.0.0-rc.2"
25+
"zustand": "^5.0.0"
26+
},
27+
"peerDependencies": {
28+
"@emotion/react": ">=11",
29+
"@emotion/styled": ">=11",
30+
"@fontsource/roboto": ">=5",
31+
"@mui/material": ">=6",
32+
"react": ">=18",
33+
"react-dom": ">=18"
2534
},
2635
"devDependencies": {
36+
"@emotion/react": "^11.13.3",
37+
"@emotion/styled": "^11.13.0",
38+
"@fontsource/roboto": "^5.1.0",
39+
"@mui/material": "^6.1.1",
2740
"@types/node": "^20.11.17",
2841
"@types/plotly.js": "^2.33.4",
2942
"@types/react": "^18.2.43",
@@ -39,7 +52,10 @@
3952
"jsdom": "^25.0.0",
4053
"prettier": "^3.3.3",
4154
"typescript": "^5.6.2",
55+
"react": "^18.3.1",
56+
"react-dom": "^18.3.1",
4257
"vite": "^5.4.6",
58+
"vite-plugin-dts": "^4.2.4",
4359
"vitest": "^2.1.1"
4460
}
4561
}

dashi/src/api.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

dashi/src/components/DashiContribution.tsx

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { CssBaseline, ThemeProvider, createTheme } from "@mui/material";
22
import Typography from "@mui/material/Typography";
33

4-
import { initAppStore } from "../actions/initAppStore";
5-
import ExtensionsInfo from "./ExtensionInfo";
6-
import PanelsControl from "./PanelsControl";
7-
import PanelsRow from "./PanelsRow";
4+
import { configureLogging, initSystemStore } from "@/lib";
5+
import ExtensionsInfo from "./components/ExtensionInfo";
6+
import PanelsControl from "./components/PanelsControl";
7+
import PanelsRow from "./components/PanelsRow";
88

9-
initAppStore();
9+
configureLogging();
10+
11+
initSystemStore();
1012

1113
// MUI's default font family
1214
const fontFamily = "Roboto, Arial, sans-serif";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { setComponentVisibility } from "./setComponentVisibility";
1+
import { setComponentVisibility } from "@/lib";
22

33
export function hidePanel(panelIndex: number) {
44
setComponentVisibility("panels", panelIndex, false);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { setComponentVisibility } from "./setComponentVisibility";
1+
import { setComponentVisibility } from "@/lib";
22

33
export function showPanel(panelIndex: number) {
44
setComponentVisibility("panels", panelIndex, true);

dashi/src/app/ExtensionInfo.tsx renamed to dashi/src/demo/components/ExtensionInfo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Typography from "@mui/material/Typography";
22

3-
import useAppStore from "../store/appStore";
3+
import { useExtensions, useContributionsResult } from "@/lib";
44

55
function ExtensionsInfo() {
6-
const contributionsResult = useAppStore((state) => state.contributionsResult);
7-
const extensions = useAppStore((state) => state.extensions);
6+
const extensions = useExtensions();
7+
const contributionsResult = useContributionsResult();
88
if (contributionsResult.status === "ok") {
99
return (
1010
<div style={{ display: "flex", gap: 5 }}>

0 commit comments

Comments
 (0)