aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend')
-rw-r--r--subprojects/frontend/package.json51
-rw-r--r--subprojects/frontend/src/graph/GraphStore.ts1
-rw-r--r--subprojects/frontend/src/graph/export/exportDiagram.tsx2
-rw-r--r--subprojects/frontend/src/language/problem.grammar3
-rw-r--r--subprojects/frontend/src/persistence/compressionWorker.ts11
-rw-r--r--subprojects/frontend/src/xtext/xtextServiceResults.ts1
6 files changed, 34 insertions, 35 deletions
diff --git a/subprojects/frontend/package.json b/subprojects/frontend/package.json
index acff57db..ca7bff56 100644
--- a/subprojects/frontend/package.json
+++ b/subprojects/frontend/package.json
@@ -28,35 +28,36 @@
28 }, 28 },
29 "homepage": "https://refinery.tools", 29 "homepage": "https://refinery.tools",
30 "dependencies": { 30 "dependencies": {
31 "@codemirror/autocomplete": "^6.17.0", 31 "@codemirror/autocomplete": "^6.18.0",
32 "@codemirror/commands": "^6.6.0", 32 "@codemirror/commands": "^6.6.0",
33 "@codemirror/language": "^6.10.2", 33 "@codemirror/language": "^6.10.2",
34 "@codemirror/lint": "^6.8.1", 34 "@codemirror/lint": "^6.8.1",
35 "@codemirror/search": "^6.5.6", 35 "@codemirror/search": "^6.5.6",
36 "@codemirror/state": "^6.4.1", 36 "@codemirror/state": "^6.4.1",
37 "@codemirror/view": "^6.28.4", 37 "@codemirror/view": "^6.33.0",
38 "@emotion/cache": "^11.11.0", 38 "@emotion/cache": "^11.13.1",
39 "@emotion/react": "^11.11.4", 39 "@emotion/react": "^11.13.3",
40 "@emotion/serialize": "^1.1.4", 40 "@emotion/serialize": "^1.3.1",
41 "@emotion/styled": "^11.11.5", 41 "@emotion/sheet": "^1.4.0",
42 "@emotion/utils": "^1.2.1", 42 "@emotion/styled": "^11.13.0",
43 "@fontsource-variable/jetbrains-mono": "^5.0.21", 43 "@fontsource-variable/jetbrains-mono": "^5.0.22",
44 "@fontsource-variable/open-sans": "^5.0.29", 44 "@fontsource-variable/open-sans": "^5.0.30",
45 "@fontsource/open-sans": "^5.0.28", 45 "@fontsource/open-sans": "^5.0.29",
46 "@hpcc-js/wasm": "^2.18.0", 46 "@hpcc-js/wasm": "^2.21.0",
47 "@hpcc-js/wasm-zstd": "^1.2.0",
47 "@lezer/common": "^1.2.1", 48 "@lezer/common": "^1.2.1",
48 "@lezer/highlight": "^1.2.0", 49 "@lezer/highlight": "^1.2.1",
49 "@lezer/lr": "^1.4.1", 50 "@lezer/lr": "^1.4.2",
50 "@material-icons/svg": "^1.0.33", 51 "@material-icons/svg": "^1.0.33",
51 "@mui/icons-material": "^5.16.0", 52 "@mui/icons-material": "^6.0.1",
52 "@mui/material": "^5.16.0", 53 "@mui/material": "^6.0.1",
53 "@mui/system": "^5.16.0", 54 "@mui/system": "^6.0.1",
54 "@mui/x-data-grid": "^7.9.0", 55 "@mui/x-data-grid": "^7.15.0",
55 "ansi-styles": "^6.2.1", 56 "ansi-styles": "^6.2.1",
56 "csstype": "^3.1.3", 57 "csstype": "^3.1.3",
57 "d3": "^7.9.0", 58 "d3": "^7.9.0",
58 "d3-color": "^3.1.0", 59 "d3-color": "^3.1.0",
59 "d3-graphviz": "patch:d3-graphviz@npm%3A5.4.0#~/.yarn/patches/d3-graphviz-npm-5.4.0-4298b33e9f.patch", 60 "d3-graphviz": "patch:d3-graphviz@npm%3A5.6.0#~/.yarn/patches/d3-graphviz-npm-5.6.0-129e64ec05.patch",
60 "d3-selection": "^3.0.0", 61 "d3-selection": "^3.0.0",
61 "d3-zoom": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch", 62 "d3-zoom": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch",
62 "escape-string-regexp": "^5.0.0", 63 "escape-string-regexp": "^5.0.0",
@@ -64,7 +65,7 @@
64 "lodash-es": "^4.17.21", 65 "lodash-es": "^4.17.21",
65 "loglevel": "^1.9.1", 66 "loglevel": "^1.9.1",
66 "loglevel-plugin-prefix": "^0.8.4", 67 "loglevel-plugin-prefix": "^0.8.4",
67 "mobx": "^6.13.0", 68 "mobx": "^6.13.1",
68 "mobx-react-lite": "^4.0.7", 69 "mobx-react-lite": "^4.0.7",
69 "ms": "^2.1.3", 70 "ms": "^2.1.3",
70 "nanoid": "^5.0.7", 71 "nanoid": "^5.0.7",
@@ -88,18 +89,18 @@
88 "@types/lodash-es": "^4.17.12", 89 "@types/lodash-es": "^4.17.12",
89 "@types/micromatch": "^4.0.9", 90 "@types/micromatch": "^4.0.9",
90 "@types/ms": "^0.7.34", 91 "@types/ms": "^0.7.34",
91 "@types/node": "^20.14.10", 92 "@types/node": "^20.16.2",
92 "@types/pnpapi": "^0.0.5", 93 "@types/pnpapi": "^0.0.5",
93 "@types/react": "^18.3.3", 94 "@types/react": "^18.3.5",
94 "@types/react-dom": "^18.3.0", 95 "@types/react-dom": "^18.3.0",
95 "@vitejs/plugin-react-swc": "^3.7.0", 96 "@vitejs/plugin-react-swc": "^3.7.0",
96 "@xstate/cli": "^0.5.17", 97 "@xstate/cli": "^0.5.17",
97 "html-minifier-terser": "^7.2.0", 98 "html-minifier-terser": "^7.2.0",
98 "micromatch": "^4.0.7", 99 "micromatch": "^4.0.8",
99 "pnpapi": "^0.0.0", 100 "pnpapi": "^0.0.0",
100 "typescript": "5.5.3", 101 "typescript": "5.5.4",
101 "vite": "^5.3.3", 102 "vite": "^5.4.2",
102 "vite-plugin-pwa": "^0.20.0", 103 "vite-plugin-pwa": "^0.20.2",
103 "workbox-window": "^7.1.0" 104 "workbox-window": "^7.1.0"
104 } 105 }
105} 106}
diff --git a/subprojects/frontend/src/graph/GraphStore.ts b/subprojects/frontend/src/graph/GraphStore.ts
index 30d0a2f3..a133d636 100644
--- a/subprojects/frontend/src/graph/GraphStore.ts
+++ b/subprojects/frontend/src/graph/GraphStore.ts
@@ -25,6 +25,7 @@ export function getDefaultVisibility(
25 case 'class': 25 case 'class':
26 case 'reference': 26 case 'reference':
27 case 'opposite': 27 case 'opposite':
28 case 'base':
28 return 'all'; 29 return 'all';
29 case 'predicate': 30 case 'predicate':
30 return detail.error ? 'must' : 'none'; 31 return detail.error ? 'must' : 'none';
diff --git a/subprojects/frontend/src/graph/export/exportDiagram.tsx b/subprojects/frontend/src/graph/export/exportDiagram.tsx
index 73b40fea..663cafe1 100644
--- a/subprojects/frontend/src/graph/export/exportDiagram.tsx
+++ b/subprojects/frontend/src/graph/export/exportDiagram.tsx
@@ -6,7 +6,7 @@
6 6
7import createCache from '@emotion/cache'; 7import createCache from '@emotion/cache';
8import { serializeStyles } from '@emotion/serialize'; 8import { serializeStyles } from '@emotion/serialize';
9import type { StyleSheet } from '@emotion/utils'; 9import type { StyleSheet } from '@emotion/sheet';
10import italicFontURL from '@fontsource/open-sans/files/open-sans-latin-400-italic.woff2?url'; 10import italicFontURL from '@fontsource/open-sans/files/open-sans-latin-400-italic.woff2?url';
11import normalFontURL from '@fontsource/open-sans/files/open-sans-latin-400-normal.woff2?url'; 11import normalFontURL from '@fontsource/open-sans/files/open-sans-latin-400-normal.woff2?url';
12import boldFontURL from '@fontsource/open-sans/files/open-sans-latin-700-normal.woff2?url'; 12import boldFontURL from '@fontsource/open-sans/files/open-sans-latin-700-normal.woff2?url';
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar
index b8038b70..56867964 100644
--- a/subprojects/frontend/src/language/problem.grammar
+++ b/subprojects/frontend/src/language/problem.grammar
@@ -52,8 +52,7 @@ statement {
52 kw<"extern"> ckw<"aggregator"> AggregatorName "." 52 kw<"extern"> ckw<"aggregator"> AggregatorName "."
53 } | 53 } |
54 PredicateDefinition { 54 PredicateDefinition {
55 ckw<"shadow">? 55 ((kw<"error"> | kw<"partial"> | ckw<"shadow">)* kw<"pred"> | kw<"error">)
56 (kw<"error">? kw<"pred"> | kw<"error">)
57 RelationName ParameterList<Parameter>? 56 RelationName ParameterList<Parameter>?
58 PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } 57 PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." }
59 } | 58 } |
diff --git a/subprojects/frontend/src/persistence/compressionWorker.ts b/subprojects/frontend/src/persistence/compressionWorker.ts
index 7b93b20b..df476535 100644
--- a/subprojects/frontend/src/persistence/compressionWorker.ts
+++ b/subprojects/frontend/src/persistence/compressionWorker.ts
@@ -1,13 +1,10 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> 2 * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/>
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import type { Zstd } from '@hpcc-js/wasm'; 7import { Zstd } from '@hpcc-js/wasm-zstd';
8// We need to use a deep import for proper code splitting with `vite-plugin-pwa`.
9// @ts-expect-error Typescript doesn't find the declarations for the deep import.
10import { Zstd as zstdLoader } from '@hpcc-js/wasm/zstd';
11 8
12import type { 9import type {
13 CompressResponse, 10 CompressResponse,
@@ -56,13 +53,13 @@ async function base64Decode(compressedText: string): Promise<Uint8Array> {
56 return new Uint8Array(await result.arrayBuffer()); 53 return new Uint8Array(await result.arrayBuffer());
57} 54}
58 55
59let zstd: Awaited<ReturnType<typeof Zstd.load>> | undefined; 56let zstd: Zstd | undefined;
60 57
61globalThis.onmessage = (event) => { 58globalThis.onmessage = (event) => {
62 (async () => { 59 (async () => {
63 if (zstd === undefined) { 60 if (zstd === undefined) {
64 // Since we don't have types for the deep import, we have to cast here. 61 // Since we don't have types for the deep import, we have to cast here.
65 zstd = await (zstdLoader as { load: typeof Zstd.load }).load(); 62 zstd = await Zstd.load();
66 } 63 }
67 // Since the render thread will only send us valid messages, 64 // Since the render thread will only send us valid messages,
68 // we can save a bit of bundle size by using a cast instead of `parse` 65 // we can save a bit of bundle size by using a cast instead of `parse`
diff --git a/subprojects/frontend/src/xtext/xtextServiceResults.ts b/subprojects/frontend/src/xtext/xtextServiceResults.ts
index c5bc1320..7c2fb8ec 100644
--- a/subprojects/frontend/src/xtext/xtextServiceResults.ts
+++ b/subprojects/frontend/src/xtext/xtextServiceResults.ts
@@ -156,6 +156,7 @@ export const RelationMetadata = z.object({
156 opposite: z.string(), 156 opposite: z.string(),
157 }), 157 }),
158 z.object({ type: z.literal('predicate'), error: z.boolean() }), 158 z.object({ type: z.literal('predicate'), error: z.boolean() }),
159 z.object({ type: z.literal('base') }),
159 z.object({ type: z.literal('builtin') }), 160 z.object({ type: z.literal('builtin') }),
160 ]), 161 ]),
161}); 162});