@prose-reader/core 1.373.0 → 1.374.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/enhancers/pagination/trackPaginationEnrichment.d.ts +17 -0
- package/dist/enhancers/pagination/types.d.ts +2 -4
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +667 -627
- package/dist/index.js.map +1 -1
- package/dist/pagination/PaginationController.d.ts +3 -1
- package/dist/pagination/edges.d.ts +4 -1
- package/dist/pagination/settlement.test.d.ts +1 -0
- package/dist/pagination/types.d.ts +13 -3
- package/package.json +4 -4
- package/dist/enhancers/pagination/trackPaginationInfo.d.ts +0 -29
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PaginationEdge, PaginationInfo } from '../../pagination/types';
|
|
2
|
+
import { Reader } from '../../reader';
|
|
3
|
+
import { LayoutEnhancerOutput } from '../layout/layoutEnhancer';
|
|
4
|
+
import { EnhancerPaginationEdge, ExtraPaginationInfo } from './types';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
type EdgeEnrichment = Omit<EnhancerPaginationEdge, keyof PaginationEdge>;
|
|
7
|
+
export type PaginationEnrichment = ExtraPaginationInfo & {
|
|
8
|
+
source: PaginationInfo;
|
|
9
|
+
begin: EdgeEnrichment;
|
|
10
|
+
end: EdgeEnrichment;
|
|
11
|
+
};
|
|
12
|
+
export declare const trackPaginationEnrichment: (reader: Reader & LayoutEnhancerOutput) => Observable<ExtraPaginationInfo & {
|
|
13
|
+
source: PaginationInfo;
|
|
14
|
+
begin: EdgeEnrichment;
|
|
15
|
+
end: EdgeEnrichment;
|
|
16
|
+
}>;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { PaginationEdge } from '../../pagination/types';
|
|
2
|
+
import { PaginationEdge, VisibleRange } from '../../pagination/types';
|
|
3
3
|
import { LayoutEnhancerOutput } from '../layout/layoutEnhancer';
|
|
4
4
|
import { EnhancerOutput, RootEnhancer } from '../types/enhancer';
|
|
5
5
|
import { ChapterInfo } from './chapters';
|
|
@@ -15,10 +15,8 @@ export type ExtraPaginationInfo = {
|
|
|
15
15
|
isUsingSpread: boolean;
|
|
16
16
|
};
|
|
17
17
|
export type EnhancerPaginationInto = ExtraPaginationInfo & {
|
|
18
|
-
begin: EnhancerPaginationEdge;
|
|
19
|
-
end: EnhancerPaginationEdge;
|
|
20
18
|
navigationId?: symbol;
|
|
21
|
-
}
|
|
19
|
+
} & VisibleRange<EnhancerPaginationEdge>;
|
|
22
20
|
export type PaginationEnhancerAPI<InheritOutput extends EnhancerOutput<RootEnhancer> & LayoutEnhancerOutput> = Omit<InheritOutput, "pagination"> & {
|
|
23
21
|
pagination: Omit<InheritOutput["pagination"], "state$" | "state"> & {
|
|
24
22
|
state$: Observable<EnhancerPaginationInto>;
|