更新阅读器功能与示例

This commit is contained in:
shen
2026-07-27 21:43:13 +08:00
parent 68d9363f0a
commit 9392027106
78 changed files with 8780 additions and 2084 deletions
@@ -21,6 +21,18 @@ extension RDEPUBReaderController {
runtime.clearSelection()
}
/// Displays temporary decorations without mutating annotation persistence.
public func setTransientHighlights(_ highlights: [RDEPUBHighlight]) {
transientHighlights = highlights
refreshVisibleContentPreservingLocation()
}
public func clearTransientHighlights() {
guard !transientHighlights.isEmpty else { return }
transientHighlights.removeAll()
refreshVisibleContentPreservingLocation()
}
public func bookmark(withID id: String) -> RDEPUBBookmark? {
runtime.bookmark(withID: id)
}