litura-app 0.3.7 → 0.4.0
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/CHANGELOG.md +4 -0
- package/index.js +11 -4
- package/package.json +4 -2
- package/public/app.js +1244 -190
- package/public/dictionary/LICENSE +347 -0
- package/public/dictionary/en.aff +205 -0
- package/public/dictionary/en.dic +49569 -0
- package/public/style.css +51 -34
- package/review.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ number carries breaking changes.
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 0.4.0 — 2026-09-13
|
|
9
|
+
|
|
10
|
+
- Added spell checking. Misspelled words are marked in the editor using a vendored en_US Hunspell dictionary, checked client-side alongside the existing style-tell markers.
|
|
11
|
+
|
|
8
12
|
## 0.3.7 — 2026-09-13
|
|
9
13
|
|
|
10
14
|
- Litura is now also a desktop app. A Tauri shell picks the writing folder, starts the same server on a free port, and shows it in its own window; it carries its own Node runtime, so nothing has to be installed first.
|
package/index.js
CHANGED
|
@@ -183,15 +183,18 @@ const MIME = {
|
|
|
183
183
|
'.svg': 'image/svg+xml',
|
|
184
184
|
'.woff2': 'font/woff2',
|
|
185
185
|
'.woff': 'font/woff',
|
|
186
|
+
'.aff': 'text/plain; charset=utf-8',
|
|
187
|
+
'.dic': 'text/plain; charset=utf-8',
|
|
186
188
|
};
|
|
187
189
|
|
|
188
190
|
function serveStatic(res, filePath) {
|
|
189
191
|
const ext = path.extname(filePath);
|
|
190
192
|
const mime = MIME[ext] || 'text/plain';
|
|
191
|
-
// Fonts never change under a given name; the
|
|
192
|
-
// update, and a tab holding a stale app.js
|
|
193
|
-
// classic post-upgrade bug. Revalidate it on
|
|
194
|
-
|
|
193
|
+
// Fonts and the spelling dictionary never change under a given name; the
|
|
194
|
+
// bundle changes with every update, and a tab holding a stale app.js
|
|
195
|
+
// against a new server is the classic post-upgrade bug. Revalidate it on
|
|
196
|
+
// each load.
|
|
197
|
+
const cache = ['.woff2', '.aff', '.dic'].includes(ext) ? 'public, max-age=31536000, immutable' : 'no-cache';
|
|
195
198
|
try {
|
|
196
199
|
const data = fs.readFileSync(filePath);
|
|
197
200
|
res.writeHead(200, { 'Content-Type': mime, 'Cache-Control': cache });
|
|
@@ -327,6 +330,10 @@ async function handleRequest(req, res) {
|
|
|
327
330
|
const fontFile = path.basename(url.pathname);
|
|
328
331
|
serveStatic(res, path.join(PUBLIC, 'fonts', fontFile));
|
|
329
332
|
}
|
|
333
|
+
else if (url.pathname.startsWith('/dictionary/')) {
|
|
334
|
+
const dictFile = path.basename(url.pathname);
|
|
335
|
+
serveStatic(res, path.join(PUBLIC, 'dictionary', dictFile));
|
|
336
|
+
}
|
|
330
337
|
else { res.writeHead(404); res.end('Not found'); }
|
|
331
338
|
return;
|
|
332
339
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litura-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A local AI-assisted editor for sharper, more human writing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"writing",
|
|
@@ -63,6 +63,8 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@tauri-apps/cli": "^2.9.1",
|
|
65
65
|
"codemirror": "^6.0.1",
|
|
66
|
-
"
|
|
66
|
+
"dictionary-en": "^4.0.0",
|
|
67
|
+
"esbuild": "^0.25.0",
|
|
68
|
+
"nspell": "^2.1.5"
|
|
67
69
|
}
|
|
68
70
|
}
|