aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src')
-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
5 files changed, 8 insertions, 10 deletions
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});