John Factotum
4d7d010e29
MOBI6: build TOC from end-of-file TOC
...
Fixes #16
2023-10-29 19:04:52 +08:00
John Factotum
05329eba6e
Fix viewer background not updated when page background changes
...
Bit of a band-aid fix. Ideally it should have some sort of
"ComputedStyleObserver" but this should fix the most common problem
for now.
2023-10-27 15:13:54 +08:00
John Factotum
0d09ca12a2
EPUB: fix subjects
...
Also update README
2023-10-24 17:25:46 +08:00
John Factotum
7c3b7447f6
EPUB: add narrator
2023-10-24 16:38:31 +08:00
John Factotum
e91ff78534
Fix quotes
2023-10-24 13:38:15 +08:00
John Factotum
6d55d3e6b1
Convert break-*: page to break-*: column
...
`break-*` is the newer standard that replaced the legacy `page-break-*`
properties.
Note that setting it to `always` or `all` does not work. There seems to
be no way of telling browsers to break in both paged media and multicol.
2023-10-24 13:29:36 +08:00
John Factotum
969f4c1850
EPUB: improve metadata
2023-10-24 13:14:40 +08:00
John Factotum
28873972ef
Make highlight opacity and blend mode configurable
2023-10-13 17:42:04 +08:00
John Factotum
d44e8d6d64
EPUB: ignore query strings when resolving URLs
2023-10-11 01:49:20 +08:00
John Factotum
96d51e654a
Fix page list progress
2023-10-10 22:54:27 +08:00
John Factotum
4f321563c7
PDF: add annotation layer and handle links
2023-10-09 01:56:13 +08:00
John Factotum
c401fa7ab4
CFI: wrap fake CFI
2023-10-08 23:22:33 +08:00
John Factotum
a63a68eda0
Add PDF support
2023-10-08 21:27:06 +08:00
John Factotum
bcfb942935
Fix module path
2023-10-08 20:44:32 +08:00
John Factotum
27a290ff59
Allow processing hrefs in TOC asynchronously
2023-10-08 20:42:47 +08:00
John Factotum
819106c71f
FXL: fix getting viewport from SVGs
2023-10-08 20:40:16 +08:00
John Factotum
7a31359cd4
Media Overlay: add volume setting
2023-10-08 10:16:33 +08:00
John Factotum
f0aa16113f
EPUB: fix media: properties
2023-10-08 05:33:56 +08:00
John Factotum
08c2ba0b24
EPUB: add prev/next for media overlay playback
2023-10-07 01:37:30 +08:00
John Factotum
1ff15bdc26
EPUB: add support for media overlay playback
2023-10-06 01:23:44 +08:00
John Factotum
83cce01797
Make text walker a separate module
2023-10-01 18:19:13 +08:00
John Factotum
ecefeb86e1
TTS: split document into ranges of block elements
2023-10-01 01:18:43 +08:00
John Factotum
cea9375561
CFI: add ability to ignore nodes
...
Also test that comment nodes are ignore
2023-09-29 23:58:55 +08:00
John Factotum
87605c5235
TTS: add paused seeking
2023-09-28 23:42:33 +08:00
John Factotum
7ebf99b2cd
TTS: add seeking to prev/next paragraph
2023-09-28 17:22:09 +08:00
John Factotum
fdec0b2037
TTS: add starting/resuming speaking from mark/range
...
Also:
- Fix `ssml:alphabet` attribute being ignored when set on root
- Convert `<br>` to `<break>`
2023-09-28 02:02:56 +08:00
John Factotum
403882e66d
Add TTS
...
Add function to convert current page to SSML, with `<mark>`s inserted
using `Intl.segmenter`.
The actual speaking is up to the reader, who should call
`hightlightSpeechMark()` upon mark events.
2023-09-27 02:18:40 +08:00
John Factotum
3833ce5702
Paginator: make scrollToAnchor() public
2023-09-27 02:15:09 +08:00
John Factotum
0a9c418711
Allow getting page/TOC item for ranges
2023-09-24 02:37:33 +08:00
John Factotum
495aef0064
KF8: remove KindleUnpack compat
...
- KindleUnpack's rules for when to insert the coverpage seems a bit
too involved to replicate exactly.
- The feature is marked "XXX experimental" in KindleUnpack source code
after 10 years.
- The feature makes no sense as the cover page might not even exist in
the source EPUB in the first place.
It seems to me now that it might be better to just bite the bullet.
2023-09-11 14:03:54 +08:00
John Factotum
e7009357a2
KF8/FXL: get page spread from RESC
2023-09-11 14:01:56 +08:00
John Factotum
ab6048411a
KF8: fix embedded images in SVG
2023-09-11 12:53:09 +08:00
John Factotum
83e709f575
FXL: fix page turning around blank pages
2023-09-09 15:55:01 +08:00
John Factotum
5e0f319382
FXL: fix scaling for page-spread-center
2023-09-09 15:49:07 +08:00
John Factotum
0cebcb93c4
FXL: fix spreads when first section is center
2023-09-09 14:34:43 +08:00
John Factotum
99e246ecb8
FXL: hide empty iframes
2023-09-09 14:34:27 +08:00
John Factotum
ad25f6b5c3
Paginator: fix anchoring in scrolled mode
...
Anchoring triggers the `scroll` event, which in scrolled mode causes
`#afterScroll()` to be called again with the reason `scroll`, which
shouldn't happen as it's just anchoring, not scrolling.
2023-08-26 06:32:32 +08:00
John Factotum
df95960f82
Expose relocation reason
...
And fix history not updated when scrolling in scroll mode
2023-08-17 15:18:20 +08:00
John Factotum
44c5eca4e9
Paginator: add scroll amount option
2023-08-11 08:14:30 +08:00
John Factotum
9b366ad1c4
EPUB: throw on XML errors
2023-08-03 18:38:11 +08:00
John Factotum
739a00f7f9
Really fix navigation history not working after reopening book
2023-07-31 11:52:41 +08:00
John Factotum
c66f2e65d9
Fix navigation history not working after reopening book
...
Also remove renderer element when closing
2023-07-31 11:45:39 +08:00
John Factotum
6d1ffe1b81
Save more location info
2023-07-05 10:33:32 +08:00
John Factotum
5261c48a90
Paginator: account for margin when getting visible area in scrolled mode
...
Follows 17fb71943f
2023-06-03 01:26:35 +08:00
John Factotum
4732a23e17
Paginator: allow touchscreen pinch zoom
2023-06-02 22:01:36 +08:00
John Factotum
481d28cced
Clamp divisor
...
Although the max width is min-inline-size * max-column-count, sometimes
the actual width apparently doesn't match that exactly.
2023-06-02 04:45:34 +08:00
John Factotum
2e5dda77e0
Unload section when destroying the renderer
2023-06-01 01:44:00 +08:00
John Factotum
14067fe683
Add workaround for Firefox's broken resize observer
2023-05-31 20:09:31 +08:00
John Factotum
ed4c1b8b48
Highlight search results
...
The code looks very inefficient but I guess you can always optimize it
later...
2023-05-29 01:09:50 +08:00
John Factotum
d5d1541d3b
Paginator: use CSS grid
...
Massively simplify margin/padding and header/footer layout and eliminate
unnecessary resizes and resize loops.
Also remove layout and style API from View, as these are only applicable
to the paginator.
2023-05-28 22:17:56 +08:00
John Factotum
21744e3c85
Fix touch swiping for vertical writing
2023-05-28 21:22:14 +08:00
John Factotum
d4453bdc5c
Add functions for converting Calibre CFI to standard CFI
...
Also demonstrate showing highlights from Calibre in the reader
2023-05-27 19:34:10 +08:00
John Factotum
0be94135fa
Fix positioning of the overlayer
2023-05-27 19:18:31 +08:00
John Factotum
22956c1ae7
Fix going to annotation
2023-05-27 17:09:18 +08:00
John Factotum
abcd87ed9a
Fix RTL
2023-05-27 02:20:07 +08:00
John Factotum
90a1706e82
Make scrollBy and snap accept both axes
...
So that event handlers don't need to know the axis
2023-05-27 01:45:49 +08:00
John Factotum
81c595fcc3
Animate scroll manually instead of using scroll-behavior smooth
2023-05-27 00:26:46 +08:00
John Factotum
4c481214cb
Fix page flip throttling
2023-05-27 00:06:27 +08:00
John Factotum
36a8fb62e7
Fix history state not updated when swiping
2023-05-27 00:04:26 +08:00
John Factotum
772cbe00ca
Add touchscreen swipe gesture
2023-05-23 01:26:01 +08:00
John Factotum
a9681ee7eb
Add event and properties for history navigation availability
2023-05-19 23:30:22 +08:00
John Factotum
d1ec0dad40
Fix initial history state
2023-05-19 02:44:32 +08:00
John Factotum
bafd64f408
Add navigation history
2023-05-19 02:19:41 +08:00
John Factotum
4fd56e7a3c
Update README.md
2023-05-18 23:41:32 +08:00
John Factotum
fb95b70c8e
Fix page getting stuck in Foliate GTK
2023-05-18 23:41:26 +08:00
John Factotum
7e618eb2b1
Fix initial prev/next
2023-05-18 23:03:51 +08:00
John Factotum
ba4f58af4f
Refactor and fix prev/next at start/end of book
2023-05-17 23:27:38 +08:00
John Factotum
887138472b
Fix visible range
2023-05-17 12:49:23 +08:00
John Factotum
31f9d4f919
Fix header/footer layout
2023-05-17 04:04:09 +08:00
John Factotum
ec512a8b7e
Add sliding animation
...
Can be disabled by setting `.pageAnimation` to `false`.
2023-05-17 02:52:39 +08:00
John Factotum
57ab79d598
Replace deselect with more general content access method
2023-05-16 19:12:26 +08:00
John Factotum
edea003b2f
Add option to show start of main body text as defined in landmarks
2023-05-16 16:21:56 +08:00
John Factotum
3c4d309b52
Fix unnecessary scrollbar in scrolled mode
2023-05-16 15:50:20 +08:00
John Factotum
257538169d
Fix header/footer z-index
2023-05-15 12:15:39 +00:00
John Factotum
8d69473e1f
Fix README.md
2023-05-15 12:11:04 +00:00
John Factotum
0a3f4b8f27
Use Shadow DOM
2023-05-15 20:00:35 +08:00
John Factotum
4acfc050ea
Turn View into a custom element, and use DOM events
...
Also change "relocated" -> "relocate"
2023-05-15 15:27:18 +08:00
John Factotum
6f6f6b4969
Remove nonexistent scripts
...
Should have been removed after 9949000a9e
2023-05-15 14:50:54 +08:00
John Factotum
a0acc506c5
Fix footer/header layout
...
Fix regression from 2bcff70450
2023-05-14 23:24:44 +08:00
John Factotum
17fb71943f
Scrolled mode: leave space for top margin when scrolling to position
2023-05-14 22:11:46 +08:00
John Factotum
a41e4b897c
Fix header/footer direction
2023-05-14 13:43:31 +08:00
John Factotum
2bcff70450
Improve layout for vertical writing
...
- Make horizontal padding grow with `gap`
- Make `maxColumnWidth` limit inline width, not horizontal width
2023-05-14 13:02:18 +08:00
John Factotum
20254e30aa
Scroll to anchor when body size changes
...
Also: remove unused private method
2023-05-13 13:22:48 +08:00
John Factotum
1396bd2b89
Yield when search finishes
...
This allows distinguishing between finished and aborted (with `Generator
.prototype.return`) search
2023-05-13 07:18:22 +08:00
John Factotum
5da3be5200
Add destroy method
...
Which revokes all blob URLs and removes the element from document.
2023-05-09 14:02:07 +08:00
John Factotum
a817932b08
Update README.md
2023-05-03 17:33:37 +08:00
John Factotum
41c00942d2
Further reduce header and footer styles
...
Instead, provide classes.
Also: prefix all classes with `foliate-`.
2023-05-03 17:31:22 +08:00
John Factotum
9e4ef02fa8
Rename uri to href
2023-05-03 17:22:55 +08:00
John Factotum
902cd9ad46
Really fix ResizeObserver loop
2023-05-02 19:08:58 +08:00
John Factotum
604a8caf3b
Fix ResizeObserver loop in some situations
...
This is caused by 7486360390 .
Not sure why it happens, and it only occurs in WebKit. Truncating the
padding seems to be the fix.
2023-05-02 01:35:43 +08:00
John Factotum
faaa2f47d4
Reader: update gap to relative
...
Also: use maxColumns
2023-05-01 23:15:58 +08:00
John Factotum
7486360390
Make margin relative to page width
2023-05-01 23:04:53 +08:00
John Factotum
9068d70acc
FB2 improvements
...
- Set title text-align more specifically on h1
- Don't throw when there's no cover
2023-05-01 22:55:59 +08:00
John Factotum
d951497c30
Fix not being able to jump to the very end of the book
2023-04-29 01:39:22 +08:00
John Factotum
649ffa93b8
EPUB: add support for subtitle
2023-04-26 17:31:59 +08:00
John Factotum
8a69caf1dd
Fix CFI for fixed-layout books
2023-04-26 17:27:51 +08:00
John Factotum
b1346280fd
Make range available when reporting current location
2023-04-26 17:26:13 +08:00
John Factotum
abf95a4e9a
Fix text direction info
...
The spec changed and has been implemented in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=252444
But not in Chromium yet:
https://crbug.com/v8/13835
2023-04-23 14:00:17 +08:00
John Factotum
df9822201f
Fix misaligned columns in some situations
2023-04-08 21:23:45 +08:00
John Factotum
06417f763e
Fix misaligned columns at certain fractional widths
...
Fixes #2
2023-04-02 17:13:29 +08:00