@prose-reader/core 1.170.0 → 1.172.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/index.js +5 -16
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +4 -15
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { switchMap, of, fromEvent, take, map, from, takeUntil, Observable, defer, Subject, combineLatest, merge, EMPTY, withLatestFrom, BehaviorSubject, filter, share, first as first$1, mergeMap, endWith, tap as tap$1, finalize, catchError, lastValueFrom, NEVER, scheduled, animationFrameScheduler, distinctUntilChanged as distinctUntilChanged$1, throttleTime, debounceTime as debounceTime$1, startWith as startWith$1, switchScan, forkJoin, shareReplay as shareReplay$1, delay, ReplaySubject, identity, timer, skip as skip$1, exhaustMap, reduce, concatMap } from "rxjs";
|
|
2
|
-
import {
|
|
2
|
+
import { switchMap as switchMap$1, first, map as map$1, startWith, shareReplay, distinctUntilChanged, tap, pairwise, take as take$1, takeUntil as takeUntil$1, filter as filter$1, debounceTime, skip, mergeMap as mergeMap$1, catchError as catchError$1, withLatestFrom as withLatestFrom$1, share as share$1 } from "rxjs/operators";
|
|
3
3
|
import { shallowMergeIfDefined, isShallowEqual, parseContentType, detectMimeTypeFromName, getParentPath, arrayEqual } from "@prose-reader/shared";
|
|
4
4
|
import { isShallowEqual as isShallowEqual2 } from "@prose-reader/shared";
|
|
5
5
|
const getAttributeValueFromString = (string, key) => {
|
|
@@ -439,9 +439,7 @@ const normalizeEventForViewport = (event, iframeOriginalEvent, locator, context)
|
|
|
439
439
|
if (isPointerEvent(event)) {
|
|
440
440
|
const { clientX, clientY } = translateFramePositionIntoPage({
|
|
441
441
|
position: event,
|
|
442
|
-
frameElement
|
|
443
|
-
pageHeight,
|
|
444
|
-
pageWidth
|
|
442
|
+
frameElement
|
|
445
443
|
});
|
|
446
444
|
const newEvent = new PointerEvent(event.type, {
|
|
447
445
|
...event,
|
|
@@ -458,9 +456,7 @@ const normalizeEventForViewport = (event, iframeOriginalEvent, locator, context)
|
|
|
458
456
|
if (isMouseEvent(event)) {
|
|
459
457
|
const { clientX, clientY } = translateFramePositionIntoPage({
|
|
460
458
|
position: event,
|
|
461
|
-
frameElement
|
|
462
|
-
pageHeight,
|
|
463
|
-
pageWidth
|
|
459
|
+
frameElement
|
|
464
460
|
});
|
|
465
461
|
const newEvent = new MouseEvent(event.type, {
|
|
466
462
|
...event,
|
|
@@ -477,9 +473,7 @@ const normalizeEventForViewport = (event, iframeOriginalEvent, locator, context)
|
|
|
477
473
|
const touches = Array.from(event.touches).map((touch) => {
|
|
478
474
|
const { clientX, clientY } = translateFramePositionIntoPage({
|
|
479
475
|
position: touch,
|
|
480
|
-
frameElement
|
|
481
|
-
pageHeight,
|
|
482
|
-
pageWidth
|
|
476
|
+
frameElement
|
|
483
477
|
});
|
|
484
478
|
return new Touch({
|
|
485
479
|
identifier: touch.identifier,
|
|
@@ -6375,8 +6369,7 @@ const restoreNavigationForScrollingPageTurnMode = ({
|
|
|
6375
6369
|
foundSpineItem
|
|
6376
6370
|
);
|
|
6377
6371
|
const positionInSpineItem = navigation.positionInSpineItem ?? {
|
|
6378
|
-
y: 0
|
|
6379
|
-
x: 0
|
|
6372
|
+
y: 0
|
|
6380
6373
|
};
|
|
6381
6374
|
if (settings.values.computedPageTurnDirection === "vertical") {
|
|
6382
6375
|
if (top === navigation.spineItemTop && height === navigation.spineItemHeight && isPositionWithinSpineItem) {
|
|
@@ -6478,7 +6471,6 @@ const withRestoredPosition = ({
|
|
|
6478
6471
|
settings,
|
|
6479
6472
|
spineItemsManager: spine.spineItemsManager,
|
|
6480
6473
|
spineItemLocator: spine.locator.spineItemLocator,
|
|
6481
|
-
context,
|
|
6482
6474
|
spineLayout: spine.spineLayout
|
|
6483
6475
|
})
|
|
6484
6476
|
}
|
|
@@ -6546,7 +6538,6 @@ const withDirection = ({
|
|
|
6546
6538
|
return stream.pipe(
|
|
6547
6539
|
map(({ navigation, previousNavigation }) => {
|
|
6548
6540
|
const direction = getOrGuessDirection({
|
|
6549
|
-
context,
|
|
6550
6541
|
navigation,
|
|
6551
6542
|
previousNavigation,
|
|
6552
6543
|
settings
|
|
@@ -6893,7 +6884,6 @@ class InternalNavigator extends DestroyableClass {
|
|
|
6893
6884
|
}),
|
|
6894
6885
|
withDirection({ context, settings }),
|
|
6895
6886
|
withSpineItem({
|
|
6896
|
-
context,
|
|
6897
6887
|
navigationResolver,
|
|
6898
6888
|
settings,
|
|
6899
6889
|
spineItemsManager: spine.spineItemsManager,
|
|
@@ -7011,7 +7001,6 @@ class InternalNavigator extends DestroyableClass {
|
|
|
7011
7001
|
* yet.
|
|
7012
7002
|
*/
|
|
7013
7003
|
withSpineItem({
|
|
7014
|
-
context,
|
|
7015
7004
|
navigationResolver,
|
|
7016
7005
|
settings,
|
|
7017
7006
|
spineItemsManager: spine.spineItemsManager,
|