@embedpdf-editor/vue3-chapter-viewer 1.1.0 → 1.1.2
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 +13 -1
- package/dist/index.js +5906 -4489
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare interface ChapterManagerCapability {
|
|
|
162
162
|
* ChapterScroll 在可见区变化时调用,用以驱动按需加载。
|
|
163
163
|
* 索引含上下 buffer(与 layout.items 范围一致),不仅是严格视口内页。
|
|
164
164
|
*/
|
|
165
|
-
setVisibleGlobalPages(visiblePageIndices: number[]): void;
|
|
165
|
+
setVisibleGlobalPages(visiblePageIndices: number[], options?: SetVisibleGlobalPagesOptions): void;
|
|
166
166
|
/** 可见区内是否仍有未 open 的分段(用于滚动侧避免误跳过加载) */
|
|
167
167
|
visibleRangeNeedsSegmentLoad(visiblePageIndices: number[]): boolean;
|
|
168
168
|
/** 占位槽是否应显示章级失败(排除仍在排队/加载中的情况) */
|
|
@@ -221,6 +221,8 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
|
|
|
221
221
|
private documentManagerUnsubs;
|
|
222
222
|
/** 可见区驱动的分段加载 backlog(限制并发 open,避免仅缓存 URL 却不请求 PDF) */
|
|
223
223
|
private visibleSegmentBacklog;
|
|
224
|
+
/** 最近一次 setVisibleGlobalPages 覆盖的章(含 buffer) */
|
|
225
|
+
private visibleChapterIds;
|
|
224
226
|
private activeVisibleSegmentLoads;
|
|
225
227
|
constructor(id: string, registry: PluginRegistry);
|
|
226
228
|
initialize(config: ChapterManagerPluginConfig): Promise<void>;
|
|
@@ -249,6 +251,8 @@ export declare class ChapterManagerPlugin extends BasePlugin<ChapterManagerPlugi
|
|
|
249
251
|
private scheduleVisibleSegmentLoads;
|
|
250
252
|
private pumpVisibleSegmentBacklog;
|
|
251
253
|
private prepareChapterForSegmentLoad;
|
|
254
|
+
private unloadChaptersOutside;
|
|
255
|
+
private isChapterVisibleForLoad;
|
|
252
256
|
private handleVisibleChange;
|
|
253
257
|
private collectIdleChapters;
|
|
254
258
|
ensureChapterLoaded(chapterId: string): Promise<ChapterLoadStatus>;
|
|
@@ -993,6 +997,14 @@ export declare interface SerializableAnnotationTransferItem {
|
|
|
993
997
|
};
|
|
994
998
|
}
|
|
995
999
|
|
|
1000
|
+
declare interface SetVisibleGlobalPagesOptions {
|
|
1001
|
+
/**
|
|
1002
|
+
* 目录/书签等大跨度跳转:清空旧队列、卸载视口外已 open 章,仅保留目标附近 buffer。
|
|
1003
|
+
* 避免途经章 PDF 继续加载或占用并发槽。
|
|
1004
|
+
*/
|
|
1005
|
+
jump?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
996
1008
|
export declare function toChapterTreeNodes(nodes: ChapterTreeInput[]): ChapterTreeNode_2[];
|
|
997
1009
|
|
|
998
1010
|
export { useCapability }
|