@embedpdf-editor/vue3-chapter-viewer 1.0.7-beta.4 → 1.0.7-beta.6
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.js +1212 -1381
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -220,15 +220,12 @@ 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;
|
|
230
226
|
destroy(): void;
|
|
231
227
|
private setManifestInternal;
|
|
228
|
+
/** manifest 就绪后仅预取 URL 列表;open PDF 由视口/首章门控驱动,避免抢并发槽 */
|
|
232
229
|
private eagerPrefetchFromManifest;
|
|
233
230
|
private findChapter;
|
|
234
231
|
private getSegmentPlanForChapter;
|
|
@@ -242,7 +239,9 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
|
|
|
242
239
|
visibleRangeNeedsSegmentLoad(visibleGlobalPageIndices: number[]): boolean;
|
|
243
240
|
shouldShowChapterLoadError(chapterId: string, segmentIndex: number): boolean;
|
|
244
241
|
private clearVisibleSegmentBacklog;
|
|
245
|
-
/**
|
|
242
|
+
/** 分段起始页在整本中的 globalPageIndex(用于算与视口距离) */
|
|
243
|
+
private segmentStartGlobalIndex;
|
|
244
|
+
/** 按视口距离重建队列并立即 pump */
|
|
246
245
|
private scheduleVisibleSegmentLoads;
|
|
247
246
|
private pumpVisibleSegmentBacklog;
|
|
248
247
|
private prepareChapterForSegmentLoad;
|
|
@@ -493,6 +492,12 @@ export declare interface ChapterViewerOptions {
|
|
|
493
492
|
* 亦可用 `overlapStrategyForSamePageOwner('first' | 'last')`(chapter-core 包)
|
|
494
493
|
*/
|
|
495
494
|
overlapStrategy?: OverlapOwnerStrategy;
|
|
495
|
+
/** manifest 就绪后预取前 N 章第 0 段;滚动时另会预取视口相邻章。默认 1 */
|
|
496
|
+
prefetchChapters?: number;
|
|
497
|
+
/** 滚动按需同时 open 的分段 PDF 上限。默认 2 */
|
|
498
|
+
maxConcurrentSegmentLoads?: number;
|
|
499
|
+
/** 章节空闲卸载超时(ms)。默认 120000 */
|
|
500
|
+
unloadTimeoutMs?: number;
|
|
496
501
|
/** 功能开关与样式;省略则全开 */
|
|
497
502
|
features?: ChapterViewerConfig;
|
|
498
503
|
}
|