Add images as a record field (drop, paste, import)

Images are downscaled, re-encoded and stored inside the encrypted document.

Closes #10

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 16:01:24 -05:00
parent 7a81637819
commit f5f05a3e26
11 changed files with 357 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ const root = dirname(fileURLToPath(import.meta.url));
const read = (p) => readFileSync(join(root, 'src', p), 'utf8');
// Modules are concatenated (ES `import` lines and `export` keywords dropped) ahead of app.js into one scope.
const MODULES = ['crypto.js', 'model.js', 'ops.js', 'print.js', 'template.js'];
const MODULES = ['crypto.js', 'images.js', 'model.js', 'ops.js', 'print.js', 'template.js'];
export function bundleJs() {
return MODULES.map((f) => read(f).replace(/^import .*$/gm, '').replace(/^export /gm, '')).concat(read('app.js')).join('\n');
}