Add Outline stage, parallel reading, offline saves, backup, sync-conflict handling and more
Study - New Outline stage (hierarchical I./A./1. points, linked to chunks, in all exports); the chunk stage is now "Chunks" - Home cards: passages shown as ranges, tags capped with "+N more" Reader - Side-by-side translations and a Compare tab per verse - Typeface, line spacing, verse-number settings; text and column scale with the screen - Highlights/bookmarks sheet with named colours (synced); BSB footnote spacing fix - Cmd-K palette (passages, studies, notes, marks), keyboard shortcuts and "?" help Flow and safety - Toasts with Undo replace most confirm()/alert() - Back/Forward move between pages - Server refuses saves over a newer copy (409); keep-mine / use-other banner; opening a study no longer re-stamps it - Latest chapter request wins when flipping quickly Offline and data - Save books, plan days or a whole BSB/NET for offline - Service worker fixes: helloao /api/ URLs were skipped and responses cloned too late - Settings: download/restore a full backup Accessibility - Sheets trap focus and close on Escape, skip link, focus ring, reduced motion, theme contrast raised to 4.5:1 (with a test) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1edbd364ea
commit
d13f55faf7
65 files changed
+2947
-208
No files matched your search
@@ -97,6 +97,17 @@ describe('htmlToPlainText', () => {
|
||||
// renderVerseContent
|
||||
// ---------------------------------------------------------------------------
|
||||
describe('renderVerseContent', () => {
|
||||
test('a footnote marker between two words does not run them together', () => {
|
||||
expect(renderVerseContent(['Let there be light,”', { noteId: 0 }, 'and there was light.'])).toBe('Let there be light,” and there was light.');
|
||||
expect(renderVerseContent(['an expanse', { noteId: 2 }, 'between the waters'])).toBe('an expanse between the waters');
|
||||
});
|
||||
|
||||
test('a footnote marker is not given a space where punctuation or a space already follows', () => {
|
||||
expect(renderVerseContent(['the earth', { noteId: 1 }, ', and'])).toBe('the earth, and');
|
||||
expect(renderVerseContent(['the earth ', { noteId: 1 }, 'and'])).toBe('the earth and');
|
||||
expect(renderVerseContent(['the end.', { noteId: 3 }])).toBe('the end.');
|
||||
});
|
||||
|
||||
test('returns a string unchanged', () => {
|
||||
expect(renderVerseContent('hello world')).toBe('hello world');
|
||||
});
|
||||
@@ -635,3 +646,35 @@ describe('buildClaudePrompt', () => {
|
||||
expect(prompt).not.toContain('Verse three.');
|
||||
});
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// The outline in exports
|
||||
// ---------------------------------------------------------------------------
|
||||
describe('outline in exports', () => {
|
||||
const outlined = {
|
||||
...baseProject,
|
||||
outline: [
|
||||
{ id: 'a', text: 'Greeting <b>', ref: 'Titus 1:1–4', chunkId: null, children: [{ id: 'a1', text: 'Servant of God', ref: '', chunkId: null, children: [] }] },
|
||||
{ id: 'b', text: 'Qualifications', ref: '', chunkId: null, children: [] },
|
||||
],
|
||||
};
|
||||
|
||||
test('HTML shows the outline with labels, nested, escaped, before the chunks', () => {
|
||||
const html = buildExportHtml(outlined);
|
||||
expect(html).toContain('class="outline"');
|
||||
expect(html).toContain('<span class="lbl">I.</span>Greeting <b>');
|
||||
expect(html).toContain('<span class="lbl">A.</span>Servant of God');
|
||||
expect(html).toContain('<span class="lbl">II.</span>Qualifications');
|
||||
expect(html.indexOf('class="outline"')).toBeLessThan(html.indexOf('class="chunk"'));
|
||||
});
|
||||
|
||||
test('Markdown shows the outline under its own heading', () => {
|
||||
const md = buildMarkdownExport(outlined);
|
||||
expect(md).toContain('## Outline\n\n- **I.** Greeting <b> (Titus 1:1–4)\n - **A.** Servant of God\n- **II.** Qualifications');
|
||||
});
|
||||
|
||||
test('a study without an outline exports as before', () => {
|
||||
expect(buildExportHtml(baseProject)).not.toContain('class="outline"');
|
||||
expect(buildMarkdownExport(baseProject)).not.toContain('## Outline');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user