feat: chapter runtime refactoring and related updates
- Refactor chapter runtime: replace window coordinator/snapshot with warmup orchestrator - Update EPUB core: parser, reading session, JS bridge, navigator layout - Update reader controller: data source, location resolution, persistence - Update chapter runtime: data cache, loader, runtime store, disk cache, warmup orchestrator - Remove deprecated navigation state machine and pagination state - Update text rendering: book cache, HTML normalizer - Update UI: text content view, dark image adjuster, text selection controller - Update settings and reader configuration - Add CODE_REVIEW.md and AUDIT_FINAL.md documentation - Update pod dependencies (remove SSAlertSwift, SnapKit) - Update podspec and pod configuration files Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -37,12 +37,20 @@ public struct RDEPUBNavigatorLayoutContext: Equatable {
|
||||
return CGSize(width: width, height: containerSize.height)
|
||||
}
|
||||
|
||||
/// Content insets that account for safe area (Dynamic Island / notch) on iPhone.
|
||||
/// Uses the larger of safeAreaInsets and reflowableContentInsets for top/bottom
|
||||
/// to ensure content is never hidden under the Dynamic Island or home indicator.
|
||||
public var safeReflowableContentInsets: UIEdgeInsets {
|
||||
let top = max(safeAreaInsets.top, reflowableContentInsets.top)
|
||||
let bottom = max(safeAreaInsets.bottom, reflowableContentInsets.bottom)
|
||||
let left = max(safeAreaInsets.left, reflowableContentInsets.left)
|
||||
let right = max(safeAreaInsets.right, reflowableContentInsets.right)
|
||||
return UIEdgeInsets(top: top, left: left, bottom: bottom, right: right)
|
||||
}
|
||||
|
||||
/// Fixed layout content insets that respect safe areas on all devices including iPhone.
|
||||
public var fixedContentInset: UIEdgeInsets {
|
||||
var insets = safeAreaInsets
|
||||
if userInterfaceIdiom != .phone {
|
||||
insets = .zero
|
||||
}
|
||||
|
||||
let horizontalInsets = max(insets.left, insets.right)
|
||||
insets.left = horizontalInsets
|
||||
insets.right = horizontalInsets
|
||||
|
||||
Reference in New Issue
Block a user