@embedpdf-editor/vue3-chapter-viewer 1.0.7-beta.4 → 1.0.7-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -220,10 +220,6 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
220
220
  /** 可见区驱动的分段加载 backlog(限制并发 open,避免仅缓存 URL 却不请求 PDF) */
221
221
  private visibleSegmentBacklog;
222
222
  private activeVisibleSegmentLoads;
223
- /** 视口内下一段预取,优先级 = 视口距离 + 该值 */
224
- private readonly SEG_PRIO_PREFETCH_NEXT;
225
- /** 相邻章仅预取第 0 段 */
226
- private readonly SEG_PRIO_CHAPTER_PREFETCH_BASE;
227
223
  constructor(id: string, registry: PluginRegistry);
228
224
  initialize(config: ChapterManagerPluginConfig): Promise<void>;
229
225
  protected buildCapability(): ChapterManagerCapability;
@@ -242,7 +238,9 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
242
238
  visibleRangeNeedsSegmentLoad(visibleGlobalPageIndices: number[]): boolean;
243
239
  shouldShowChapterLoadError(chapterId: string, segmentIndex: number): boolean;
244
240
  private clearVisibleSegmentBacklog;
245
- /** 按优先级排队并立即 pump,确保在 loadChapterUrls 缓存后会 open PDF */
241
+ /** 分段在整本中的阅读顺序(globalPageIndex 升序 按章按段依次 open PDF */
242
+ private globalSegmentSortKey;
243
+ /** 按阅读顺序重建队列并立即 pump(替换旧 backlog,避免末尾多章同时 loading) */
246
244
  private scheduleVisibleSegmentLoads;
247
245
  private pumpVisibleSegmentBacklog;
248
246
  private prepareChapterForSegmentLoad;
@@ -493,6 +491,12 @@ export declare interface ChapterViewerOptions {
493
491
  * 亦可用 `overlapStrategyForSamePageOwner('first' | 'last')`(chapter-core 包)
494
492
  */
495
493
  overlapStrategy?: OverlapOwnerStrategy;
494
+ /** manifest 就绪后预取前 N 章第 0 段;滚动时另会预取视口相邻章。默认 1 */
495
+ prefetchChapters?: number;
496
+ /** 滚动按需同时 open 的分段 PDF 上限。默认 2 */
497
+ maxConcurrentSegmentLoads?: number;
498
+ /** 章节空闲卸载超时(ms)。默认 120000 */
499
+ unloadTimeoutMs?: number;
496
500
  /** 功能开关与样式;省略则全开 */
497
501
  features?: ChapterViewerConfig;
498
502
  }