aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-17 02:32:26 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-17 02:43:55 +0200
commiteb5da232b5954895b449957c73e35d0b36e3a902 (patch)
treea8714116cfe3102659e9c5e5b90131e7ec248492 /subprojects/frontend/src/editor
parentchore(deps): bump dependencies (diff)
downloadrefinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.gz
refinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.zst
refinery-eb5da232b5954895b449957c73e35d0b36e3a902.zip
feat: basic semantics mapping and visualization
Diffstat (limited to 'subprojects/frontend/src/editor')
-rw-r--r--subprojects/frontend/src/editor/EditorPane.tsx2
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts6
2 files changed, 7 insertions, 1 deletions
diff --git a/subprojects/frontend/src/editor/EditorPane.tsx b/subprojects/frontend/src/editor/EditorPane.tsx
index 87f408fe..c9f86496 100644
--- a/subprojects/frontend/src/editor/EditorPane.tsx
+++ b/subprojects/frontend/src/editor/EditorPane.tsx
@@ -39,7 +39,7 @@ export default observer(function EditorPane(): JSX.Element {
39 const { editorStore } = useRootStore(); 39 const { editorStore } = useRootStore();
40 40
41 return ( 41 return (
42 <Stack direction="column" flexGrow={1} flexShrink={1} overflow="auto"> 42 <Stack direction="column" height="100%" overflow="auto">
43 <Toolbar variant="dense"> 43 <Toolbar variant="dense">
44 <EditorButtons editorStore={editorStore} /> 44 <EditorButtons editorStore={editorStore} />
45 </Toolbar> 45 </Toolbar>
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index b98f085e..c79f6ec1 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -58,6 +58,8 @@ export default class EditorStore {
58 58
59 disposed = false; 59 disposed = false;
60 60
61 semantics: unknown = {};
62
61 constructor(initialValue: string, pwaStore: PWAStore) { 63 constructor(initialValue: string, pwaStore: PWAStore) {
62 this.id = nanoid(); 64 this.id = nanoid();
63 this.state = createEditorState(initialValue, this); 65 this.state = createEditorState(initialValue, this);
@@ -282,6 +284,10 @@ export default class EditorStore {
282 return true; 284 return true;
283 } 285 }
284 286
287 setSemantics(semantics: unknown) {
288 this.semantics = semantics;
289 }
290
285 dispose(): void { 291 dispose(): void {
286 this.client?.dispose(); 292 this.client?.dispose();
287 this.disposed = true; 293 this.disposed = true;