@prose-reader/core 1.216.0 → 1.218.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 +30 -30
- package/dist/enhancers/fonts/SettingsManager.d.ts +6 -6
- package/dist/enhancers/fonts/fonts.d.ts +4 -4
- package/dist/enhancers/fonts/index.d.ts +2 -0
- package/dist/enhancers/fonts/types.d.ts +1 -1
- package/dist/enhancers/layout/SettingsManager.d.ts +6 -6
- package/dist/enhancers/layout/layoutEnhancer.d.ts +3 -3
- package/dist/enhancers/layout/types.d.ts +2 -2
- package/dist/index.d.ts +19 -0
- package/dist/index.js +86 -69
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +25 -25
- package/dist/index.umd.cjs.map +1 -1
- package/dist/navigation/Navigator.d.ts +6 -6
- package/dist/navigation/consolidation/consolidateWithPagination.d.ts +1 -1
- package/dist/navigation/resolvers/getNavigationFromSpineItemPosition.d.ts +1 -1
- package/dist/reader.d.ts +20 -20
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { switchMap as v, of as w, fromEvent as G, take as me, map as b, from as W, takeUntil as F, Observable as st, defer as Nt, Subject as U, combineLatest as q, merge as x, EMPTY as
|
|
1
|
+
import { switchMap as v, of as w, fromEvent as G, take as me, map as b, from as W, takeUntil as F, Observable as st, defer as Nt, Subject as U, combineLatest as q, merge as x, EMPTY as Q, withLatestFrom as D, NEVER as gt, tap as T, share as V, BehaviorSubject as k, filter as A, first as H, mergeMap as $t, endWith as pt, finalize as ut, catchError as fe, lastValueFrom as Ye, scheduled as Ze, animationFrameScheduler as at, shareReplay as et, distinctUntilChanged as E, throttleTime as Ge, debounceTime as St, startWith as nt, switchScan as Je, forkJoin as Ke, delay as wt, ReplaySubject as Jt, skip as ye, identity as Pt, exhaustMap as Vt, timer as Kt, reduce as Qe, concatMap as Qt } from "rxjs";
|
|
2
2
|
import { Report as ti, isShallowEqual as N, shallowMergeIfDefined as vt, getParentPath as ei, parseContentType as ii, detectMimeTypeFromName as Lt, arrayEqual as ni } from "@prose-reader/shared";
|
|
3
3
|
import { isShallowEqual as Ts } from "@prose-reader/shared";
|
|
4
4
|
import { switchMap as _, first as Se, map as X, distinctUntilChanged as Z, startWith as be, shareReplay as Mt, tap as z, pairwise as oi, take as si, takeUntil as J, filter as tt, debounceTime as ri, skip as ai, mergeMap as ci, catchError as te, withLatestFrom as ui } from "rxjs/operators";
|
|
@@ -582,7 +582,7 @@ const ji = (e) => (t) => {
|
|
|
582
582
|
(s) => s.loaded$.pipe(
|
|
583
583
|
v(() => {
|
|
584
584
|
const r = s.renderer.getDocumentFrame();
|
|
585
|
-
return r instanceof HTMLIFrameElement && (r != null && r.contentDocument) ? n(r.contentDocument) :
|
|
585
|
+
return r instanceof HTMLIFrameElement && (r != null && r.contentDocument) ? n(r.contentDocument) : Q;
|
|
586
586
|
})
|
|
587
587
|
)
|
|
588
588
|
)
|
|
@@ -624,7 +624,7 @@ const Ft = class Ft extends Y {
|
|
|
624
624
|
constructor(t) {
|
|
625
625
|
super(), this.triggerSubject = new U(), this.stateSubject = new k("idle"), this.unload$ = this.triggerSubject.pipe(
|
|
626
626
|
D(this.stateSubject),
|
|
627
|
-
|
|
627
|
+
A(
|
|
628
628
|
([o, s]) => o.type === "unload" && s !== "idle" && s !== "unloading"
|
|
629
629
|
),
|
|
630
630
|
b(() => {
|
|
@@ -632,7 +632,7 @@ const Ft = class Ft extends Y {
|
|
|
632
632
|
V()
|
|
633
633
|
), this.load$ = this.triggerSubject.pipe(
|
|
634
634
|
D(this.stateSubject),
|
|
635
|
-
|
|
635
|
+
A(
|
|
636
636
|
([o, s]) => o.type === "load" && s !== "loaded" && s !== "loading"
|
|
637
637
|
),
|
|
638
638
|
b(() => {
|
|
@@ -641,7 +641,7 @@ const Ft = class Ft extends Y {
|
|
|
641
641
|
), this.context = t.context, this.settings = t.settings, this.hookManager = t.hookManager, this.item = t.item, this.containerElement = t.containerElement, this.resourcesHandler = t.resourcesHandler;
|
|
642
642
|
const i = this.triggerSubject.pipe(
|
|
643
643
|
D(this.stateSubject),
|
|
644
|
-
|
|
644
|
+
A(
|
|
645
645
|
([o, s]) => o.type === "unload" && s !== "idle" && s !== "unloading"
|
|
646
646
|
),
|
|
647
647
|
b(() => {
|
|
@@ -947,9 +947,12 @@ const Me = (e, t) => {
|
|
|
947
947
|
].includes(e.mediaType) || // no encoding ? then try to detect html
|
|
948
948
|
!e.mediaType && _i.some(
|
|
949
949
|
(a) => e.href.endsWith(a)
|
|
950
|
-
)) ? (o == null || o.setAttribute("src", e.href), w(o)) : (s instanceof URL ? W(t.fetchResource()) :
|
|
951
|
-
|
|
952
|
-
|
|
950
|
+
)) ? (o == null || o.setAttribute("src", e.href), w(o)) : (s instanceof URL ? W(t.fetchResource()) : w(s)).pipe(
|
|
951
|
+
v((a) => {
|
|
952
|
+
if (!(a instanceof Response))
|
|
953
|
+
throw new Error("Invalid resource");
|
|
954
|
+
return W(i(a));
|
|
955
|
+
}),
|
|
953
956
|
T((a) => {
|
|
954
957
|
if (a) {
|
|
955
958
|
const c = new Blob([a], { type: "text/html" }), u = URL.createObjectURL(c);
|
|
@@ -958,7 +961,8 @@ const Me = (e, t) => {
|
|
|
958
961
|
}),
|
|
959
962
|
b(() => o),
|
|
960
963
|
fe((a) => (j.error(
|
|
961
|
-
`Error while trying to fetch or load resource for item ${e.id}
|
|
964
|
+
`Error while trying to fetch or load resource for item ${e.id}`,
|
|
965
|
+
s
|
|
962
966
|
), j.error(a), w(o)))
|
|
963
967
|
))
|
|
964
968
|
))
|
|
@@ -1329,7 +1333,7 @@ class sn extends ht {
|
|
|
1329
1333
|
);
|
|
1330
1334
|
}
|
|
1331
1335
|
onUnload() {
|
|
1332
|
-
return Bi(this.getFrameElement()), this.detach(),
|
|
1336
|
+
return Bi(this.getFrameElement()), this.detach(), Q;
|
|
1333
1337
|
}
|
|
1334
1338
|
onLayout({
|
|
1335
1339
|
minPageSpread: t,
|
|
@@ -1628,9 +1632,9 @@ const gn = ({
|
|
|
1628
1632
|
const O = L.height - $ * 2;
|
|
1629
1633
|
let B = L.width - P * 2, dt = P * 2;
|
|
1630
1634
|
f.isUsingVerticalWriting() && (B = L.width - P * 2, C = O, dt = $ * 2);
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1633
|
-
|
|
1635
|
+
const K = f == null ? void 0 : f.renderer.getDocumentFrame();
|
|
1636
|
+
K && ot(
|
|
1637
|
+
K,
|
|
1634
1638
|
"prose-layout-enhancer-css",
|
|
1635
1639
|
`
|
|
1636
1640
|
body {
|
|
@@ -1847,7 +1851,7 @@ class bn extends ht {
|
|
|
1847
1851
|
}
|
|
1848
1852
|
onUnload() {
|
|
1849
1853
|
const t = this.getImageElement();
|
|
1850
|
-
return t && URL.revokeObjectURL(t.src), this.detach(),
|
|
1854
|
+
return t && URL.revokeObjectURL(t.src), this.detach(), Q;
|
|
1851
1855
|
}
|
|
1852
1856
|
onLayout({
|
|
1853
1857
|
spreadPosition: t
|
|
@@ -1863,7 +1867,7 @@ class bn extends ht {
|
|
|
1863
1867
|
});
|
|
1864
1868
|
}
|
|
1865
1869
|
onRenderHeadless() {
|
|
1866
|
-
return
|
|
1870
|
+
return Q;
|
|
1867
1871
|
}
|
|
1868
1872
|
getDocumentFrame() {
|
|
1869
1873
|
}
|
|
@@ -1934,7 +1938,7 @@ const In = (e) => (t) => {
|
|
|
1934
1938
|
)) && t.goToUrl(n);
|
|
1935
1939
|
})
|
|
1936
1940
|
), rt = j.namespace("navigation");
|
|
1937
|
-
class
|
|
1941
|
+
class R {
|
|
1938
1942
|
constructor(t) {
|
|
1939
1943
|
this.__symbol = Symbol("SpineItemPosition"), this.x = t.x, this.y = t.y;
|
|
1940
1944
|
}
|
|
@@ -1946,11 +1950,11 @@ const Pn = ({
|
|
|
1946
1950
|
pageWidth: n,
|
|
1947
1951
|
spineItemLocator: o
|
|
1948
1952
|
}) => {
|
|
1949
|
-
let s = new
|
|
1953
|
+
let s = new R({
|
|
1950
1954
|
x: e.x - n,
|
|
1951
1955
|
y: e.y
|
|
1952
1956
|
});
|
|
1953
|
-
return t.isUsingVerticalWriting() && (s = new
|
|
1957
|
+
return t.isUsingVerticalWriting() && (s = new R({
|
|
1954
1958
|
x: e.x,
|
|
1955
1959
|
y: e.y + i
|
|
1956
1960
|
})), o.getSpineItemClosestPositionFromUnsafePosition(
|
|
@@ -2042,11 +2046,11 @@ const Pn = ({
|
|
|
2042
2046
|
pageWidth: n,
|
|
2043
2047
|
spineItemLocator: o
|
|
2044
2048
|
}) => {
|
|
2045
|
-
let s = new
|
|
2049
|
+
let s = new R({
|
|
2046
2050
|
x: e.x + n,
|
|
2047
2051
|
y: e.y
|
|
2048
2052
|
});
|
|
2049
|
-
return t.isUsingVerticalWriting() && (s = new
|
|
2053
|
+
return t.isUsingVerticalWriting() && (s = new R({
|
|
2050
2054
|
x: e.x,
|
|
2051
2055
|
y: e.y - i
|
|
2052
2056
|
})), o.getSpineItemClosestPositionFromUnsafePosition(
|
|
@@ -2883,8 +2887,8 @@ const Ne = (e, t, i) => {
|
|
|
2883
2887
|
Ke([At("prose-reader"), W(u.blob())])
|
|
2884
2888
|
).pipe(
|
|
2885
2889
|
_(([g, l]) => W(g.put(`${t}_${d.id}`, l))),
|
|
2886
|
-
te((g) => (j.error(g),
|
|
2887
|
-
) :
|
|
2890
|
+
te((g) => (j.error(g), Q))
|
|
2891
|
+
) : Q;
|
|
2888
2892
|
}),
|
|
2889
2893
|
J(e.destroy$)
|
|
2890
2894
|
).subscribe();
|
|
@@ -2906,7 +2910,7 @@ const Ne = (e, t, i) => {
|
|
|
2906
2910
|
})
|
|
2907
2911
|
)
|
|
2908
2912
|
),
|
|
2909
|
-
te((c) => (j.error(c),
|
|
2913
|
+
te((c) => (j.error(c), Q))
|
|
2910
2914
|
))),
|
|
2911
2915
|
J(e.destroy$)
|
|
2912
2916
|
).subscribe(), {
|
|
@@ -2980,13 +2984,13 @@ class Qn extends Y {
|
|
|
2980
2984
|
childList: !0,
|
|
2981
2985
|
subtree: !0
|
|
2982
2986
|
}).pipe(
|
|
2983
|
-
|
|
2987
|
+
A(
|
|
2984
2988
|
(r) => !!r.find((a) => a.type === "childList" && a.removedNodes.length)
|
|
2985
2989
|
)
|
|
2986
2990
|
), s = t.parentElement ? ne(t.parentElement, {
|
|
2987
2991
|
childList: !0
|
|
2988
2992
|
}).pipe(
|
|
2989
|
-
|
|
2993
|
+
A(
|
|
2990
2994
|
(r) => !!r.find(
|
|
2991
2995
|
(a) => Array.from(a.removedNodes).includes(t)
|
|
2992
2996
|
)
|
|
@@ -3016,7 +3020,7 @@ class Qn extends Y {
|
|
|
3016
3020
|
const a = i.getSelection();
|
|
3017
3021
|
return a && !a.isCollapsed ? [r, a] : void 0;
|
|
3018
3022
|
}),
|
|
3019
|
-
|
|
3023
|
+
A(ct)
|
|
3020
3024
|
)
|
|
3021
3025
|
),
|
|
3022
3026
|
F(x(s, this.destroy$))
|
|
@@ -3084,15 +3088,15 @@ const to = (e) => e.loaded$.pipe(
|
|
|
3084
3088
|
), s = o, r = o.pipe(
|
|
3085
3089
|
b((d) => !!d),
|
|
3086
3090
|
E(),
|
|
3087
|
-
|
|
3091
|
+
A((d) => d),
|
|
3088
3092
|
V()
|
|
3089
3093
|
), a = r.pipe(
|
|
3090
3094
|
v(() => s),
|
|
3091
3095
|
E(),
|
|
3092
|
-
|
|
3096
|
+
A((d) => !d),
|
|
3093
3097
|
V()
|
|
3094
3098
|
), c = o.pipe(
|
|
3095
|
-
|
|
3099
|
+
A((d) => (d == null ? void 0 : d.type) === "over"),
|
|
3096
3100
|
V()
|
|
3097
3101
|
), u = i.context.containerElement$.pipe(
|
|
3098
3102
|
v((d) => G(d, "pointerdown")),
|
|
@@ -3367,11 +3371,11 @@ class co {
|
|
|
3367
3371
|
constructor() {
|
|
3368
3372
|
this.navigationSubject = new Jt(1), this.viewportStateSubject = new k("free"), this.paginationSubject = new Jt(), this.navigationIsLockedSubject = new k(!1), this.pagination$ = this.paginationSubject.asObservable(), this.navigationUnlocked$ = this.navigationIsLockedSubject.pipe(
|
|
3369
3373
|
E(),
|
|
3370
|
-
|
|
3374
|
+
A((t) => !t)
|
|
3371
3375
|
), this.viewportState$ = this.viewportStateSubject.asObservable(), this.viewportFree$ = this.viewportState$.pipe(
|
|
3372
|
-
|
|
3376
|
+
A((t) => t === "free")
|
|
3373
3377
|
), this.viewportBusy$ = this.viewportState$.pipe(
|
|
3374
|
-
|
|
3378
|
+
A((t) => t === "busy")
|
|
3375
3379
|
), this.navigation$ = this.navigationSubject.asObservable();
|
|
3376
3380
|
}
|
|
3377
3381
|
}
|
|
@@ -3585,7 +3589,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3585
3589
|
}))
|
|
3586
3590
|
), mo = (e, t, i) => e.bridgeEvent.pagination$.pipe(
|
|
3587
3591
|
D(t),
|
|
3588
|
-
|
|
3592
|
+
A(
|
|
3589
3593
|
([n, o]) => n.navigationId === o.id
|
|
3590
3594
|
),
|
|
3591
3595
|
/**
|
|
@@ -3596,7 +3600,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3596
3600
|
v(([n, o]) => {
|
|
3597
3601
|
const s = i.spineItemsManager.get(o.spineItem);
|
|
3598
3602
|
return ((s == null ? void 0 : s.isReady$.pipe(H())) ?? w(!1)).pipe(
|
|
3599
|
-
|
|
3603
|
+
A((r) => r),
|
|
3600
3604
|
b(() => ({
|
|
3601
3605
|
pagination: n,
|
|
3602
3606
|
navigation: o
|
|
@@ -3875,7 +3879,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3875
3879
|
return m;
|
|
3876
3880
|
}
|
|
3877
3881
|
if (c && g && t.directionFromLastNavigation === "backward") {
|
|
3878
|
-
const m = new
|
|
3882
|
+
const m = new R({
|
|
3879
3883
|
x: (((p = t.positionInSpineItem) == null ? void 0 : p.x) ?? 0) + u,
|
|
3880
3884
|
y: (((h = t.positionInSpineItem) == null ? void 0 : h.y) ?? 0) + d
|
|
3881
3885
|
});
|
|
@@ -3912,7 +3916,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3912
3916
|
const { height: c, top: u } = s.getSpineItemSpineLayoutInfo(a), d = t.isPositionWithinSpineItem(
|
|
3913
3917
|
e.position,
|
|
3914
3918
|
a
|
|
3915
|
-
), g = e.positionInSpineItem ?? new
|
|
3919
|
+
), g = e.positionInSpineItem ?? new R({
|
|
3916
3920
|
y: 0,
|
|
3917
3921
|
x: 0
|
|
3918
3922
|
});
|
|
@@ -3923,7 +3927,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3923
3927
|
return o.getNavigationForSpineIndexOrId(a);
|
|
3924
3928
|
if (u !== e.spineItemTop) {
|
|
3925
3929
|
const l = t.getSafeSpineItemPositionFromUnsafeSpineItemPosition(
|
|
3926
|
-
e.positionInSpineItem ?? new
|
|
3930
|
+
e.positionInSpineItem ?? new R({
|
|
3927
3931
|
x: 0,
|
|
3928
3932
|
y: 0
|
|
3929
3933
|
}),
|
|
@@ -3935,7 +3939,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3935
3939
|
});
|
|
3936
3940
|
}
|
|
3937
3941
|
if (u === e.spineItemTop && c !== e.spineItemHeight) {
|
|
3938
|
-
const l = (e.spineItemHeight ?? g.y) - g.y, p = new
|
|
3942
|
+
const l = (e.spineItemHeight ?? g.y) - g.y, p = new R({
|
|
3939
3943
|
y: e.directionFromLastNavigation === "backward" ? c - l : g.y,
|
|
3940
3944
|
x: e.position.x
|
|
3941
3945
|
});
|
|
@@ -3951,7 +3955,7 @@ const ho = () => (e) => e.pipe(
|
|
|
3951
3955
|
}
|
|
3952
3956
|
if (!d) {
|
|
3953
3957
|
if (!(e.position.y < u)) {
|
|
3954
|
-
const m = new
|
|
3958
|
+
const m = new R({
|
|
3955
3959
|
y: c - l,
|
|
3956
3960
|
x: e.position.x
|
|
3957
3961
|
});
|
|
@@ -4095,11 +4099,11 @@ class Fo extends Y {
|
|
|
4095
4099
|
V()
|
|
4096
4100
|
), d = u.pipe(
|
|
4097
4101
|
D(c),
|
|
4098
|
-
|
|
4102
|
+
A(([, f]) => f),
|
|
4099
4103
|
v(([f]) => {
|
|
4100
4104
|
const y = this.locker.lock();
|
|
4101
4105
|
return c.pipe(
|
|
4102
|
-
|
|
4106
|
+
A((I) => !I),
|
|
4103
4107
|
H(),
|
|
4104
4108
|
b(
|
|
4105
4109
|
() => ({
|
|
@@ -4121,7 +4125,7 @@ class Fo extends Y {
|
|
|
4121
4125
|
v(() => w(null).pipe(
|
|
4122
4126
|
v(
|
|
4123
4127
|
() => c.pipe(
|
|
4124
|
-
|
|
4128
|
+
A((f) => !f),
|
|
4125
4129
|
H()
|
|
4126
4130
|
)
|
|
4127
4131
|
),
|
|
@@ -4504,13 +4508,13 @@ class Do extends bt {
|
|
|
4504
4508
|
et(1)
|
|
4505
4509
|
);
|
|
4506
4510
|
this.userScroll$ = this.watch("element").pipe(
|
|
4507
|
-
|
|
4511
|
+
A(ct),
|
|
4508
4512
|
v(
|
|
4509
4513
|
(g) => i.watch(["computedPageTurnMode"]).pipe(
|
|
4510
4514
|
v(
|
|
4511
4515
|
({ computedPageTurnMode: l }) => l === "controlled" ? gt : G(g, "scroll").pipe(
|
|
4512
4516
|
D(d),
|
|
4513
|
-
|
|
4517
|
+
A(
|
|
4514
4518
|
([, p]) => !p
|
|
4515
4519
|
),
|
|
4516
4520
|
b(([p]) => p)
|
|
@@ -4569,7 +4573,7 @@ const pe = (e, t, i) => {
|
|
|
4569
4573
|
e,
|
|
4570
4574
|
t.height
|
|
4571
4575
|
);
|
|
4572
|
-
return new
|
|
4576
|
+
return new R({
|
|
4573
4577
|
x: 0,
|
|
4574
4578
|
y: s
|
|
4575
4579
|
});
|
|
@@ -4579,10 +4583,10 @@ const pe = (e, t, i) => {
|
|
|
4579
4583
|
e,
|
|
4580
4584
|
t.width
|
|
4581
4585
|
);
|
|
4582
|
-
return i.isRTL() ? new
|
|
4586
|
+
return i.isRTL() ? new R({
|
|
4583
4587
|
x: t.width - o - i.getPageSize().width,
|
|
4584
4588
|
y: 0
|
|
4585
|
-
}) : new
|
|
4589
|
+
}) : new R({
|
|
4586
4590
|
x: o,
|
|
4587
4591
|
y: 0
|
|
4588
4592
|
});
|
|
@@ -4615,7 +4619,7 @@ const pe = (e, t, i) => {
|
|
|
4615
4619
|
itemWidth: u,
|
|
4616
4620
|
itemHeight: d,
|
|
4617
4621
|
spineItemPosition: g
|
|
4618
|
-
}) => new
|
|
4622
|
+
}) => new R({
|
|
4619
4623
|
x: Math.min(u, Math.max(0, g.x)),
|
|
4620
4624
|
y: Math.min(d, Math.max(0, g.y))
|
|
4621
4625
|
}), n = ({
|
|
@@ -4652,7 +4656,7 @@ const pe = (e, t, i) => {
|
|
|
4652
4656
|
h,
|
|
4653
4657
|
p
|
|
4654
4658
|
);
|
|
4655
|
-
return new
|
|
4659
|
+
return new R({ x: S, y: 0 });
|
|
4656
4660
|
}
|
|
4657
4661
|
}, s = (u, d) => {
|
|
4658
4662
|
var p, h;
|
|
@@ -4676,7 +4680,7 @@ const pe = (e, t, i) => {
|
|
|
4676
4680
|
}
|
|
4677
4681
|
}, r = (u, d) => {
|
|
4678
4682
|
const { width: g, height: l } = d.layout.layoutInfo;
|
|
4679
|
-
return new
|
|
4683
|
+
return new R({
|
|
4680
4684
|
x: xt(
|
|
4681
4685
|
u.x,
|
|
4682
4686
|
e.getPageSize().width,
|
|
@@ -4746,7 +4750,7 @@ const pe = (e, t, i) => {
|
|
|
4746
4750
|
a,
|
|
4747
4751
|
c,
|
|
4748
4752
|
r
|
|
4749
|
-
) || new
|
|
4753
|
+
) || new R({ x: 0, y: 0 })
|
|
4750
4754
|
};
|
|
4751
4755
|
}, it = ({
|
|
4752
4756
|
position: { x: e, y: t },
|
|
@@ -4857,7 +4861,7 @@ const pe = (e, t, i) => {
|
|
|
4857
4861
|
context: t
|
|
4858
4862
|
});
|
|
4859
4863
|
return n.getSpinePositionFromSpineItemPosition({
|
|
4860
|
-
spineItemPosition: new
|
|
4864
|
+
spineItemPosition: new R({ x: o, y: 0 }),
|
|
4861
4865
|
spineItem: i
|
|
4862
4866
|
});
|
|
4863
4867
|
}, zo = ({
|
|
@@ -4976,7 +4980,7 @@ const pe = (e, t, i) => {
|
|
|
4976
4980
|
j.warn(Eo, `unable to detect item id from cfi ${l}`);
|
|
4977
4981
|
return;
|
|
4978
4982
|
}
|
|
4979
|
-
const S = h ? s.getNavigationFromNode(p, h, m) : new
|
|
4983
|
+
const S = h ? s.getNavigationFromNode(p, h, m) : new R({ x: 0, y: 0 }), f = i.getSpinePositionFromSpineItemPosition({
|
|
4980
4984
|
spineItemPosition: S,
|
|
4981
4985
|
spineItem: p
|
|
4982
4986
|
});
|
|
@@ -5379,7 +5383,7 @@ class Go extends Y {
|
|
|
5379
5383
|
}),
|
|
5380
5384
|
V()
|
|
5381
5385
|
), this.layout$ = this.layoutProcess$.pipe(
|
|
5382
|
-
|
|
5386
|
+
A((a) => a.type === "end"),
|
|
5383
5387
|
b((a) => a.data),
|
|
5384
5388
|
V()
|
|
5385
5389
|
);
|
|
@@ -5399,19 +5403,19 @@ class Go extends Y {
|
|
|
5399
5403
|
}
|
|
5400
5404
|
class Jo extends ht {
|
|
5401
5405
|
onUnload() {
|
|
5402
|
-
return
|
|
5406
|
+
return Q;
|
|
5403
5407
|
}
|
|
5404
5408
|
onCreateDocument() {
|
|
5405
5409
|
return w(document.createElement("div"));
|
|
5406
5410
|
}
|
|
5407
5411
|
onLoadDocument() {
|
|
5408
|
-
return
|
|
5412
|
+
return Q;
|
|
5409
5413
|
}
|
|
5410
5414
|
onLayout() {
|
|
5411
5415
|
return w(void 0);
|
|
5412
5416
|
}
|
|
5413
5417
|
onRenderHeadless() {
|
|
5414
|
-
return
|
|
5418
|
+
return Q;
|
|
5415
5419
|
}
|
|
5416
5420
|
getDocumentFrame() {
|
|
5417
5421
|
}
|
|
@@ -5660,7 +5664,7 @@ class es extends Y {
|
|
|
5660
5664
|
// queue layout until previous layout is done
|
|
5661
5665
|
Vt(
|
|
5662
5666
|
() => s.pipe(
|
|
5663
|
-
|
|
5667
|
+
A((r) => !r),
|
|
5664
5668
|
H()
|
|
5665
5669
|
)
|
|
5666
5670
|
),
|
|
@@ -5987,7 +5991,7 @@ const ss = ({
|
|
|
5987
5991
|
}) => {
|
|
5988
5992
|
const r = (p, h) => {
|
|
5989
5993
|
const { left: m, top: S } = o.getSpineItemSpineLayoutInfo(h);
|
|
5990
|
-
return new
|
|
5994
|
+
return new R({
|
|
5991
5995
|
/**
|
|
5992
5996
|
* when using spread the item could be on the right and therefore will be negative
|
|
5993
5997
|
* @example
|
|
@@ -5999,7 +6003,7 @@ const ss = ({
|
|
|
5999
6003
|
y: Math.max(p.y - S, 0)
|
|
6000
6004
|
});
|
|
6001
6005
|
}, a = (p) => Dt({
|
|
6002
|
-
spineItemPosition: new
|
|
6006
|
+
spineItemPosition: new R({ x: 0, y: 0 }),
|
|
6003
6007
|
itemLayout: o.getSpineItemSpineLayoutInfo(p)
|
|
6004
6008
|
}), c = (p) => e.items.find((h) => h.renderer.getDocumentFrame() === p), u = (p, h, m) => {
|
|
6005
6009
|
if (typeof m == "number") {
|
|
@@ -6027,7 +6031,7 @@ const ss = ({
|
|
|
6027
6031
|
const dt = i.getSpineItemPositionFromPageIndex({
|
|
6028
6032
|
pageIndex: B,
|
|
6029
6033
|
spineItem: m
|
|
6030
|
-
}),
|
|
6034
|
+
}), K = Dt({
|
|
6031
6035
|
spineItemPosition: dt,
|
|
6032
6036
|
itemLayout: o.getSpineItemSpineLayoutInfo(m)
|
|
6033
6037
|
});
|
|
@@ -6036,21 +6040,21 @@ const ss = ({
|
|
|
6036
6040
|
absolutePosition: {
|
|
6037
6041
|
width: t.getPageSize().width,
|
|
6038
6042
|
height: t.getPageSize().height,
|
|
6039
|
-
left:
|
|
6040
|
-
top:
|
|
6041
|
-
bottom:
|
|
6042
|
-
right:
|
|
6043
|
+
left: K.x,
|
|
6044
|
+
top: K.y,
|
|
6045
|
+
bottom: K.y + t.getPageSize().height,
|
|
6046
|
+
right: K.x + t.getPageSize().width
|
|
6043
6047
|
}
|
|
6044
6048
|
};
|
|
6045
6049
|
}).reduce(
|
|
6046
6050
|
(O, { absolutePosition: B, index: dt }) => {
|
|
6047
|
-
const
|
|
6051
|
+
const K = f ? y.absoluteViewport : y.relativeViewport, _e = He(
|
|
6048
6052
|
p,
|
|
6049
6053
|
y.absoluteViewport,
|
|
6050
|
-
|
|
6054
|
+
K
|
|
6051
6055
|
), Xe = yt.from(
|
|
6052
6056
|
_e,
|
|
6053
|
-
|
|
6057
|
+
K
|
|
6054
6058
|
), { visible: qe } = Ee({
|
|
6055
6059
|
viewportPosition: Xe,
|
|
6056
6060
|
restrictToScreen: S,
|
|
@@ -6114,7 +6118,7 @@ const ss = ({
|
|
|
6114
6118
|
spineItemLocator: i,
|
|
6115
6119
|
getSafeSpineItemPositionFromUnsafeSpineItemPosition: (p, h) => {
|
|
6116
6120
|
const { height: m, width: S } = o.getSpineItemSpineLayoutInfo(h);
|
|
6117
|
-
return new
|
|
6121
|
+
return new R({
|
|
6118
6122
|
x: Math.min(Math.max(0, p.x), S),
|
|
6119
6123
|
y: Math.min(Math.max(0, p.y), m)
|
|
6120
6124
|
});
|
|
@@ -6439,12 +6443,24 @@ const hs = (e) => {
|
|
|
6439
6443
|
)
|
|
6440
6444
|
);
|
|
6441
6445
|
export {
|
|
6446
|
+
go as Context,
|
|
6447
|
+
Oo as ControlledNavigationController,
|
|
6442
6448
|
Y as DestroyableClass,
|
|
6443
6449
|
ht as DocumentRenderer,
|
|
6444
6450
|
po as HookManager,
|
|
6451
|
+
Fo as InternalNavigator,
|
|
6452
|
+
ke as Locker,
|
|
6445
6453
|
qt as ResourceHandler,
|
|
6454
|
+
Do as ScrollNavigationController,
|
|
6446
6455
|
Yo as SettingsManager,
|
|
6456
|
+
gs as Spine,
|
|
6457
|
+
Ae as SpineElementLayout,
|
|
6447
6458
|
Ue as SpineItem,
|
|
6459
|
+
dn as SpineItemPageSpineLayout,
|
|
6460
|
+
kt as SpineItemSpineLayout,
|
|
6461
|
+
ls as SpineItemsManager,
|
|
6462
|
+
M as SpinePosition,
|
|
6463
|
+
Yt as UnsafeSpinePosition,
|
|
6448
6464
|
vs as createReader,
|
|
6449
6465
|
ie as deferIdle,
|
|
6450
6466
|
Di as deferNextResult,
|
|
@@ -6455,6 +6471,7 @@ export {
|
|
|
6455
6471
|
Pe as isHtmlElement,
|
|
6456
6472
|
Mi as isHtmlTagElement,
|
|
6457
6473
|
Ts as isShallowEqual,
|
|
6474
|
+
hn as layoutEnhancer,
|
|
6458
6475
|
$e as mapKeysTo,
|
|
6459
6476
|
Is as observeIntersection,
|
|
6460
6477
|
ne as observeMutation,
|