@meaningfully/ui 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/App.svelte
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
api: MeaningfullyAPI;
|
|
14
|
-
|
|
14
|
+
basePath_prop: string;
|
|
15
15
|
}
|
|
16
|
-
let { api,
|
|
16
|
+
let { api, basePath_prop }: Props = $props();
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
// basepath must not be blank;
|
|
19
|
+
// unclear if it needs a trailing slash when using a subpath.
|
|
20
|
+
let basepath = $state(basePath_prop || '/');
|
|
21
|
+
console.log(`basepath App "${basepath}" (prop: "${basePath_prop}")`);
|
|
20
22
|
let url = $state('');
|
|
21
23
|
// Ensure $state returns Settings | null
|
|
22
24
|
let settings = $state<Settings | null>(null);
|
package/dist/App.svelte.d.ts
CHANGED
|
@@ -143,11 +143,12 @@
|
|
|
143
143
|
[selectedTextColumn]: result.text
|
|
144
144
|
}));
|
|
145
145
|
} else {
|
|
146
|
-
error = 'Preview generation failed';
|
|
146
|
+
error = previewResponse.message || 'Preview generation failed'; // fastify responses don't throw
|
|
147
|
+
|
|
147
148
|
console.error('Preview generation failed:', previewResponse);
|
|
148
149
|
}
|
|
149
150
|
} catch (e: any) {
|
|
150
|
-
error = e.message;
|
|
151
|
+
error = e.message; // electron errors throw
|
|
151
152
|
} finally {
|
|
152
153
|
generatingPreview = false;
|
|
153
154
|
}
|
|
@@ -188,9 +189,9 @@
|
|
|
188
189
|
if (uploadResponse.success) {
|
|
189
190
|
navigate("/search/" + uploadResponse.documentSetId);
|
|
190
191
|
} else {
|
|
191
|
-
error = 'Upload failed';
|
|
192
|
+
error = uploadResponse.message || 'Upload failed'; // fastify responses don't throw
|
|
192
193
|
}
|
|
193
|
-
} catch (e: any) {
|
|
194
|
+
} catch (e: any) { // in Electron, errors throw
|
|
194
195
|
error = e.message;
|
|
195
196
|
} finally {
|
|
196
197
|
uploading = false;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meaningfully/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Svelte components for meaningfully semantic search",
|
|
6
6
|
"repo": "https://github.com/jeremybmerrill/meaningfully-ui",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "vite dev",
|
|
9
9
|
"build": "vite build && npm run prepack",
|
|
10
|
+
"watch": "vite build --watch",
|
|
10
11
|
"preview": "vite preview",
|
|
11
12
|
"prepare": "svelte-kit sync && npm run build",
|
|
12
13
|
"prepack": "svelte-kit sync && svelte-package && publint",
|