@embedpdf-editor/vue3-chapter-viewer 1.0.7-beta.2 → 1.0.7-beta.4
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 +15 -1
- package/dist/index.js +5079 -4937
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,10 @@ declare interface ChapterManagerCapability {
|
|
|
163
163
|
* 索引含上下 buffer(与 layout.items 范围一致),不仅是严格视口内页。
|
|
164
164
|
*/
|
|
165
165
|
setVisibleGlobalPages(visiblePageIndices: number[]): void;
|
|
166
|
+
/** 可见区内是否仍有未 open 的分段(用于滚动侧避免误跳过加载) */
|
|
167
|
+
visibleRangeNeedsSegmentLoad(visiblePageIndices: number[]): boolean;
|
|
168
|
+
/** 占位槽是否应显示章级失败(排除仍在排队/加载中的情况) */
|
|
169
|
+
shouldShowChapterLoadError(chapterId: string, segmentIndex: number): boolean;
|
|
166
170
|
/** 显式触发某章节加载(分段章节仅加载第 0 段) */
|
|
167
171
|
ensureChapterLoaded(chapterId: string): Promise<ChapterLoadStatus>;
|
|
168
172
|
/** 加载章内指定分段 PDF */
|
|
@@ -213,7 +217,9 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
|
|
|
213
217
|
private readonly pendingChapterUrlsPromises;
|
|
214
218
|
private unloadTimer;
|
|
215
219
|
private documentManagerUnsubs;
|
|
216
|
-
|
|
220
|
+
/** 可见区驱动的分段加载 backlog(限制并发 open,避免仅缓存 URL 却不请求 PDF) */
|
|
221
|
+
private visibleSegmentBacklog;
|
|
222
|
+
private activeVisibleSegmentLoads;
|
|
217
223
|
/** 视口内下一段预取,优先级 = 视口距离 + 该值 */
|
|
218
224
|
private readonly SEG_PRIO_PREFETCH_NEXT;
|
|
219
225
|
/** 相邻章仅预取第 0 段 */
|
|
@@ -229,9 +235,17 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
|
|
|
229
235
|
private anySegmentOpen;
|
|
230
236
|
private isSegmentDocumentOpen;
|
|
231
237
|
private resolveSegmentDocumentId;
|
|
238
|
+
private isAnySegmentWorkPending;
|
|
232
239
|
private isSegmentLoadPending;
|
|
233
240
|
private syncChapterStatusFromDocuments;
|
|
234
241
|
private lastVisibleIndicesKey;
|
|
242
|
+
visibleRangeNeedsSegmentLoad(visibleGlobalPageIndices: number[]): boolean;
|
|
243
|
+
shouldShowChapterLoadError(chapterId: string, segmentIndex: number): boolean;
|
|
244
|
+
private clearVisibleSegmentBacklog;
|
|
245
|
+
/** 按优先级排队并立即 pump,确保在 loadChapterUrls 缓存后会 open PDF */
|
|
246
|
+
private scheduleVisibleSegmentLoads;
|
|
247
|
+
private pumpVisibleSegmentBacklog;
|
|
248
|
+
private prepareChapterForSegmentLoad;
|
|
235
249
|
private handleVisibleChange;
|
|
236
250
|
private collectIdleChapters;
|
|
237
251
|
ensureChapterLoaded(chapterId: string): Promise<ChapterLoadStatus>;
|