diff options
author | 2023-08-17 02:32:26 +0200 | |
---|---|---|
committer | 2023-08-17 02:43:55 +0200 | |
commit | eb5da232b5954895b449957c73e35d0b36e3a902 (patch) | |
tree | a8714116cfe3102659e9c5e5b90131e7ec248492 /subprojects/frontend/src/graph | |
parent | chore(deps): bump dependencies (diff) | |
download | refinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.gz refinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.zst refinery-eb5da232b5954895b449957c73e35d0b36e3a902.zip |
feat: basic semantics mapping and visualization
Diffstat (limited to 'subprojects/frontend/src/graph')
-rw-r--r-- | subprojects/frontend/src/graph/GraphPane.tsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/subprojects/frontend/src/graph/GraphPane.tsx b/subprojects/frontend/src/graph/GraphPane.tsx new file mode 100644 index 00000000..f69f52a6 --- /dev/null +++ b/subprojects/frontend/src/graph/GraphPane.tsx | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | |||
7 | import Stack from '@mui/material/Stack'; | ||
8 | import { styled } from '@mui/material/styles'; | ||
9 | import stringify from 'json-stringify-pretty-compact'; | ||
10 | import { observer } from 'mobx-react-lite'; | ||
11 | |||
12 | import { useRootStore } from '../RootStoreProvider'; | ||
13 | |||
14 | const StyledCode = styled('code')(({ theme }) => ({ | ||
15 | ...theme.typography.editor, | ||
16 | fontWeight: theme.typography.fontWeightEditorNormal, | ||
17 | margin: theme.spacing(2), | ||
18 | whiteSpace: 'pre', | ||
19 | })); | ||
20 | |||
21 | export default observer(function GraphPane(): JSX.Element { | ||
22 | const { editorStore } = useRootStore(); | ||
23 | return ( | ||
24 | <Stack direction="column" height="100%" overflow="auto"> | ||
25 | <StyledCode>{stringify(editorStore?.semantics ?? {})}</StyledCode> | ||
26 | </Stack> | ||
27 | ); | ||
28 | }); | ||