@meaningfully/ui 0.0.5 → 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/README.md +1 -3
- package/dist/App.svelte +13 -6
- package/dist/App.svelte.d.ts +1 -1
- package/dist/components/ApiKeyPage.svelte +1 -1
- package/dist/components/ApiKeyPage.svelte.d.ts +1 -1
- package/dist/components/ApiKeyStatus.svelte +2 -2
- package/dist/components/DatabaseConfig.svelte +5 -4
- package/dist/components/ExistingDatabases.svelte +1 -1
- package/dist/components/HelpPage.svelte +2 -2
- package/dist/components/SearchPage.svelte +1 -1
- package/dist/components/SearchPage.svelte.d.ts +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
# meaningfully-ui
|
|
2
2
|
|
|
3
|
-
This is a library of UI components for [meaningfully](https://www.github.com/jeremybmerrill/meaningfully), which is an app (or collection of apps!) for semantic search over spreadsheets. See the main repo URL for more discussion.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This is a library of UI components for [meaningfully](https://www.github.com/jeremybmerrill/meaningfully), which is an app (or collection of apps!) for semantic search over spreadsheets. See the main repo URL for more discussion.
|
package/dist/App.svelte
CHANGED
|
@@ -11,11 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
api: MeaningfullyAPI;
|
|
14
|
-
|
|
14
|
+
basePath_prop: string;
|
|
15
15
|
}
|
|
16
|
-
let { api,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
let { api, basePath_prop }: Props = $props();
|
|
17
|
+
|
|
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}")`);
|
|
22
|
+
let url = $state('');
|
|
19
23
|
// Ensure $state returns Settings | null
|
|
20
24
|
let settings = $state<Settings | null>(null);
|
|
21
25
|
|
|
@@ -43,7 +47,7 @@
|
|
|
43
47
|
|
|
44
48
|
<!-- <img alt="logo" class="logo" src={electronLogo} /> -->
|
|
45
49
|
|
|
46
|
-
<Router url={url} >
|
|
50
|
+
<Router url={url} basepath={basepath}>
|
|
47
51
|
<Link to="/">
|
|
48
52
|
<h1 class="text-2xl font-bold">
|
|
49
53
|
Meaningfully
|
|
@@ -68,7 +72,9 @@
|
|
|
68
72
|
<Route path="search/:id" let:params>
|
|
69
73
|
<SearchPage validApiKeysSet={validApiKeysSet} documentSetId={Number(params.id)} api={api} />
|
|
70
74
|
</Route>
|
|
71
|
-
<Route path="help"
|
|
75
|
+
<Route path="help">
|
|
76
|
+
<HelpPage />
|
|
77
|
+
</Route>
|
|
72
78
|
<Route path="settings">
|
|
73
79
|
{#if settings}
|
|
74
80
|
<ApiKeyPage settings={settings} settingsUpdated={() => getSettings() } api={api} />
|
|
@@ -80,6 +86,7 @@
|
|
|
80
86
|
<Link to="" class="nav-link underline text-blue-600 hover:text-blue-800 visited:text-purple-600">Home</Link>
|
|
81
87
|
<Link to="help" class="nav-link underline text-blue-600 hover:text-blue-800 visited:text-purple-600">Help</Link>
|
|
82
88
|
<Link to="settings" class="nav-link underline text-blue-600 hover:text-blue-800 visited:text-purple-600">Settings / API Keys</Link>
|
|
89
|
+
<a href="https://github.com/jeremybmerrill/meaningfully" target="_blank" class="nav-link underline text-blue-600 hover:text-blue-800 visited:text-purple-600">GitHub</a>
|
|
83
90
|
<span class="nav-link creator">Built with ✨ by Jeremy</span>
|
|
84
91
|
<span class="nav-link">© 2025</span>
|
|
85
92
|
</nav>
|
package/dist/App.svelte.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
{#if !validApiKeysSet }
|
|
12
12
|
<div class="alert alert-warning" data-testid="api-key-status">
|
|
13
|
-
<p>No OpenAI API key is set. Please <Link to="
|
|
13
|
+
<p>No OpenAI API key is set. Please <Link to="settings" class="text-blue text-decoration-line"><span class="text-blue text-decoration-line">add one</span></Link> (or details for another provider) in order to use Meaningfully.</p>
|
|
14
14
|
</div>
|
|
15
15
|
{/if}
|
|
16
16
|
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
font-weight: bold;
|
|
37
37
|
}
|
|
38
|
-
</style>
|
|
38
|
+
</style>
|
|
@@ -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;
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
</p>
|
|
25
25
|
</section>
|
|
26
26
|
<section>
|
|
27
|
-
<h2> a CSV</h2>
|
|
27
|
+
<h2>Upload a CSV</h2>
|
|
28
28
|
<p>
|
|
29
29
|
You can select a CSV from your computer to "upload" it to Meaningfully. Then, select one column
|
|
30
30
|
from the CSV to search semantically, and any number of other columns to be shown alongside it in results.
|
|
31
31
|
</p>
|
|
32
32
|
<p>
|
|
33
33
|
Once you upload the CSV, each entry in the chosen column will be embedded, with the results stored on your
|
|
34
|
-
computer. If you choose a remote embedding API
|
|
34
|
+
computer. If you choose a remote embedding API (like OpenAI's text-embedding-small or text-embedding-large)
|
|
35
35
|
then the entries in your column will be sent
|
|
36
36
|
to that service; if you choose a local one, then the data will not leave your computer.
|
|
37
37
|
</p>
|
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",
|