@prose-reader/core 1.71.0 → 1.72.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 +7 -7
- package/dist/enhancers/pagination/enhancer.d.ts +3 -3
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +14 -14
- package/dist/index.umd.cjs.map +1 -1
- package/dist/pagination/Pagination.d.ts +2 -2
- package/dist/reader.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -1061,7 +1061,7 @@
|
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
const observeState = (reader) => {
|
|
1064
|
-
return reader.pagination.
|
|
1064
|
+
return reader.pagination.state$.pipe(
|
|
1065
1065
|
rxjs.withLatestFrom(reader.context.manifest$, reader.settings.settings$),
|
|
1066
1066
|
rxjs.map(
|
|
1067
1067
|
([
|
|
@@ -1193,7 +1193,7 @@
|
|
|
1193
1193
|
const trackTotalPages = (reader) => {
|
|
1194
1194
|
const totalPages$ = reader.spine.layout$.pipe(
|
|
1195
1195
|
rxjs.debounceTime(10, rxjs.animationFrameScheduler),
|
|
1196
|
-
rxjs.withLatestFrom(reader.pagination.
|
|
1196
|
+
rxjs.withLatestFrom(reader.pagination.state$),
|
|
1197
1197
|
rxjs.map(() => {
|
|
1198
1198
|
const numberOfPagesPerItems = getNumberOfPagesForAllSpineItems(reader);
|
|
1199
1199
|
return {
|
|
@@ -1260,16 +1260,16 @@
|
|
|
1260
1260
|
const chaptersInfo$ = trackChapterInfo(reader);
|
|
1261
1261
|
const totalPages$ = trackTotalPages(reader);
|
|
1262
1262
|
const currentValue = new rxjs.BehaviorSubject({
|
|
1263
|
-
...reader.pagination.
|
|
1263
|
+
...reader.pagination.state,
|
|
1264
1264
|
...mapPaginationInfoToExtendedInfo(reader)(
|
|
1265
|
-
reader.pagination.
|
|
1265
|
+
reader.pagination.state,
|
|
1266
1266
|
getChaptersInfo(reader)
|
|
1267
1267
|
),
|
|
1268
1268
|
beginAbsolutePageIndex: 0,
|
|
1269
1269
|
endAbsolutePageIndex: 0,
|
|
1270
1270
|
numberOfTotalPages: 0
|
|
1271
1271
|
});
|
|
1272
|
-
const extandedBasePagination$ = reader.pagination.
|
|
1272
|
+
const extandedBasePagination$ = reader.pagination.state$.pipe(
|
|
1273
1273
|
rxjs.combineLatestWith(chaptersInfo$),
|
|
1274
1274
|
rxjs.map(([info, chaptersInfo]) => ({
|
|
1275
1275
|
...info,
|
|
@@ -1310,10 +1310,10 @@
|
|
|
1310
1310
|
...reader,
|
|
1311
1311
|
pagination: {
|
|
1312
1312
|
...reader.pagination,
|
|
1313
|
-
get
|
|
1313
|
+
get state() {
|
|
1314
1314
|
return getPaginationInfo();
|
|
1315
1315
|
},
|
|
1316
|
-
|
|
1316
|
+
state$: paginationInfo$
|
|
1317
1317
|
}
|
|
1318
1318
|
};
|
|
1319
1319
|
};
|
|
@@ -1832,7 +1832,7 @@
|
|
|
1832
1832
|
endSpineItemIndex: void 0,
|
|
1833
1833
|
navigationId: void 0
|
|
1834
1834
|
});
|
|
1835
|
-
this.
|
|
1835
|
+
this.state$ = this.paginationSubject.pipe(
|
|
1836
1836
|
rxjs.distinctUntilChanged(isShallowEqual),
|
|
1837
1837
|
rxjs.tap((value) => {
|
|
1838
1838
|
report$3.info(`update`, value);
|
|
@@ -1846,7 +1846,7 @@
|
|
|
1846
1846
|
...pagination
|
|
1847
1847
|
});
|
|
1848
1848
|
}
|
|
1849
|
-
get
|
|
1849
|
+
get state() {
|
|
1850
1850
|
return this.paginationSubject.value;
|
|
1851
1851
|
}
|
|
1852
1852
|
destroy() {
|
|
@@ -4953,7 +4953,7 @@
|
|
|
4953
4953
|
rxjs.withLatestFrom(this.context.bridgeEvent.navigation$),
|
|
4954
4954
|
rxjs.tap(([, navigation]) => {
|
|
4955
4955
|
const { position } = navigation;
|
|
4956
|
-
const previousPagination = this.pagination.
|
|
4956
|
+
const previousPagination = this.pagination.state;
|
|
4957
4957
|
const {
|
|
4958
4958
|
beginIndex: beginSpineItemIndex,
|
|
4959
4959
|
endIndex: endSpineItemIndex
|
|
@@ -5015,7 +5015,7 @@
|
|
|
5015
5015
|
endSpineItemIndex,
|
|
5016
5016
|
beginPageIndexInSpineItem,
|
|
5017
5017
|
endPageIndexInSpineItem
|
|
5018
|
-
} = this.pagination.
|
|
5018
|
+
} = this.pagination.state;
|
|
5019
5019
|
if (beginPageIndexInSpineItem === void 0 || endPageIndexInSpineItem === void 0 || beginSpineItemIndex === void 0 || endSpineItemIndex === void 0)
|
|
5020
5020
|
return;
|
|
5021
5021
|
const beginSpineItem = this.spineItemsManager.get(beginSpineItemIndex);
|
|
@@ -7082,7 +7082,7 @@
|
|
|
7082
7082
|
navigator2.viewportState$.subscribe(context.bridgeEvent.viewportStateSubject);
|
|
7083
7083
|
navigator2.navigation$.subscribe(context.bridgeEvent.navigationSubject);
|
|
7084
7084
|
navigator2.isLocked$.subscribe(context.bridgeEvent.navigationIsLockedSubject);
|
|
7085
|
-
pagination.
|
|
7085
|
+
pagination.state$.subscribe(context.bridgeEvent.paginationSubject);
|
|
7086
7086
|
const layout = () => {
|
|
7087
7087
|
var _a;
|
|
7088
7088
|
const containerElement = (_a = elementSubject$.getValue()) == null ? void 0 : _a.parentElement;
|
|
@@ -7202,8 +7202,8 @@
|
|
|
7202
7202
|
load,
|
|
7203
7203
|
destroy,
|
|
7204
7204
|
pagination: {
|
|
7205
|
-
|
|
7206
|
-
|
|
7205
|
+
state: pagination.state,
|
|
7206
|
+
state$: pagination.state$
|
|
7207
7207
|
},
|
|
7208
7208
|
settings: settingsManager,
|
|
7209
7209
|
element$,
|