@prose-reader/core 1.169.0 → 1.171.0
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/createReaderWithEnhancer.d.ts +1 -11
- package/dist/enhancers/pagination/enhancer.d.ts +3 -6
- package/dist/enhancers/pagination/pagination.d.ts +5 -4
- package/dist/enhancers/pagination/progression.d.ts +6 -0
- package/dist/enhancers/pagination/types.d.ts +0 -4
- package/dist/index.js +8178 -8163
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +8152 -8137
- package/dist/index.umd.cjs.map +1 -1
- package/dist/reader.d.ts +4 -3
- package/dist/utils/dom.d.ts +1 -1
- package/package.json +3 -3
- package/dist/enhancers/progression.d.ts +0 -16
|
@@ -107,6 +107,7 @@ export declare const createReaderWithEnhancers: (options: Partial<import('./sett
|
|
|
107
107
|
settings: import('./settings/SettingsInterface').SettingsInterface<NonNullable<import('./settings/types').CoreInputSettings>, NonNullable<import('./settings/types').CoreOutputSettings | undefined>>;
|
|
108
108
|
element$: import('rxjs').Observable<HTMLElement>;
|
|
109
109
|
layout$: import('rxjs').Observable<import('./spine/SpineLayout').LayoutInfo>;
|
|
110
|
+
layoutInfo$: import('rxjs').Observable<import('./spine/SpineLayout').LayoutInfo>;
|
|
110
111
|
viewportState$: import('rxjs').Observable<"free" | "busy">;
|
|
111
112
|
viewportFree$: import('rxjs').Observable<"free">;
|
|
112
113
|
state$: import('rxjs').Observable<"idle" | "ready">;
|
|
@@ -119,17 +120,6 @@ export declare const createReaderWithEnhancers: (options: Partial<import('./sett
|
|
|
119
120
|
}>;
|
|
120
121
|
destroy$: import('rxjs').Subject<void>;
|
|
121
122
|
};
|
|
122
|
-
} & {
|
|
123
|
-
progression: {
|
|
124
|
-
getPercentageEstimate: (context: import('./context/Context').Context, currentSpineIndex: number, numberOfPages: number, pageIndex: number, currentPosition: {
|
|
125
|
-
x: number;
|
|
126
|
-
y: number;
|
|
127
|
-
}, currentItem: import('.').SpineItem) => import('rxjs').Observable<number>;
|
|
128
|
-
getScrollPercentageWithinItem: (context: import('./context/Context').Context, currentPosition: {
|
|
129
|
-
x: number;
|
|
130
|
-
y: number;
|
|
131
|
-
}, currentItem: import('.').SpineItem) => number;
|
|
132
|
-
};
|
|
133
123
|
}, "pagination"> & {
|
|
134
124
|
pagination: Omit<{
|
|
135
125
|
getState: () => import('./pagination/Pagination').PaginationInfo;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { progressionEnhancer } from '../progression';
|
|
3
|
-
import { EnhancerOutput } from '../types/enhancer';
|
|
4
2
|
import { PaginationInfo } from '../../pagination/Pagination';
|
|
5
|
-
import {
|
|
3
|
+
import { EnhancerOutput, RootEnhancer } from '../types/enhancer';
|
|
6
4
|
import { ConsolidatedResource, LocatableResource } from './locate';
|
|
7
|
-
|
|
8
|
-
export declare const paginationEnhancer: <InheritOptions, InheritOutput extends EnhancerOutput<
|
|
5
|
+
import { ExtraPaginationInfo } from './types';
|
|
6
|
+
export declare const paginationEnhancer: <InheritOptions, InheritOutput extends EnhancerOutput<RootEnhancer>, PaginationOutput extends Omit<InheritOutput["pagination"], "state$" | "state"> & {
|
|
9
7
|
state$: Observable<PaginationInfo & ExtraPaginationInfo>;
|
|
10
8
|
state: PaginationInfo & ExtraPaginationInfo;
|
|
11
9
|
}>(next: (options: InheritOptions) => InheritOutput) => (options: InheritOptions) => Omit<InheritOutput, "pagination"> & {
|
|
@@ -13,4 +11,3 @@ export declare const paginationEnhancer: <InheritOptions, InheritOutput extends
|
|
|
13
11
|
locate: <T extends LocatableResource>(resources: T[]) => Observable<(ConsolidatedResource & T)[]>;
|
|
14
12
|
};
|
|
15
13
|
};
|
|
16
|
-
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Observable, ObservedValueOf } from 'rxjs';
|
|
2
|
-
import { trackChapterInfo } from './chapters';
|
|
3
|
-
import { EnhancerPaginationInto, ExtraPaginationInfo, ReaderWithProgression } from './types';
|
|
4
2
|
import { PaginationInfo } from '../../pagination/Pagination';
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { Reader } from '../../reader';
|
|
4
|
+
import { trackChapterInfo } from './chapters';
|
|
5
|
+
import { EnhancerPaginationInto, ExtraPaginationInfo } from './types';
|
|
6
|
+
export declare const mapPaginationInfoToExtendedInfo: (reader: Reader, paginationInfo: PaginationInfo, chaptersInfo: ObservedValueOf<ReturnType<typeof trackChapterInfo>>, percentageEstimateOfBook: number) => Observable<Omit<ExtraPaginationInfo, "beginAbsolutePageIndex" | "endAbsolutePageIndex" | "beginAbsolutePageIndex" | "numberOfTotalPages">>;
|
|
7
|
+
export declare const trackPaginationInfo: (reader: Reader) => {
|
|
7
8
|
paginationInfo$: Observable<EnhancerPaginationInto>;
|
|
8
9
|
getPaginationInfo: () => EnhancerPaginationInto;
|
|
9
10
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Reader } from '../../reader';
|
|
2
|
+
import { SpineItem } from '../../spineItem/SpineItem';
|
|
3
|
+
export declare const getPercentageEstimate: (reader: Reader, currentSpineIndex: number, pageIndex: number, currentPosition: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}, currentItem: SpineItem) => import('rxjs').Observable<number>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { PaginationInfo } from '../../pagination/Pagination';
|
|
2
|
-
import { Reader } from '../../reader';
|
|
3
|
-
import { progressionEnhancer } from '../progression';
|
|
4
|
-
import { EnhancerOutput } from '../types/enhancer';
|
|
5
2
|
import { ChapterInfo } from './chapters';
|
|
6
|
-
export type ReaderWithProgression = Reader & EnhancerOutput<typeof progressionEnhancer>;
|
|
7
3
|
export type ExtraPaginationInfo = {
|
|
8
4
|
beginChapterInfo: ChapterInfo | undefined;
|
|
9
5
|
beginSpineItemReadingDirection: `rtl` | `ltr` | undefined;
|