@react-pdf-kit/viewer 2.9.1 → 2.9.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.
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "../RPPages-cyO0Tn21.js";
2
+ import { t as e } from "../RPPages-BZwgKgfJ.js";
3
3
  export { e as RPPages };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../CanvasLayer-CJqCJ30J.js";
1
+ import { t as e } from "../../CanvasLayer-C3gb8EXu.js";
2
2
  export { e as CanvasLayer };
@@ -4,91 +4,83 @@ import { usePagesRotateContext as n } from "../../contexts/PagesRotateContext.js
4
4
  import { useLayerContext as r } from "../../contexts/LayerContext.js";
5
5
  import { useLoaderContext as i } from "../../contexts/LoaderContext.js";
6
6
  import { withRef as a } from "../../utils/withRef.js";
7
- import { n as o, t as s } from "../../CanvasLayer-CJqCJ30J.js";
7
+ import { n as o, t as s } from "../../CanvasLayer-C3gb8EXu.js";
8
8
  import { t as c } from "../../TextLayer-Bp1CDIIa.js";
9
9
  import { t as l } from "../../AnnotationLayer-oDu2B4X1.js";
10
10
  import { t as u } from "../../TextHighlightLayer-3vIZbRyL.js";
11
11
  import { CustomElement as d } from "./CustomElement.js";
12
- import { useCallback as f, useEffect as p, useImperativeHandle as m, useMemo as h, useRef as g, useState as _ } from "react";
13
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ import { useCallback as f, useImperativeHandle as p, useMemo as m, useRef as h, useState as g } from "react";
13
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
14
14
  //#region lib/components/page/RPPage.tsx
15
- var b = a((a, b) => {
16
- let { pageNumber: x, style: S, ...C } = a, { pages: w } = e(), { pageRotate: T } = n(), { textLayer: E } = r(), { currentZoom: D, targetZoom: O } = t(), { LoaderImageComponent: k } = i(), A = g(w.get(x)), [j, M] = _(!1), N = g(null), [P, F] = _({
15
+ var y = a((a, y) => {
16
+ let { pageNumber: b, style: x, ...S } = a, { pages: C } = e(), { pageRotate: w } = n(), { textLayer: T } = r(), { currentZoom: E, targetZoom: D } = t(), { LoaderImageComponent: O } = i(), k = C.get(b), [A, j] = g(!1), M = h(null);
17
+ p(y, () => M.current);
18
+ let N = k ? w[b] ?? k.defaultRotation ?? 0 : 0, P = m(() => k ? k.page.getViewport({
19
+ scale: 1,
20
+ rotation: N
21
+ }) : {
17
22
  width: 0,
18
23
  height: 0
19
- });
20
- m(b, () => N.current);
21
- let I = h(() => A.current ? T[x] ?? A.current.defaultRotation ?? 0 : 0, [x, T]);
22
- p(() => {
23
- w && (A.current = w.get(x), A.current && F(A.current.page.getViewport({
24
- scale: 1,
25
- rotation: I
26
- })));
27
- }, [
28
- w,
29
- x,
30
- I
31
- ]);
32
- let L = h(() => ({
33
- width: P.width * (O || D || 1),
34
- height: P.height * (O || D || 1)
24
+ }, [k, N]), F = m(() => ({
25
+ width: P.width * (D || E || 1),
26
+ height: P.height * (D || E || 1)
35
27
  }), [
36
28
  P,
37
- O,
38
- D
39
- ]), R = h(() => {
40
- switch (I) {
41
- case 90: return `${L.width / 2}px ${L.width / 2}px`;
29
+ D,
30
+ E
31
+ ]), I = m(() => {
32
+ switch (N) {
33
+ case 90: return `${F.width / 2}px ${F.width / 2}px`;
42
34
  case -90:
43
- case 270: return `${L.height / 2}px ${L.height / 2}px`;
35
+ case 270: return `${F.height / 2}px ${F.height / 2}px`;
44
36
  default: return "center";
45
37
  }
46
- }, [I, L]), z = h(() => !D || !O ? 1 : O / D, [D, O]), B = f((e) => {
47
- M(!e.hasRenderedBefore);
48
- }, []), V = f(() => {
49
- M(!1);
38
+ }, [N, F]), L = m(() => !E || !D ? 1 : D / E, [E, D]), R = f((e) => {
39
+ j(!e.hasRenderedBefore);
40
+ }, []), z = f(() => {
41
+ j(!1);
50
42
  }, []);
51
- return /* @__PURE__ */ v("div", {
52
- ref: N,
53
- id: `page-${x}`,
54
- "data-rp": `page-${x}`,
55
- ...C,
43
+ return /* @__PURE__ */ _("div", {
44
+ ref: M,
45
+ id: `page-${b}`,
46
+ "data-rp": `page-${b}`,
47
+ ...S,
56
48
  style: {
57
- ...S,
58
- "--rp-rotate": `${I}deg`,
59
- "--rp-page-rotate-translate": `${R}`,
49
+ ...x,
50
+ "--rp-rotate": `${N}deg`,
51
+ "--rp-page-rotate-translate": `${I}`,
60
52
  "--user-unit": P.userUnit || 1,
61
- "--scale-factor": O || D,
62
- "--rp-canvas-scale-ratio": z,
53
+ "--scale-factor": D || E,
54
+ "--rp-canvas-scale-ratio": L,
63
55
  "--total-scale-factor": "calc(var(--scale-factor) * var(--user-unit))"
64
56
  },
65
57
  className: o["rp-page-wrapper"],
66
- children: /* @__PURE__ */ y("div", {
58
+ children: /* @__PURE__ */ v("div", {
67
59
  style: {
68
- width: `${L.width}px`,
69
- height: `${L.height}px`
60
+ width: `${F.width}px`,
61
+ height: `${F.height}px`
70
62
  },
71
63
  className: o["rp-page"],
72
64
  children: [
73
- /* @__PURE__ */ v(s, {
74
- onLoading: B,
75
- onLoaded: V,
76
- pageNumber: x
65
+ /* @__PURE__ */ _(s, {
66
+ onLoading: R,
67
+ onLoaded: z,
68
+ pageNumber: b
77
69
  }),
78
- j && k && /* @__PURE__ */ v("div", {
70
+ A && O && /* @__PURE__ */ _("div", {
79
71
  className: o["rp-loader-wrapper"],
80
- children: /* @__PURE__ */ v(k, {})
72
+ children: /* @__PURE__ */ _(O, {})
81
73
  }),
82
- /* @__PURE__ */ v(d, { pageNumber: x }),
83
- E && /* @__PURE__ */ v(c, { pageNumber: x }),
84
- /* @__PURE__ */ v(u, {
85
- pageNumber: x,
74
+ /* @__PURE__ */ _(d, { pageNumber: b }),
75
+ T && /* @__PURE__ */ _(c, { pageNumber: b }),
76
+ /* @__PURE__ */ _(u, {
77
+ pageNumber: b,
86
78
  viewport: P
87
79
  }),
88
- /* @__PURE__ */ v(l, { pageNumber: x })
80
+ /* @__PURE__ */ _(l, { pageNumber: b })
89
81
  ]
90
82
  })
91
83
  });
92
84
  });
93
85
  //#endregion
94
- export { b as RPPage };
86
+ export { y as RPPage };
@@ -6,60 +6,60 @@ import { renderPage as i } from "../utils/renderPage.js";
6
6
  import { createContext as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
7
7
  import { jsx as f } from "react/jsx-runtime";
8
8
  //#region lib/contexts/RenderQueueProvider.tsx
9
- var p = a(null), m = ({ children: a }) => {
10
- let s = u(!1), m = u(/* @__PURE__ */ new Map()), [h, g] = d([]), _ = o((e) => {
11
- g((t) => [...t, {
9
+ var p = a(null), m = (e, t) => t.destroyed ? !0 : e instanceof Error ? e.message === "Worker was destroyed" || e.message === "Worker was destroyed." || e.message === "Transport destroyed" : !1, h = ({ children: a }) => {
10
+ let s = u(!1), h = u(/* @__PURE__ */ new Map()), [g, _] = d([]), v = o((e) => {
11
+ _((t) => [...t, {
12
12
  id: e.page.pageNumber.toString(),
13
13
  data: e,
14
14
  priority: 0
15
15
  }]);
16
- }, []), v = l(() => new r(_), [_]), { focusedPage: y } = n(), { pdf: b } = t(), x = u(b);
16
+ }, []), y = l(() => new r(v), [v]), { focusedPage: b } = n(), { pdf: x } = t(), S = u(x);
17
17
  c(() => {
18
- x.current = b;
19
- }, [b]);
20
- let S = o((t) => {
18
+ S.current = x;
19
+ }, [x]);
20
+ let C = o((t) => {
21
21
  s.current = !0;
22
- let n = m.current.get(t.id);
23
- n && (n.cancel(), m.current.delete(t.id));
22
+ let n = h.current.get(t.id);
23
+ n && (n.cancel(), h.current.delete(t.id));
24
24
  let r;
25
25
  try {
26
26
  r = i(t.data.page, t.data.canvasElem, t.data.options);
27
- } catch {
28
- return t.data.onRenderTask?.(null), Promise.resolve();
27
+ } catch (e) {
28
+ return m(e, t.data.page) || console.error(`Error rendering page ${t.data.page.pageNumber}:`, e), t.data.onRenderTask?.(null), Promise.resolve();
29
29
  }
30
- return m.current.set(t.id, r), t.data.onRenderTask?.(r), e(x.current, r.promise).then(() => {
30
+ return h.current.set(t.id, r), t.data.onRenderTask?.(r), e(S.current, r.promise).then(() => {
31
31
  t.data.canvasElem.hidden = !1, t.data.onLoaded && t.data.onLoaded();
32
32
  }).catch((e) => {
33
33
  e.name !== "RenderingCancelledException" && console.error(`Error rendering page ${t.data.page.pageNumber}:`, e);
34
34
  }).finally(() => {
35
- m.current.delete(t.id), t.data.onRenderTask?.(null);
35
+ h.current.delete(t.id), t.data.onRenderTask?.(null);
36
36
  });
37
37
  }, []);
38
38
  return c(() => {
39
- m.current.forEach((e) => e.cancel()), m.current.clear(), v.clear(), g(v.peekAll());
40
- }, [b, v]), c(() => {
41
- y && (v.changePagePriority(`^page-${y}`, 0), v.changePagePriority(`^thumbnail-${y}`, 1));
42
- }, [y]), c(() => {
43
- if (v.isEmpty() || s.current) return;
39
+ h.current.forEach((e) => e.cancel()), h.current.clear(), y.clear(), _(y.peekAll());
40
+ }, [x, y]), c(() => {
41
+ b && (y.changePagePriority(`^page-${b}`, 0), y.changePagePriority(`^thumbnail-${b}`, 1));
42
+ }, [b]), c(() => {
43
+ if (y.isEmpty() || s.current) return;
44
44
  let e = () => {
45
- let t = v.dequeue();
46
- t ? S(t).catch(() => {}).finally(() => {
45
+ let t = y.dequeue();
46
+ t ? C(t).catch(() => {}).finally(() => {
47
47
  e();
48
- }) : (s.current = !1, g(v.peekAll()));
48
+ }) : (s.current = !1, _(y.peekAll()));
49
49
  };
50
50
  e();
51
51
  }, [
52
- v,
53
- S,
54
- h
52
+ y,
53
+ C,
54
+ g
55
55
  ]), /* @__PURE__ */ f(p.Provider, {
56
- value: v,
56
+ value: y,
57
57
  children: a
58
58
  });
59
- }, h = () => {
59
+ }, g = () => {
60
60
  let e = s(p);
61
61
  if (!e) throw Error("RenderQueue not found");
62
62
  return e;
63
63
  };
64
64
  //#endregion
65
- export { p as RenderQueueContext, m as RenderQueueProvider, h as useRenderQueue };
65
+ export { p as RenderQueueContext, h as RenderQueueProvider, g as useRenderQueue };
@@ -8,11 +8,11 @@ import { getZoomLevel as s } from "../utils/getZoomLevel.js";
8
8
  import { useLayoutContainer as c } from "./LayoutContainerContext.js";
9
9
  import { useRotationContext as ee } from "./RotationContext.js";
10
10
  import { useGlobalCurrentPage as te } from "./GlobalCurrentPage.js";
11
- import { useDebounce as ne } from "../utils/hooks/useDebounce.js";
12
- import { createContext as l, useCallback as u, useContext as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
13
- import { jsx as re } from "react/jsx-runtime";
11
+ import { useDebounce as l } from "../utils/hooks/useDebounce.js";
12
+ import { createContext as u, useCallback as d, useContext as f, useEffect as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
13
+ import { jsx as ne } from "react/jsx-runtime";
14
14
  //#region lib/contexts/ZoomContext.tsx
15
- var g = l({
15
+ var v = u({
16
16
  zoomLevel: 100,
17
17
  currentZoom: 1,
18
18
  targetZoom: 1,
@@ -22,133 +22,139 @@ var g = l({
22
22
  previousTargetZoom: null,
23
23
  zoomTo: () => {},
24
24
  setZoomLevel: () => {}
25
- }), _ = () => {
26
- let e = d(g);
25
+ }), y = () => {
26
+ let e = f(v);
27
27
  return typeof e.currentZoom != "number" && t.warn("Please use this hooks inside children component of RPProvider"), e;
28
- }, v = ({ children: t }) => {
29
- let { initialScale: l = e.PAGE_FIT } = r(), [d, _] = h(l), [v, ie] = h(0), [y, b] = h(0), [x, S] = h(!1), [C, w] = h(null), [T, E] = h(null), [D, O] = h(null), k = m(0), A = m(0), { pages: j } = n(), { pagesRef: M } = c(), { viewMode: N } = i(), [ae, P] = h({
30
- width: M?.clientWidth || 0,
31
- height: M?.clientHeight || 0
32
- }), F = ne(ae, 100), { rotate: I } = ee(), [L, R] = h(null), z = m(null), { currentPage: B } = te(), [V, oe] = h(B), H = m(), U = m(), W = m(), G = m({});
33
- f(() => {
34
- let e = j.get(V);
35
- e ||= j.get(1);
36
- let t = e?.page.getViewport({
28
+ }, b = ({ children: t }) => {
29
+ let { initialScale: u = e.PAGE_FIT } = r(), [f, y] = _(u), [b, x] = _(0), [S, re] = _(0), [C, w] = _(!1), [T, E] = _(null), [D, O] = _(null), [k, A] = _(null), j = g(0), M = g(0), { pages: N } = n(), { pagesRef: P } = c(), { viewMode: F } = i(), [ie, ae] = _({
30
+ width: P?.clientWidth || 0,
31
+ height: P?.clientHeight || 0
32
+ }), I = l(ie, 100), { rotate: L } = ee(), { currentPage: R } = te(), [z, oe] = _(R), B = g(), V = g(), H = g(), U = g({}), W = g(L), G = h(() => {
33
+ let e = N.get(z);
34
+ return e ||= N.get(1), e?.page.getViewport({
37
35
  scale: 1,
38
- rotation: e.defaultRotation + I
39
- });
40
- t && JSON.stringify(t) !== JSON.stringify(z.current) && (z.current = t, R(t));
36
+ rotation: e.defaultRotation + L
37
+ }) ?? null;
41
38
  }, [
42
- j,
43
- I,
44
- V
45
- ]);
46
- let K = u(() => L ? {
47
- pageWidth: (L?.width || 0) + 8,
48
- pageHeight: L?.height || 0,
49
- clientWidth: M?.clientWidth || 0,
50
- clientHeight: M?.clientHeight || 0
51
- } : null, [L, M]), q = p(() => {
39
+ N,
40
+ L,
41
+ z
42
+ ]), K = d(() => G ? {
43
+ pageWidth: (G?.width || 0) + 8,
44
+ pageHeight: G?.height || 0,
45
+ clientWidth: P?.clientWidth || 0,
46
+ clientHeight: P?.clientHeight || 0
47
+ } : null, [G, P]), q = h(() => {
52
48
  let e = K();
53
- if (!F.width || !F.height || !e) return 0;
54
- if (typeof d == "number") return Math.max(25, Math.min(d, a)) / 100;
55
- let { clientWidth: t, clientHeight: n, pageWidth: r, pageHeight: i } = e, o = s(d, t, n, r, i, N) / 100;
49
+ if (!I.width || !I.height || !e) return 0;
50
+ if (typeof f == "number") return Math.max(25, Math.min(f, a)) / 100;
51
+ let { clientWidth: t, clientHeight: n, pageWidth: r, pageHeight: i } = e, o = s(f, t, n, r, i, F) / 100;
56
52
  return Math.max(25 / 100, Math.min(o, a / 100));
57
53
  }, [
58
- d,
59
- F,
54
+ f,
55
+ I,
60
56
  K,
61
- N
62
- ]), J = u(() => {
63
- H.current &&= (clearTimeout(H.current), void 0), U.current &&= (clearTimeout(U.current), void 0), W.current &&= (cancelAnimationFrame(W.current), void 0);
64
- }, []), Y = u((e) => {
65
- ie(e), S(!1), w(null), E(null), O(null);
66
- }, []), X = u((e, t = {}) => {
57
+ F
58
+ ]), J = d(() => {
59
+ B.current &&= (clearTimeout(B.current), void 0), V.current &&= (clearTimeout(V.current), void 0), H.current &&= (cancelAnimationFrame(H.current), void 0);
60
+ }, []), Y = d((e) => {
61
+ x(e), w(!1), E(null), O(null), A(null);
62
+ }, []), X = d((e, t = {}) => {
67
63
  if (!e) return;
68
- let n = k.current === 0;
69
- if (!(!(Math.abs(e - A.current) > 1e-10) && !n)) {
70
- if (J(), w(t.origin ?? null), E(t.gesture ?? null), O(t.previousTargetZoom ?? A.current ?? k.current ?? null), A.current = e, b(e), n || t.immediate) {
64
+ let n = j.current === 0;
65
+ if (!(!(Math.abs(e - M.current) > 1e-10) && !n)) {
66
+ if (J(), E(t.origin ?? null), O(t.gesture ?? null), A(t.previousTargetZoom ?? M.current ?? j.current ?? null), M.current = e, re(e), n || t.immediate) {
71
67
  Y(e);
72
68
  return;
73
69
  }
74
- S(!0), U.current = setTimeout(() => {
75
- H.current &&= (clearTimeout(H.current), void 0), W.current &&= (cancelAnimationFrame(W.current), void 0), U.current = void 0, Y(e);
76
- }, o), W.current = requestAnimationFrame(() => {
77
- W.current = void 0, H.current = setTimeout(() => {
78
- H.current = void 0, U.current &&= (clearTimeout(U.current), void 0), Y(e);
70
+ w(!0), V.current = setTimeout(() => {
71
+ B.current &&= (clearTimeout(B.current), void 0), H.current &&= (cancelAnimationFrame(H.current), void 0), V.current = void 0, Y(e);
72
+ }, o), H.current = requestAnimationFrame(() => {
73
+ H.current = void 0, B.current = setTimeout(() => {
74
+ B.current = void 0, V.current &&= (clearTimeout(V.current), void 0), Y(e);
79
75
  }, 400);
80
76
  });
81
77
  }
82
78
  }, [J, Y]);
83
- f(() => {
79
+ m(() => {
84
80
  if (!q) return;
85
- let e = G.current;
86
- G.current = {}, X(q, e);
87
- }, [q, X]);
88
- let Z = u((e) => {
81
+ let e = U.current;
82
+ U.current = {};
83
+ let t = W.current !== L && typeof f != "number";
84
+ W.current = L, X(q, t ? {
85
+ ...e,
86
+ immediate: !0
87
+ } : e);
88
+ }, [
89
+ q,
90
+ L,
91
+ X,
92
+ f
93
+ ]);
94
+ let Z = d((e) => {
89
95
  if (typeof e == "number") return Math.max(25, Math.min(e, a)) / 100;
90
96
  let t = K();
91
97
  if (!t) return 0;
92
- let { clientWidth: n, clientHeight: r, pageWidth: i, pageHeight: o } = t, c = s(e, n, r, i, o, N);
98
+ let { clientWidth: n, clientHeight: r, pageWidth: i, pageHeight: o } = t, c = s(e, n, r, i, o, F);
93
99
  return Math.max(25, Math.min(c, a)) / 100;
94
- }, [K, N]), Q = u((e, t = {}) => {
95
- G.current = t, _(e), X(Z(e), t);
100
+ }, [K, F]), Q = d((e, t = {}) => {
101
+ U.current = t, y(e), X(Z(e), t);
96
102
  }, [Z, X]);
97
- f(() => {
98
- y && (A.current = y);
99
- }, [y]), f(() => {
100
- v && (k.current = v);
101
- }, [v]), f(() => () => {
103
+ p(() => {
104
+ S && (M.current = S);
105
+ }, [S]), p(() => {
106
+ b && (j.current = b);
107
+ }, [b]), p(() => () => {
102
108
  J();
103
- }, [J]), f(() => {
104
- oe(B);
105
- }, [d]), f(() => {
109
+ }, [J]), p(() => {
110
+ oe(R);
111
+ }, [f]), p(() => {
106
112
  let e = new ResizeObserver((e) => {
107
113
  e.forEach((e) => {
108
- P({
114
+ ae({
109
115
  width: e.contentRect.width,
110
116
  height: e.contentRect.height
111
117
  });
112
118
  });
113
119
  });
114
- return M && e.observe(M), () => {
120
+ return P && e.observe(P), () => {
115
121
  e.disconnect();
116
122
  };
117
- }, [M]);
118
- let $ = u((e) => {
123
+ }, [P]);
124
+ let $ = d((e) => {
119
125
  let t = 0;
120
126
  if (typeof e == "function") {
121
127
  let n = K();
122
128
  if (!n) return;
123
129
  let { clientWidth: r, clientHeight: i, pageWidth: a, pageHeight: o } = n;
124
- t = (t) => e(s(t, r, i, a, o, N));
130
+ t = (t) => e(s(t, r, i, a, o, F));
125
131
  } else t = e;
126
- t && (G.current = {}, _(typeof t == "number" ? Math.max(25, Math.min(t, a)) : t));
127
- }, [K, N]), se = p(() => ({
128
- zoomLevel: d,
129
- currentZoom: v,
130
- targetZoom: y || v,
131
- isZooming: x,
132
- zoomOrigin: C,
133
- zoomGesture: T,
134
- previousTargetZoom: D,
132
+ t && (U.current = {}, y(typeof t == "number" ? Math.max(25, Math.min(t, a)) : t));
133
+ }, [K, F]), se = h(() => ({
134
+ zoomLevel: f,
135
+ currentZoom: b,
136
+ targetZoom: S || b,
137
+ isZooming: C,
138
+ zoomOrigin: T,
139
+ zoomGesture: D,
140
+ previousTargetZoom: k,
135
141
  zoomTo: Q,
136
142
  setZoomLevel: $
137
143
  }), [
138
- v,
139
- y,
140
- x,
141
- d,
144
+ b,
145
+ S,
142
146
  C,
147
+ f,
143
148
  T,
144
149
  D,
150
+ k,
145
151
  Q,
146
152
  $
147
153
  ]);
148
- return /* @__PURE__ */ re(g.Provider, {
154
+ return /* @__PURE__ */ ne(v.Provider, {
149
155
  value: se,
150
156
  children: t
151
157
  });
152
158
  };
153
159
  //#endregion
154
- export { g as ZoomContext, v as ZoomProvider, _ as useZoomContext };
160
+ export { v as ZoomContext, b as ZoomProvider, y as useZoomContext };
package/dist/main.js CHANGED
@@ -16,7 +16,7 @@ import { useHighlightContext as y } from "./contexts/HighlightContext.js";
16
16
  import { useElementPageContext as b } from "./contexts/ElementPageContext.js";
17
17
  import { useElementThumbnailContext as x } from "./contexts/ElementThumbnailContext.js";
18
18
  import { RPProvider as S } from "./components/RPProvider.js";
19
- import { t as C } from "./RPPages-cyO0Tn21.js";
19
+ import { t as C } from "./RPPages-BZwgKgfJ.js";
20
20
  import { useFileDownload as w } from "./utils/hooks/useFileDownload.js";
21
21
  import { RPTheme as T } from "./components/RPTheme.js";
22
22
  import { RPConfig as E } from "./components/RPConfig.js";
@@ -46,7 +46,7 @@ type BuildDocumentLayoutOptions = {
46
46
  export declare const getPageGroupForPage: (pageNumber: number, viewMode: ViewMode, totalPages: number) => number[];
47
47
  export declare const buildDocumentLayout: (options: BuildDocumentLayoutOptions) => DocumentLayout;
48
48
  export declare const getPagePlacement: (layout: DocumentLayout, pageNumber: number) => DocumentPagePlacement | null;
49
- export declare const getPageContentOffset: (pageBoxWidth: number, pageBoxHeight: number, pageWidth: number, pageHeight: number) => {
49
+ export declare const getPageContentOffset: (pageBoxWidth: number, _pageBoxHeight: number, pageWidth: number, _pageHeight: number) => {
50
50
  x: number;
51
51
  y: number;
52
52
  };