@pdf-viewer/react 1.9.0-beta.3 → 1.9.0-beta.5

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.
Files changed (129) hide show
  1. package/dist/Checkbox.module-3edaacbb.js +7 -0
  2. package/dist/Combination-da8647d4.js +693 -0
  3. package/dist/Container.module-f8b5c306.js +6 -0
  4. package/dist/DropDown.module-a78567cb.js +11 -0
  5. package/dist/MenuItem.module-bc11d0d3.js +6 -0
  6. package/dist/MenuSeparator.module-89b2ff7f.js +6 -0
  7. package/dist/PropertyItem.module-db0150cc.js +8 -0
  8. package/dist/RPSplitter.module-13d612c4.js +7 -0
  9. package/dist/RPTheme.module-bd9038da.js +8 -0
  10. package/dist/RotateTool.module-03987eba.js +6 -0
  11. package/dist/SearchTool.module-016f3a8d.js +16 -0
  12. package/dist/ToolbarLayout.module-60c3d6e8.js +2434 -0
  13. package/dist/WrapperLayout.module-147bc943.js +6 -0
  14. package/dist/assets/Checkbox.css +1 -1
  15. package/dist/assets/ToolbarLayout.css +1 -0
  16. package/dist/components/RPController.js +9 -9
  17. package/dist/components/RPDropFileZone.js +21 -23
  18. package/dist/components/RPPages.js +21 -19
  19. package/dist/components/RPProvider.js +19 -15
  20. package/dist/components/layout/Container.js +10 -11
  21. package/dist/components/layout/LayoutContainer.js +21 -18
  22. package/dist/components/layout/RPDefaultLayout.js +76 -14
  23. package/dist/components/layout/RPLayout.js +74 -25
  24. package/dist/components/layout/WrapperLayout.js +7 -8
  25. package/dist/components/layout/sidebar/RPSidebar.js +51 -12
  26. package/dist/components/layout/sidebar/RPSplitter.js +7 -9
  27. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  28. package/dist/components/layout/sidebar/Thumbnails.js +3 -2
  29. package/dist/components/layout/toolbar/DocumentDialog.js +307 -25
  30. package/dist/components/layout/toolbar/DocumentProperties.js +23 -19
  31. package/dist/components/layout/toolbar/FileDownloadTool.js +23 -13
  32. package/dist/components/layout/toolbar/MenuItem.js +6 -7
  33. package/dist/components/layout/toolbar/MenuSeparator.js +4 -5
  34. package/dist/components/layout/toolbar/MostPageTool.js +50 -24
  35. package/dist/components/layout/toolbar/OtherTool.js +115 -22
  36. package/dist/components/layout/toolbar/Paginate.js +99 -17
  37. package/dist/components/layout/toolbar/PrintTool.js +43 -13
  38. package/dist/components/layout/toolbar/PropertyItem.js +5 -8
  39. package/dist/components/layout/toolbar/RPToolbar.js +28 -7
  40. package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -7
  41. package/dist/components/layout/toolbar/RotateTool.js +20 -21
  42. package/dist/components/layout/toolbar/ScrollModeTool.js +35 -37
  43. package/dist/components/layout/toolbar/SearchCloseButton.js +19 -7
  44. package/dist/components/layout/toolbar/SearchResultNavigator.js +42 -8
  45. package/dist/components/layout/toolbar/SearchTool.js +198 -30
  46. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  47. package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
  48. package/dist/components/layout/toolbar/ToolbarCustom.js +48 -21
  49. package/dist/components/layout/toolbar/ToolbarDefault.js +82 -0
  50. package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
  51. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  52. package/dist/components/layout/toolbar/ZoomTool.js +140 -27
  53. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
  54. package/dist/components/layout/toolbar/tools/InputPageTool.js +7 -7
  55. package/dist/components/layout/toolbar/tools/NextPageTool.js +21 -19
  56. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  57. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
  58. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  59. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +14 -14
  60. package/dist/components/layout/toolbar/tools/defaults/{TopbarDefaultTools.js → RPHorizontalBar.js} +29 -20
  61. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
  62. package/dist/components/page/AnnotationLayer.js +20 -18
  63. package/dist/components/page/CanvasLayer.js +20 -18
  64. package/dist/components/page/DualPage.js +1 -1
  65. package/dist/components/page/RPPage.js +21 -18
  66. package/dist/components/page/SinglePage.js +1 -1
  67. package/dist/components/page/TextHighlightLayer.js +20 -18
  68. package/dist/components/page/TextLayer.js +20 -18
  69. package/dist/components/ui/Button.js +8 -8
  70. package/dist/components/ui/Checkbox.js +70 -61
  71. package/dist/components/ui/DropDown.js +14 -20
  72. package/dist/components/ui/Input.js +11 -11
  73. package/dist/components/ui/LoadingIndicator.js +22 -5
  74. package/dist/components/ui/RPTooltip.js +62 -64
  75. package/dist/contexts/PaginationContext.js +4 -4
  76. package/dist/contexts/PrintContext.js +2 -2
  77. package/dist/contexts/SearchContext.js +3 -3
  78. package/dist/contexts/ThumbnailsContext.js +1 -1
  79. package/dist/contexts/ViewportContext.js +42 -35
  80. package/dist/floating-ui.react-dom-f3f380e0.js +1447 -0
  81. package/dist/index-473557b1.js +1191 -0
  82. package/dist/{index-1cb41342.js → index-8547fbc6.js} +12 -12
  83. package/dist/main.js +76 -73
  84. package/dist/types/components/layout/LayoutContainer.d.ts +5 -1
  85. package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -1
  86. package/dist/types/components/layout/RPLayout.d.ts +2 -1
  87. package/dist/types/components/layout/sidebar/Thumbnails.d.ts +3 -1
  88. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +2 -1
  89. package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +2 -2
  90. package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
  91. package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
  92. package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
  93. package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
  94. package/dist/types/components/page/RPPage.d.ts +3 -1
  95. package/dist/types/components/ui/Button.d.ts +3 -1
  96. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  97. package/dist/types/components/ui/DropDown.d.ts +2 -1
  98. package/dist/types/components/ui/Input.d.ts +3 -1
  99. package/dist/types/components/ui/RPTooltip.d.ts +3 -1
  100. package/dist/types/main.d.ts +3 -3
  101. package/dist/types/utils/types.d.ts +17 -17
  102. package/dist/types/utils/withRef.d.ts +4 -0
  103. package/dist/utils/hooks/useFileDownload.js +20 -18
  104. package/dist/utils/hooks/useLicense.js +1 -1
  105. package/dist/utils/hooks/usePaginate.js +20 -18
  106. package/dist/utils/hooks/usePresentPage.js +20 -18
  107. package/dist/utils/hooks/usePrint.js +20 -18
  108. package/dist/utils/hooks/useScrollToPage.js +20 -18
  109. package/dist/utils/hooks/useSearch.js +20 -18
  110. package/dist/utils/hooks/useThumbnail.js +20 -18
  111. package/dist/utils/hooks/useVirtualReactWindow.js +20 -18
  112. package/dist/utils/withRef.js +8 -0
  113. package/package.json +1 -1
  114. package/dist/Popover-1faa77f6.js +0 -1445
  115. package/dist/RPLayout-897cb09d.js +0 -3393
  116. package/dist/SearchCloseButton-ddb9877e.js +0 -32
  117. package/dist/assets/Popover.css +0 -1
  118. package/dist/assets/RPLayout.css +0 -1
  119. package/dist/component-1da194e8.js +0 -337
  120. package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +0 -16
  121. package/dist/components/ui/Popover.js +0 -6
  122. package/dist/floating-ui.react-dom-15b9b819.js +0 -1310
  123. package/dist/index-7279fb4e.js +0 -1557
  124. package/dist/index-aa2d3884.js +0 -140
  125. package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +0 -3
  126. package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +0 -3
  127. package/dist/types/components/ui/Popover.d.ts +0 -9
  128. /package/dist/assets/{RPDropFileZone.css → RPTheme.css} +0 -0
  129. /package/dist/assets/{SearchCloseButton.css → SearchTool.css} +0 -0
@@ -1,9 +1,8 @@
1
1
  import { jsx as d, jsxs as j } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { forwardRef as We } from "react";
4
- import { P as O, e as ae, a as k, h as Ye, u as Be, b as oe, f as Ge, c as E, g as Xe, S as Ve } from "../../index-1cb41342.js";
5
- import { u as Ue, D as qe } from "../../index-aa2d3884.js";
6
- import { u as ze, a as Ze, o as Ke, s as Je, f as Qe, b as et, c as tt, h as rt, l as ot } from "../../floating-ui.react-dom-15b9b819.js";
3
+ import { P as O, c as ae, u as k, f as We, g as Ye, h as oe, e as Be, a as E, b as Ge, i as Xe } from "../../index-8547fbc6.js";
4
+ import { a as Ve, b as Ue, o as qe, s as ze, f as Ze, c as Ke, d as Je, h as Qe, l as et, u as tt, D as rt } from "../../floating-ui.react-dom-f3f380e0.js";
5
+ import { withRef as ot } from "../../utils/withRef.js";
7
6
  import '../../assets/RPTooltip.css';var nt = "Arrow", se = a.forwardRef((e, r) => {
8
7
  const { children: t, width: o = 10, height: n = 5, ...s } = e;
9
8
  return /* @__PURE__ */ d(
@@ -48,50 +47,50 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
48
47
  collisionBoundary: p = [],
49
48
  collisionPadding: c = 0,
50
49
  sticky: f = "partial",
51
- hideWhenDetached: m = !1,
50
+ hideWhenDetached: y = !1,
52
51
  updatePositionStrategy: u = "optimized",
53
52
  onPlaced: v,
54
53
  ...g
55
- } = e, y = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = Ye(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (s !== "center" ? "-" + s : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(p) ? p : [p], _e = U.length > 0, S = {
54
+ } = e, m = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = We(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (s !== "center" ? "-" + s : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(p) ? p : [p], _e = U.length > 0, D = {
56
55
  padding: Re,
57
56
  boundary: U.filter(dt),
58
57
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
59
58
  altBoundary: _e
60
- }, { refs: Oe, floatingStyles: q, placement: Ne, isPositioned: D, middlewareData: A } = ze({
59
+ }, { refs: Oe, floatingStyles: q, placement: Ne, isPositioned: S, middlewareData: A } = Ve({
61
60
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
62
61
  strategy: "fixed",
63
62
  placement: Ee,
64
- whileElementsMounted: (..._) => Ze(..._, {
63
+ whileElementsMounted: (..._) => Ue(..._, {
65
64
  animationFrame: u === "always"
66
65
  }),
67
66
  elements: {
68
- reference: y.anchor
67
+ reference: m.anchor
69
68
  },
70
69
  middleware: [
71
- Ke({ mainAxis: n + V, alignmentAxis: i }),
72
- l && Je({
70
+ qe({ mainAxis: n + V, alignmentAxis: i }),
71
+ l && ze({
73
72
  mainAxis: !0,
74
73
  crossAxis: !1,
75
- limiter: f === "partial" ? ot() : void 0,
76
- ...S
74
+ limiter: f === "partial" ? et() : void 0,
75
+ ...D
77
76
  }),
78
- l && Qe({ ...S }),
79
- et({
80
- ...S,
77
+ l && Ze({ ...D }),
78
+ Ke({
79
+ ...D,
81
80
  apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
82
81
  const { width: Fe, height: je } = re.reference, I = _.floating.style;
83
82
  I.setProperty("--radix-popper-available-width", `${Me}px`), I.setProperty("--radix-popper-available-height", `${$e}px`), I.setProperty("--radix-popper-anchor-width", `${Fe}px`), I.setProperty("--radix-popper-anchor-height", `${je}px`);
84
83
  }
85
84
  }),
86
- C && tt({ element: C, padding: h }),
85
+ C && Je({ element: C, padding: h }),
87
86
  pt({ arrowWidth: N, arrowHeight: V }),
88
- m && rt({ strategy: "referenceHidden", ...S })
87
+ y && Qe({ strategy: "referenceHidden", ...D })
89
88
  ]
90
- }), [z, Se] = ge(Ne), H = Be(v);
89
+ }), [z, De] = ge(Ne), H = Ye(v);
91
90
  oe(() => {
92
- D && (H == null || H());
93
- }, [D, H]);
94
- const De = (Z = A.arrow) == null ? void 0 : Z.x, He = (K = A.arrow) == null ? void 0 : K.y, Ie = ((J = A.arrow) == null ? void 0 : J.centerOffset) !== 0, [ke, Le] = a.useState();
91
+ S && (H == null || H());
92
+ }, [S, H]);
93
+ const Se = (Z = A.arrow) == null ? void 0 : Z.x, He = (K = A.arrow) == null ? void 0 : K.y, Ie = ((J = A.arrow) == null ? void 0 : J.centerOffset) !== 0, [ke, Le] = a.useState();
95
94
  return oe(() => {
96
95
  w && Le(window.getComputedStyle(w).zIndex);
97
96
  }, [w]), /* @__PURE__ */ d(
@@ -101,7 +100,7 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
101
100
  "data-radix-popper-content-wrapper": "",
102
101
  style: {
103
102
  ...q,
104
- transform: D ? q.transform : "translate(0, -200%)",
103
+ transform: S ? q.transform : "translate(0, -200%)",
105
104
  // keep off the page when measuring
106
105
  minWidth: "max-content",
107
106
  zIndex: ke,
@@ -124,21 +123,21 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
124
123
  scope: t,
125
124
  placedSide: z,
126
125
  onArrowChange: b,
127
- arrowX: De,
126
+ arrowX: Se,
128
127
  arrowY: He,
129
128
  shouldHideArrow: Ie,
130
129
  children: /* @__PURE__ */ d(
131
130
  O.div,
132
131
  {
133
132
  "data-side": z,
134
- "data-align": Se,
133
+ "data-align": De,
135
134
  ...g,
136
135
  ref: T,
137
136
  style: {
138
137
  ...g.style,
139
138
  // if the PopperContent hasn't been placed yet (not all measurements done)
140
139
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
141
- animation: D ? void 0 : "none"
140
+ animation: S ? void 0 : "none"
142
141
  }
143
142
  }
144
143
  )
@@ -207,17 +206,17 @@ var pt = (e) => ({
207
206
  name: "transformOrigin",
208
207
  options: e,
209
208
  fn(r) {
210
- var y, w, x;
211
- const { placement: t, rects: o, middlewareData: n } = r, i = ((y = n.arrow) == null ? void 0 : y.centerOffset) !== 0, h = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [p, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], m = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
209
+ var m, w, x;
210
+ const { placement: t, rects: o, middlewareData: n } = r, i = ((m = n.arrow) == null ? void 0 : m.centerOffset) !== 0, h = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [p, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], y = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
212
211
  let v = "", g = "";
213
- return p === "bottom" ? (v = i ? f : `${m}px`, g = `${-l}px`) : p === "top" ? (v = i ? f : `${m}px`, g = `${o.floating.height + l}px`) : p === "right" ? (v = `${-l}px`, g = i ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + l}px`, g = i ? f : `${u}px`), { data: { x: v, y: g } };
212
+ return p === "bottom" ? (v = i ? f : `${y}px`, g = `${-l}px`) : p === "top" ? (v = i ? f : `${y}px`, g = `${o.floating.height + l}px`) : p === "right" ? (v = `${-l}px`, g = i ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + l}px`, g = i ? f : `${u}px`), { data: { x: v, y: g } };
214
213
  }
215
214
  });
216
215
  function ge(e) {
217
216
  const [r, t = "center"] = e.split("-");
218
217
  return [r, t];
219
218
  }
220
- var ut = de, ft = ue, ht = fe, vt = ve, gt = "VisuallyHidden", me = a.forwardRef(
219
+ var ut = de, ft = ue, ht = fe, vt = ve, gt = "VisuallyHidden", ye = a.forwardRef(
221
220
  (e, r) => /* @__PURE__ */ d(
222
221
  O.span,
223
222
  {
@@ -240,13 +239,13 @@ var ut = de, ft = ue, ht = fe, vt = ve, gt = "VisuallyHidden", me = a.forwardRef
240
239
  }
241
240
  )
242
241
  );
243
- me.displayName = gt;
244
- var mt = me, [L, Wt] = ae("Tooltip", [
242
+ ye.displayName = gt;
243
+ var yt = ye, [L, Ft] = ae("Tooltip", [
245
244
  le
246
- ]), M = le(), ye = "TooltipProvider", yt = 700, W = "tooltip.open", [wt, X] = L(ye), we = (e) => {
245
+ ]), M = le(), me = "TooltipProvider", mt = 700, W = "tooltip.open", [wt, X] = L(me), we = (e) => {
247
246
  const {
248
247
  __scopeTooltip: r,
249
- delayDuration: t = yt,
248
+ delayDuration: t = mt,
250
249
  skipDelayDuration: o = 300,
251
250
  disableHoverableContent: n = !1,
252
251
  children: s
@@ -278,7 +277,7 @@ var mt = me, [L, Wt] = ae("Tooltip", [
278
277
  }
279
278
  );
280
279
  };
281
- we.displayName = ye;
280
+ we.displayName = me;
282
281
  var $ = "Tooltip", [xt, F] = L($), xe = (e) => {
283
282
  const {
284
283
  __scopeTooltip: r,
@@ -288,19 +287,19 @@ var $ = "Tooltip", [xt, F] = L($), xe = (e) => {
288
287
  onOpenChange: s,
289
288
  disableHoverableContent: i,
290
289
  delayDuration: h
291
- } = e, l = X($, e.__scopeTooltip), p = M(r), [c, f] = a.useState(null), m = Ue(), u = a.useRef(0), v = i ?? l.disableHoverableContent, g = h ?? l.delayDuration, y = a.useRef(!1), [w = !1, x] = Ge({
290
+ } = e, l = X($, e.__scopeTooltip), p = M(r), [c, f] = a.useState(null), y = tt(), u = a.useRef(0), v = i ?? l.disableHoverableContent, g = h ?? l.delayDuration, m = a.useRef(!1), [w = !1, x] = Be({
292
291
  prop: o,
293
292
  defaultProp: n,
294
293
  onChange: (N) => {
295
294
  N ? (l.onOpen(), document.dispatchEvent(new CustomEvent(W))) : l.onClose(), s == null || s(N);
296
295
  }
297
- }), T = a.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
298
- window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
296
+ }), T = a.useMemo(() => w ? m.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
297
+ window.clearTimeout(u.current), u.current = 0, m.current = !1, x(!0);
299
298
  }, [x]), b = a.useCallback(() => {
300
299
  window.clearTimeout(u.current), u.current = 0, x(!1);
301
300
  }, [x]), P = a.useCallback(() => {
302
301
  window.clearTimeout(u.current), u.current = window.setTimeout(() => {
303
- y.current = !0, x(!0), u.current = 0;
302
+ m.current = !0, x(!0), u.current = 0;
304
303
  }, g);
305
304
  }, [g, x]);
306
305
  return a.useEffect(() => () => {
@@ -309,7 +308,7 @@ var $ = "Tooltip", [xt, F] = L($), xe = (e) => {
309
308
  xt,
310
309
  {
311
310
  scope: r,
312
- contentId: m,
311
+ contentId: y,
313
312
  open: w,
314
313
  stateAttribute: T,
315
314
  trigger: c,
@@ -338,8 +337,8 @@ var Y = "TooltipTrigger", Ce = a.forwardRef(
338
337
  "data-state": n.stateAttribute,
339
338
  ...o,
340
339
  ref: l,
341
- onPointerMove: E(e.onPointerMove, (m) => {
342
- m.pointerType !== "touch" && !c.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
340
+ onPointerMove: E(e.onPointerMove, (y) => {
341
+ y.pointerType !== "touch" && !c.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
343
342
  }),
344
343
  onPointerLeave: E(e.onPointerLeave, () => {
345
344
  n.onTriggerLeave(), c.current = !1;
@@ -357,39 +356,39 @@ var Y = "TooltipTrigger", Ce = a.forwardRef(
357
356
  }
358
357
  );
359
358
  Ce.displayName = Y;
360
- var Ct = "TooltipPortal", [Yt, Pt] = L(Ct, {
359
+ var Ct = "TooltipPortal", [jt, Pt] = L(Ct, {
361
360
  forceMount: void 0
362
361
  }), R = "TooltipContent", Pe = a.forwardRef(
363
362
  (e, r) => {
364
363
  const t = Pt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...s } = e, i = F(R, e.__scopeTooltip);
365
- return /* @__PURE__ */ d(Xe, { present: o || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ d(Te, { side: n, ...s, ref: r }) : /* @__PURE__ */ d(Tt, { side: n, ...s, ref: r }) });
364
+ return /* @__PURE__ */ d(Ge, { present: o || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ d(Te, { side: n, ...s, ref: r }) : /* @__PURE__ */ d(Tt, { side: n, ...s, ref: r }) });
366
365
  }
367
366
  ), Tt = a.forwardRef((e, r) => {
368
- const t = F(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), s = k(r, n), [i, h] = a.useState(null), { trigger: l, onClose: p } = t, c = n.current, { onPointerInTransitChange: f } = o, m = a.useCallback(() => {
367
+ const t = F(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), s = k(r, n), [i, h] = a.useState(null), { trigger: l, onClose: p } = t, c = n.current, { onPointerInTransitChange: f } = o, y = a.useCallback(() => {
369
368
  h(null), f(!1);
370
369
  }, [f]), u = a.useCallback(
371
370
  (v, g) => {
372
- const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = Et(w, y.getBoundingClientRect()), T = Rt(w, x), C = _t(g.getBoundingClientRect()), b = Nt([...T, ...C]);
371
+ const m = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = Et(w, m.getBoundingClientRect()), T = Rt(w, x), C = _t(g.getBoundingClientRect()), b = Nt([...T, ...C]);
373
372
  h(b), f(!0);
374
373
  },
375
374
  [f]
376
375
  );
377
- return a.useEffect(() => () => m(), [m]), a.useEffect(() => {
376
+ return a.useEffect(() => () => y(), [y]), a.useEffect(() => {
378
377
  if (l && c) {
379
- const v = (y) => u(y, c), g = (y) => u(y, l);
378
+ const v = (m) => u(m, c), g = (m) => u(m, l);
380
379
  return l.addEventListener("pointerleave", v), c.addEventListener("pointerleave", g), () => {
381
380
  l.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", g);
382
381
  };
383
382
  }
384
- }, [l, c, u, m]), a.useEffect(() => {
383
+ }, [l, c, u, y]), a.useEffect(() => {
385
384
  if (i) {
386
385
  const v = (g) => {
387
- const y = g.target, w = { x: g.clientX, y: g.clientY }, x = (l == null ? void 0 : l.contains(y)) || (c == null ? void 0 : c.contains(y)), T = !Ot(w, i);
388
- x ? m() : T && (m(), p());
386
+ const m = g.target, w = { x: g.clientX, y: g.clientY }, x = (l == null ? void 0 : l.contains(m)) || (c == null ? void 0 : c.contains(m)), T = !Ot(w, i);
387
+ x ? y() : T && (y(), p());
389
388
  };
390
389
  return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
391
390
  }
392
- }, [l, c, i, p, m]), /* @__PURE__ */ d(Te, { ...e, ref: s });
391
+ }, [l, c, i, p, y]), /* @__PURE__ */ d(Te, { ...e, ref: s });
393
392
  }), [bt, At] = L($, { isInside: !1 }), Te = a.forwardRef(
394
393
  (e, r) => {
395
394
  const {
@@ -402,14 +401,14 @@ var Ct = "TooltipPortal", [Yt, Pt] = L(Ct, {
402
401
  } = e, l = F(R, t), p = M(t), { onClose: c } = l;
403
402
  return a.useEffect(() => (document.addEventListener(W, c), () => document.removeEventListener(W, c)), [c]), a.useEffect(() => {
404
403
  if (l.trigger) {
405
- const f = (m) => {
406
- const u = m.target;
404
+ const f = (y) => {
405
+ const u = y.target;
407
406
  u != null && u.contains(l.trigger) && c();
408
407
  };
409
408
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
410
409
  }
411
410
  }, [l.trigger, c]), /* @__PURE__ */ d(
412
- qe,
411
+ rt,
413
412
  {
414
413
  asChild: !0,
415
414
  disableOutsidePointerEvents: !1,
@@ -433,8 +432,8 @@ var Ct = "TooltipPortal", [Yt, Pt] = L(Ct, {
433
432
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
434
433
  },
435
434
  children: [
436
- /* @__PURE__ */ d(Ve, { children: o }),
437
- /* @__PURE__ */ d(bt, { scope: t, isInside: !0, children: /* @__PURE__ */ d(mt, { id: l.contentId, role: "tooltip", children: n || o }) })
435
+ /* @__PURE__ */ d(Xe, { children: o }),
436
+ /* @__PURE__ */ d(bt, { scope: t, isInside: !0, children: /* @__PURE__ */ d(yt, { id: l.contentId, role: "tooltip", children: n || o }) })
438
437
  ]
439
438
  }
440
439
  )
@@ -518,9 +517,9 @@ function Ot(e, r) {
518
517
  }
519
518
  function Nt(e) {
520
519
  const r = e.slice();
521
- return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), St(r);
520
+ return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), Dt(r);
522
521
  }
523
- function St(e) {
522
+ function Dt(e) {
524
523
  if (e.length <= 1)
525
524
  return e.slice();
526
525
  const r = [];
@@ -550,11 +549,11 @@ function St(e) {
550
549
  }
551
550
  return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
552
551
  }
553
- const Dt = "_tooltipContent_12gjy_1", Ht = "_tooltipArrow_12gjy_8", It = "_fadeIn_12gjy_1", ne = {
554
- tooltipContent: Dt,
552
+ const St = "_tooltipContent_12gjy_1", Ht = "_tooltipArrow_12gjy_8", It = "_fadeIn_12gjy_1", ne = {
553
+ tooltipContent: St,
555
554
  tooltipArrow: Ht,
556
555
  fadeIn: It
557
- }, kt = We(
556
+ }, Wt = ot(
558
557
  ({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ d(we, { children: /* @__PURE__ */ j(xe, { delayDuration: 1e3, children: [
559
558
  /* @__PURE__ */ d(Ce, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: n, className: t, style: o, children: e }) }),
560
559
  /* @__PURE__ */ j(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
@@ -563,7 +562,6 @@ const Dt = "_tooltipContent_12gjy_1", Ht = "_tooltipArrow_12gjy_8", It = "_fadeI
563
562
  ] })
564
563
  ] }) })
565
564
  );
566
- kt.displayName = "RPTooltip";
567
565
  export {
568
- kt as default
566
+ Wt as default
569
567
  };
@@ -1,10 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { p, P as e, u as m } from "../RPLayout-897cb09d.js";
3
+ import { s as e, P as m, u as p } from "../ToolbarLayout.module-60c3d6e8.js";
4
4
  import "./RPDocumentContext.js";
5
5
  import "../utils/appConsole.js";
6
6
  export {
7
- p as PaginationContext,
8
- e as PaginationProvider,
9
- m as usePaginationContext
7
+ e as PaginationContext,
8
+ m as PaginationProvider,
9
+ p as usePaginationContext
10
10
  };
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { r as e, g as n, d as s } from "../RPLayout-897cb09d.js";
3
+ import { v as i, e as n, b as s } from "../ToolbarLayout.module-60c3d6e8.js";
4
4
  export {
5
- e as PrintContext,
5
+ i as PrintContext,
6
6
  n as PrintProvider,
7
7
  s as usePrintContext
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { w as a, f as s, e as c } from "../RPLayout-897cb09d.js";
3
+ import { z as a, S as c, c as s } from "../ToolbarLayout.module-60c3d6e8.js";
4
4
  export {
5
5
  a as SearchContext,
6
- s as SearchProvider,
7
- c as useSearchContext
6
+ c as SearchProvider,
7
+ s as useSearchContext
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { t as m, T as r, h as e } from "../RPLayout-897cb09d.js";
3
+ import { x as m, T as r, f as e } from "../ToolbarLayout.module-60c3d6e8.js";
4
4
  export {
5
5
  m as ThumbnailContext,
6
6
  r as ThumbnailProvider,
@@ -1,53 +1,65 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { createContext as g, useState as w, useMemo as S, useEffect as d, useContext as k } from "react";
3
- import { useLayoutContainer as E } from "./LayoutContainerContext.js";
4
- const B = {
1
+ import { jsx as k } from "react/jsx-runtime";
2
+ import { createContext as S, useState as u, useMemo as g, useEffect as c, useContext as B } from "react";
3
+ import { useLayoutContainer as M } from "./LayoutContainerContext.js";
4
+ const w = {
5
5
  xs: 320,
6
6
  sm: 640,
7
7
  md: 768,
8
8
  lg: 1024,
9
9
  xl: 1280,
10
10
  "2xl": 1536
11
- }, u = g(void 0), A = ({
12
- children: s,
13
- mobileWidth: l = 768,
14
- onLayoutWidthChange: c
11
+ }, E = {
12
+ width: 0,
13
+ height: 0,
14
+ isMobile: !1,
15
+ currentBreakpoint: "xs",
16
+ orientation: "portrait",
17
+ breakpoints: w,
18
+ isBreakpoint: () => !1,
19
+ isMobileDevice: !1,
20
+ isPortrait: !0,
21
+ isLandscape: !1,
22
+ isSmallScreen: !1
23
+ }, m = S(void 0), O = ({
24
+ children: l,
25
+ mobileWidth: p = 768,
26
+ onLayoutWidthChange: s
15
27
  }) => {
16
- const [a, m] = w(!1), { container: t } = E(), [r, h] = w({
28
+ const [a, b] = u(!1), { container: t } = M(), [r, f] = u({
17
29
  width: (t == null ? void 0 : t.clientWidth) || window.innerWidth,
18
30
  height: (t == null ? void 0 : t.clientHeight) || window.innerHeight,
19
31
  isMobile: !1,
20
32
  currentBreakpoint: "xs",
21
33
  orientation: "portrait"
22
- }), n = S(() => ({
23
- ...B,
24
- md: l
25
- }), [l]), b = (e) => {
34
+ }), n = g(() => ({
35
+ ...w,
36
+ md: p
37
+ }), [p]), h = (e) => {
26
38
  const o = Object.entries(n);
27
39
  for (let i = o.length - 1; i >= 0; i--)
28
40
  if (e >= o[i][1])
29
41
  return o[i][0];
30
42
  return "xs";
31
- }, v = () => {
43
+ }, x = () => {
32
44
  const e = navigator.userAgent.toLowerCase();
33
45
  return ["iphone", "ipod", "ipad", "android", "mobile", "phone", "tablet"].some((i) => e.includes(i));
34
46
  };
35
- d(() => {
47
+ c(() => {
36
48
  const e = r.width <= n.md;
37
- m(e);
38
- }, [r, n]), d(() => {
39
- c && c(a, r.width);
40
- }, [c, a, r]), d(() => {
49
+ b(e);
50
+ }, [r, n]), c(() => {
51
+ s && s(a, r.width);
52
+ }, [s, a, r]), c(() => {
41
53
  if (!t)
42
54
  return;
43
55
  const e = () => {
44
- const i = t.clientWidth, p = t.clientHeight;
45
- h({
56
+ const i = t.clientWidth, d = t.clientHeight;
57
+ f({
46
58
  width: i,
47
- height: p,
48
- isMobile: v(),
49
- currentBreakpoint: b(i),
50
- orientation: p > i ? "portrait" : "landscape"
59
+ height: d,
60
+ isMobile: x(),
61
+ currentBreakpoint: h(i),
62
+ orientation: d > i ? "portrait" : "landscape"
51
63
  });
52
64
  };
53
65
  e();
@@ -56,7 +68,7 @@ const B = {
56
68
  o.disconnect(), window.removeEventListener("resize", e);
57
69
  };
58
70
  }, [t]);
59
- const x = {
71
+ const v = {
60
72
  ...r,
61
73
  breakpoints: n,
62
74
  isBreakpoint: (e) => r.width >= n[e],
@@ -65,14 +77,9 @@ const B = {
65
77
  isLandscape: r.orientation === "landscape",
66
78
  isSmallScreen: a
67
79
  };
68
- return /* @__PURE__ */ f(u.Provider, { value: x, children: s });
69
- }, O = () => {
70
- const s = k(u);
71
- if (s === void 0)
72
- throw new Error("useViewportContext must be used within a ViewportProvider");
73
- return s;
74
- };
80
+ return /* @__PURE__ */ k(m.Provider, { value: v, children: l });
81
+ }, V = () => B(m) ?? E;
75
82
  export {
76
- A as ViewportProvider,
77
- O as useViewportContext
83
+ O as ViewportProvider,
84
+ V as useViewportContext
78
85
  };