@react-pdf-kit/viewer 2.10.0 → 2.11.0-beta.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.
Files changed (130) hide show
  1. package/dist/{Checkbox-BVARFFLh.js → Checkbox-Bh8e2edn.js} +2 -2
  2. package/dist/{Combination-ILTe_xfZ.js → Combination-CVOpfE6N.js} +2 -2
  3. package/dist/{DocumentDialog-CYKsfOE1.js → DocumentDialog-C6Cdst4R.js} +4 -4
  4. package/dist/{DropDown-DEnDtOIT.js → DropDown-ry_t2shD.js} +1 -1
  5. package/dist/{MenuItem-DEd62cAM.js → MenuItem-CcoN4Mgf.js} +1 -1
  6. package/dist/{MenuSeparator-BVQWugN3.js → MenuSeparator-BoY354ZB.js} +1 -1
  7. package/dist/{RPDropFileZone-lI-AmN-1.js → RPDropFileZone-4NUgz0RH.js} +2 -2
  8. package/dist/RPTooltip-BIK-lUgv.js +600 -0
  9. package/dist/{Thumbnail-BDGp0xdd.js → Thumbnail-D0M1-UHT.js} +1 -1
  10. package/dist/{Thumbnails-C6maORBh.js → Thumbnails-CjtSNfLI.js} +1 -1
  11. package/dist/assets/pdf.worker.min.mjs +28 -0
  12. package/dist/components/RPConfig.js +1 -1
  13. package/dist/components/RPDropFileZone.js +1 -1
  14. package/dist/components/icons/DarkPdfIcon.js +1 -1
  15. package/dist/components/icons/LightPdfIcon.js +1 -1
  16. package/dist/components/layout/Container.js +1 -1
  17. package/dist/components/layout/RPDefaultLayout.js +4 -4
  18. package/dist/components/layout/RPLayout.js +4 -4
  19. package/dist/components/layout/SkipLink.js +1 -1
  20. package/dist/components/layout/WrapperLayout.js +1 -1
  21. package/dist/components/layout/sidebar/CustomThumbnailElement.js +1 -1
  22. package/dist/components/layout/sidebar/RPSidebar.js +4 -4
  23. package/dist/components/layout/sidebar/RPSplitter.js +1 -1
  24. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  25. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  26. package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
  27. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  28. package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
  29. package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
  30. package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
  31. package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
  32. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  33. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  34. package/dist/components/layout/toolbar/MostPageTool.js +5 -5
  35. package/dist/components/layout/toolbar/OtherTool.js +7 -7
  36. package/dist/components/layout/toolbar/Paginate.js +4 -4
  37. package/dist/components/layout/toolbar/PrintTool.js +3 -3
  38. package/dist/components/layout/toolbar/PropertyItem.js +1 -1
  39. package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
  40. package/dist/components/layout/toolbar/RPMoreOptions.js +7 -7
  41. package/dist/components/layout/toolbar/RPToolbar.js +2 -2
  42. package/dist/components/layout/toolbar/RotateTool.js +5 -5
  43. package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
  44. package/dist/components/layout/toolbar/SearchCloseButton.js +3 -3
  45. package/dist/components/layout/toolbar/SearchResultNavigator.js +3 -3
  46. package/dist/components/layout/toolbar/SearchTool.js +6 -6
  47. package/dist/components/layout/toolbar/SelectionModeTool.js +4 -4
  48. package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
  49. package/dist/components/layout/toolbar/ToolbarCustom.js +4 -4
  50. package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
  51. package/dist/components/layout/toolbar/ViewModeTool.js +4 -4
  52. package/dist/components/layout/toolbar/ZoomTool.js +7 -7
  53. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -3
  54. package/dist/components/layout/toolbar/tools/DualPageTool.js +2 -2
  55. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  56. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
  57. package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
  58. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  59. package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
  60. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +2 -2
  61. package/dist/components/layout/toolbar/tools/InputPageTool.js +3 -3
  62. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  63. package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
  64. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +2 -2
  65. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
  66. package/dist/components/layout/toolbar/tools/PrintTool.js +2 -2
  67. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
  68. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +3 -3
  69. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
  70. package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
  71. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
  72. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
  73. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +2 -2
  74. package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
  75. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +7 -7
  76. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
  77. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
  78. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +2 -2
  79. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
  80. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
  81. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +2 -2
  82. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +5 -5
  83. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
  84. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +5 -5
  85. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
  86. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +4 -4
  87. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +4 -4
  88. package/dist/components/ui/Button.js +1 -1
  89. package/dist/components/ui/Checkbox.js +1 -1
  90. package/dist/components/ui/DropDown.js +1 -1
  91. package/dist/components/ui/Input.js +1 -1
  92. package/dist/components/ui/LoadingIndicator.js +1 -1
  93. package/dist/components/ui/RPTooltip.js +1 -1
  94. package/dist/dist-B_q_rhvX.js +1134 -0
  95. package/dist/{dist-SBjhcXgf.js → dist-CfqUKHDS.js} +1 -1
  96. package/dist/{dist-BgFO-PWQ.js → dist-PVJbq3xy.js} +1 -1
  97. package/dist/floating-ui.react-dom-Cf7rQKLH.js +1096 -0
  98. package/dist/icons.js +2 -2
  99. package/dist/{main-DrddwgsH.js → main-D1Xu_2Lx.js} +3 -3
  100. package/dist/main.js +3 -3
  101. package/dist/types/utils/workerUrl.d.ts +18 -0
  102. package/dist/useLoadWorker-BWt-LRQo.js +26 -0
  103. package/dist/utils/hooks/useLicense.js +2 -2
  104. package/dist/utils/hooks/useLoadWorker.js +2 -14
  105. package/dist/utils/workerUrl.js +23 -0
  106. package/package.json +3 -2
  107. package/dist/RPTooltip-KdCUxOyM.js +0 -413
  108. package/dist/dist-CtoH1CMU.js +0 -947
  109. package/dist/dist-D6Fk7CTS.js +0 -1286
  110. /package/dist/{Button-B_yuVBQ_.js → Button-Dk2wKVbw.js} +0 -0
  111. /package/dist/{Container-CY9sCoDd.js → Container-CqvqL__Q.js} +0 -0
  112. /package/dist/{CustomThumbnailElement-BxTSbzpP.js → CustomThumbnailElement-BfXFJ1V5.js} +0 -0
  113. /package/dist/{DarkPdfIcon-2aDGWxuA.js → DarkPdfIcon-Cb7nnLoT.js} +0 -0
  114. /package/dist/{Input-CVjTHdhy.js → Input-cx_7lycL.js} +0 -0
  115. /package/dist/{LightPdfIcon-LatCGY0T.js → LightPdfIcon-Df0VDzlq.js} +0 -0
  116. /package/dist/{LoadingIndicator-SLpllUQ1.js → LoadingIndicator-DDFWa48h.js} +0 -0
  117. /package/dist/{MostPageTool.module-BP2BMoK8.js → MostPageTool.module-GV9bDwAM.js} +0 -0
  118. /package/dist/{OtherTool.module-CMbI70sn.js → OtherTool.module-Bs8WF62S.js} +0 -0
  119. /package/dist/{Paginate.module-DxXyYoYp.js → Paginate.module-DOw5WBhH.js} +0 -0
  120. /package/dist/{PropertyItem-CmRC2e5Z.js → PropertyItem-BANUhI8A.js} +0 -0
  121. /package/dist/{RPSplitter-DGnDuwsT.js → RPSplitter-kYf59kRI.js} +0 -0
  122. /package/dist/{RPToolbar.module-ODOa9FwW.js → RPToolbar.module-BKN3cJ1Q.js} +0 -0
  123. /package/dist/{RotateTool.module-BHFeo1yn.js → RotateTool.module-CUtHJ6qy.js} +0 -0
  124. /package/dist/{SearchTool.module-BQDBENlo.js → SearchTool.module-BGAI_qMH.js} +0 -0
  125. /package/dist/{SkipLink-mnqFQj0O.js → SkipLink-DJMEf4yg.js} +0 -0
  126. /package/dist/{ToolbarLayout.module-BC9eQ9LN.js → ToolbarLayout.module--e7Y4NlO.js} +0 -0
  127. /package/dist/{WrapperLayout-NjsBnUaz.js → WrapperLayout-vcDHqLe6.js} +0 -0
  128. /package/dist/{ZoomTool.module-DO-r2IDy.js → ZoomTool.module-DjfFB_gX.js} +0 -0
  129. /package/dist/{dist-DjD1zIE0.js → dist-CN3GdKe9.js} +0 -0
  130. /package/dist/{lib-DTkzWIMS.js → lib-CHdpR5bH.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { d as e, f as t, i as n, l as r, n as i, t as a } from "./dist-DjD1zIE0.js";
2
- import { t as o } from "./dist-BgFO-PWQ.js";
1
+ import { d as e, f as t, i as n, l as r, n as i, t as a } from "./dist-CN3GdKe9.js";
2
+ import { t as o } from "./dist-PVJbq3xy.js";
3
3
  import { CheckIcon as s } from "./components/icons/CheckIcon.js";
4
4
  import * as c from "react";
5
5
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { d as e, i as t } from "./dist-DjD1zIE0.js";
2
- import { i as n } from "./dist-SBjhcXgf.js";
1
+ import { d as e, i as t } from "./dist-CN3GdKe9.js";
2
+ import { i as n } from "./dist-CfqUKHDS.js";
3
3
  import * as r from "react";
4
4
  import { useState as i } from "react";
5
5
  import { jsx as a } from "react/jsx-runtime";
@@ -3,11 +3,11 @@ import { useLayoutContainer as t } from "./contexts/LayoutContainerContext.js";
3
3
  import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
4
4
  import { useOtherToolContext as r } from "./contexts/OtherToolContext.js";
5
5
  import { dateFormatter as i } from "./utils/dateFormatter.js";
6
- import { c as a, d as o, f as s, i as c, l, n as u, o as d, t as f } from "./dist-DjD1zIE0.js";
7
- import { n as p, r as m, t as h } from "./dist-SBjhcXgf.js";
8
- import { i as g, n as ee, r as _, t as v } from "./Combination-ILTe_xfZ.js";
6
+ import { c as a, d as o, f as s, i as c, l, n as u, o as d, t as f } from "./dist-CN3GdKe9.js";
7
+ import { n as p, r as m, t as h } from "./dist-CfqUKHDS.js";
8
+ import { i as g, n as ee, r as _, t as v } from "./Combination-CVOpfE6N.js";
9
9
  import { CloseIcon as te } from "./components/icons/CloseIcon.js";
10
- import { t as y } from "./PropertyItem-CmRC2e5Z.js";
10
+ import { t as y } from "./PropertyItem-BANUhI8A.js";
11
11
  import * as b from "react";
12
12
  import { useMemo as x } from "react";
13
13
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-BD2qMUU1.js";
2
- import { a as t, i as n, s as r, t as i } from "./dist-CtoH1CMU.js";
2
+ import { a as t, i as n, s as r, t as i } from "./dist-B_q_rhvX.js";
3
3
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
4
  import './assets/DropDown.css';var s = {
5
5
  "rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-BD2qMUU1.js";
2
- import { r as t } from "./dist-CtoH1CMU.js";
2
+ import { r as t } from "./dist-B_q_rhvX.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import './assets/MenuItem.css';//#region lib/components/layout/toolbar/MenuItem.module.css
5
5
  var r = { "rp-menu-item": "_rp-menu-item_1q6of_1" }, i = (i) => {
@@ -1,4 +1,4 @@
1
- import { o as e } from "./dist-CtoH1CMU.js";
1
+ import { o as e } from "./dist-B_q_rhvX.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import './assets/MenuSeparator.css';//#region lib/components/layout/toolbar/MenuSeparator.module.css
4
4
  var n = { "rp-menu-separator": "_rp-menu-separator_17dlz_1" }, r = () => /* @__PURE__ */ t(e, { className: n["rp-menu-separator"] });
@@ -2,8 +2,8 @@ import { useDarkModeContext as e } from "./contexts/DarkModeContext.js";
2
2
  import { useLocalizationContext as t } from "./contexts/LocalizationContext.js";
3
3
  import { useDropFileZoneContext as n } from "./contexts/DropFileZoneContext.js";
4
4
  import { t as r } from "./clsx-BD2qMUU1.js";
5
- import { t as i } from "./LightPdfIcon-LatCGY0T.js";
6
- import { t as a } from "./DarkPdfIcon-2aDGWxuA.js";
5
+ import { t as i } from "./LightPdfIcon-Df0VDzlq.js";
6
+ import { t as a } from "./DarkPdfIcon-Cb7nnLoT.js";
7
7
  import { useDropFileZone as o } from "./utils/hooks/useDropFileZone.js";
8
8
  import { useCallback as s } from "react";
9
9
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -0,0 +1,600 @@
1
+ import { withRef as e } from "./utils/withRef.js";
2
+ import { d as t, f as n, i as r, l as i, n as a, r as o, s, t as c } from "./dist-CN3GdKe9.js";
3
+ import { i as l, n as u, r as d, t as f } from "./dist-CfqUKHDS.js";
4
+ import { a as p, c as m, i as h, l as g, n as _, o as v, r as y, s as b, t as ee } from "./floating-ui.react-dom-Cf7rQKLH.js";
5
+ import { t as x } from "./dist-PVJbq3xy.js";
6
+ import * as S from "react";
7
+ import { useEffect as C, useRef as w, useState as te } from "react";
8
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
9
+ import './assets/RPTooltip.css';//#region node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.mjs
10
+ var ne = "Arrow", D = S.forwardRef((e, t) => {
11
+ let { children: n, width: i = 10, height: a = 5, ...o } = e;
12
+ return /* @__PURE__ */ T(r.svg, {
13
+ ...o,
14
+ ref: t,
15
+ width: i,
16
+ height: a,
17
+ viewBox: "0 0 30 10",
18
+ preserveAspectRatio: "none",
19
+ children: e.asChild ? n : /* @__PURE__ */ T("polygon", { points: "0,0 30,0 15,10" })
20
+ });
21
+ });
22
+ D.displayName = ne;
23
+ var O = D, k = "Popper", [A, j] = i(k), [re, ie] = A(k), M = (e) => {
24
+ let { __scopePopper: t, children: n } = e, [r, i] = S.useState(null);
25
+ return /* @__PURE__ */ T(re, {
26
+ scope: t,
27
+ anchor: r,
28
+ onAnchorChange: i,
29
+ children: n
30
+ });
31
+ };
32
+ M.displayName = k;
33
+ var N = "PopperAnchor", P = S.forwardRef((e, n) => {
34
+ let { __scopePopper: i, virtualRef: a, ...o } = e, s = ie(N, i), c = S.useRef(null), l = t(n, c), u = S.useRef(null);
35
+ return S.useEffect(() => {
36
+ let e = u.current;
37
+ u.current = a?.current || c.current, e !== u.current && s.onAnchorChange(u.current);
38
+ }), a ? null : /* @__PURE__ */ T(r.div, {
39
+ ...o,
40
+ ref: l
41
+ });
42
+ });
43
+ P.displayName = N;
44
+ var F = "PopperContent", [ae, oe] = A(F), I = S.forwardRef((e, n) => {
45
+ let { __scopePopper: i, side: a = "bottom", sideOffset: s = 0, align: c = "center", alignOffset: u = 0, arrowPadding: d = 0, avoidCollisions: f = !0, collisionBoundary: C = [], collisionPadding: w = 0, sticky: te = "partial", hideWhenDetached: E = !1, updatePositionStrategy: ne = "optimized", onPlaced: D, ...O } = e, k = ie(F, i), [A, j] = S.useState(null), re = t(n, (e) => j(e)), [M, N] = S.useState(null), P = x(M), oe = P?.width ?? 0, I = P?.height ?? 0, L = a + (c === "center" ? "" : "-" + c), se = typeof w == "number" ? w : {
46
+ top: 0,
47
+ right: 0,
48
+ bottom: 0,
49
+ left: 0,
50
+ ...w
51
+ }, R = Array.isArray(C) ? C : [C], de = R.length > 0, z = {
52
+ padding: se,
53
+ boundary: R.filter(ce),
54
+ altBoundary: de
55
+ }, { refs: fe, floatingStyles: B, placement: pe, isPositioned: V, middlewareData: H } = m({
56
+ strategy: "fixed",
57
+ placement: L,
58
+ whileElementsMounted: (...e) => g(...e, { animationFrame: ne === "always" }),
59
+ elements: { reference: k.anchor },
60
+ middleware: [
61
+ p({
62
+ mainAxis: s + I,
63
+ alignmentAxis: u
64
+ }),
65
+ f && v({
66
+ mainAxis: !0,
67
+ crossAxis: !1,
68
+ limiter: te === "partial" ? h() : void 0,
69
+ ...z
70
+ }),
71
+ f && _({ ...z }),
72
+ b({
73
+ ...z,
74
+ apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
75
+ let { width: i, height: a } = t.reference, o = e.floating.style;
76
+ o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
77
+ }
78
+ }),
79
+ M && ee({
80
+ element: M,
81
+ padding: d
82
+ }),
83
+ le({
84
+ arrowWidth: oe,
85
+ arrowHeight: I
86
+ }),
87
+ E && y({
88
+ strategy: "referenceHidden",
89
+ ...z
90
+ })
91
+ ]
92
+ }), [U, W] = ue(pe), me = l(D);
93
+ o(() => {
94
+ V && me?.();
95
+ }, [V, me]);
96
+ let G = H.arrow?.x, K = H.arrow?.y, he = H.arrow?.centerOffset !== 0, [q, ge] = S.useState();
97
+ return o(() => {
98
+ A && ge(window.getComputedStyle(A).zIndex);
99
+ }, [A]), /* @__PURE__ */ T("div", {
100
+ ref: fe.setFloating,
101
+ "data-radix-popper-content-wrapper": "",
102
+ style: {
103
+ ...B,
104
+ transform: V ? B.transform : "translate(0, -200%)",
105
+ minWidth: "max-content",
106
+ zIndex: q,
107
+ "--radix-popper-transform-origin": [H.transformOrigin?.x, H.transformOrigin?.y].join(" "),
108
+ ...H.hide?.referenceHidden && {
109
+ visibility: "hidden",
110
+ pointerEvents: "none"
111
+ }
112
+ },
113
+ dir: e.dir,
114
+ children: /* @__PURE__ */ T(ae, {
115
+ scope: i,
116
+ placedSide: U,
117
+ onArrowChange: N,
118
+ arrowX: G,
119
+ arrowY: K,
120
+ shouldHideArrow: he,
121
+ children: /* @__PURE__ */ T(r.div, {
122
+ "data-side": U,
123
+ "data-align": W,
124
+ ...O,
125
+ ref: re,
126
+ style: {
127
+ ...O.style,
128
+ animation: V ? void 0 : "none"
129
+ }
130
+ })
131
+ })
132
+ });
133
+ });
134
+ I.displayName = F;
135
+ var L = "PopperArrow", se = {
136
+ top: "bottom",
137
+ right: "left",
138
+ bottom: "top",
139
+ left: "right"
140
+ }, R = S.forwardRef(function(e, t) {
141
+ let { __scopePopper: n, ...r } = e, i = oe(L, n), a = se[i.placedSide];
142
+ return /* @__PURE__ */ T("span", {
143
+ ref: i.onArrowChange,
144
+ style: {
145
+ position: "absolute",
146
+ left: i.arrowX,
147
+ top: i.arrowY,
148
+ [a]: 0,
149
+ transformOrigin: {
150
+ top: "",
151
+ right: "0 0",
152
+ bottom: "center 0",
153
+ left: "100% 0"
154
+ }[i.placedSide],
155
+ transform: {
156
+ top: "translateY(100%)",
157
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
158
+ bottom: "rotate(180deg)",
159
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
160
+ }[i.placedSide],
161
+ visibility: i.shouldHideArrow ? "hidden" : void 0
162
+ },
163
+ children: /* @__PURE__ */ T(O, {
164
+ ...r,
165
+ ref: t,
166
+ style: {
167
+ ...r.style,
168
+ display: "block"
169
+ }
170
+ })
171
+ });
172
+ });
173
+ R.displayName = L;
174
+ function ce(e) {
175
+ return e !== null;
176
+ }
177
+ var le = (e) => ({
178
+ name: "transformOrigin",
179
+ options: e,
180
+ fn(t) {
181
+ let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = ue(n), u = {
182
+ start: "0%",
183
+ center: "50%",
184
+ end: "100%"
185
+ }[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
186
+ return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
187
+ x: p,
188
+ y: m
189
+ } };
190
+ }
191
+ });
192
+ function ue(e) {
193
+ let [t, n = "center"] = e.split("-");
194
+ return [t, n];
195
+ }
196
+ var de = M, z = P, fe = I, B = R, pe = Object.freeze({
197
+ position: "absolute",
198
+ border: 0,
199
+ width: 1,
200
+ height: 1,
201
+ padding: 0,
202
+ margin: -1,
203
+ overflow: "hidden",
204
+ clip: "rect(0, 0, 0, 0)",
205
+ whiteSpace: "nowrap",
206
+ wordWrap: "normal"
207
+ }), V = "VisuallyHidden", H = S.forwardRef((e, t) => /* @__PURE__ */ T(r.span, {
208
+ ...e,
209
+ ref: t,
210
+ style: {
211
+ ...pe,
212
+ ...e.style
213
+ }
214
+ }));
215
+ H.displayName = V;
216
+ var U = H, [W, me] = i("Tooltip", [j]), G = j(), K = "TooltipProvider", he = 700, q = "tooltip.open", [ge, J] = W(K), _e = (e) => {
217
+ let { __scopeTooltip: t, delayDuration: n = he, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = S.useRef(!0), s = S.useRef(!1), c = S.useRef(0);
218
+ return S.useEffect(() => {
219
+ let e = c.current;
220
+ return () => window.clearTimeout(e);
221
+ }, []), /* @__PURE__ */ T(ge, {
222
+ scope: t,
223
+ isOpenDelayedRef: o,
224
+ delayDuration: n,
225
+ onOpen: S.useCallback(() => {
226
+ window.clearTimeout(c.current), o.current = !1;
227
+ }, []),
228
+ onClose: S.useCallback(() => {
229
+ window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r);
230
+ }, [r]),
231
+ isPointerInTransitRef: s,
232
+ onPointerInTransitChange: S.useCallback((e) => {
233
+ s.current = e;
234
+ }, []),
235
+ disableHoverableContent: i,
236
+ children: a
237
+ });
238
+ };
239
+ _e.displayName = K;
240
+ var Y = "Tooltip", [ve, X] = W(Y), ye = (e) => {
241
+ let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: s } = e, l = J(Y, e.__scopeTooltip), d = G(t), [f, p] = S.useState(null), m = u(), h = S.useRef(0), g = o ?? l.disableHoverableContent, _ = s ?? l.delayDuration, v = S.useRef(!1), [y, b] = c({
242
+ prop: r,
243
+ defaultProp: i ?? !1,
244
+ onChange: (e) => {
245
+ e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(q))) : l.onClose(), a?.(e);
246
+ },
247
+ caller: Y
248
+ }), ee = S.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), x = S.useCallback(() => {
249
+ window.clearTimeout(h.current), h.current = 0, v.current = !1, b(!0);
250
+ }, [b]), C = S.useCallback(() => {
251
+ window.clearTimeout(h.current), h.current = 0, b(!1);
252
+ }, [b]), w = S.useCallback(() => {
253
+ window.clearTimeout(h.current), h.current = window.setTimeout(() => {
254
+ v.current = !0, b(!0), h.current = 0;
255
+ }, _);
256
+ }, [_, b]);
257
+ return S.useEffect(() => () => {
258
+ h.current &&= (window.clearTimeout(h.current), 0);
259
+ }, []), /* @__PURE__ */ T(de, {
260
+ ...d,
261
+ children: /* @__PURE__ */ T(ve, {
262
+ scope: t,
263
+ contentId: m,
264
+ open: y,
265
+ stateAttribute: ee,
266
+ trigger: f,
267
+ onTriggerChange: p,
268
+ onTriggerEnter: S.useCallback(() => {
269
+ l.isOpenDelayedRef.current ? w() : x();
270
+ }, [
271
+ l.isOpenDelayedRef,
272
+ w,
273
+ x
274
+ ]),
275
+ onTriggerLeave: S.useCallback(() => {
276
+ g ? C() : (window.clearTimeout(h.current), h.current = 0);
277
+ }, [C, g]),
278
+ onOpen: x,
279
+ onClose: C,
280
+ disableHoverableContent: g,
281
+ children: n
282
+ })
283
+ });
284
+ };
285
+ ye.displayName = Y;
286
+ var Z = "TooltipTrigger", be = S.forwardRef((e, i) => {
287
+ let { __scopeTooltip: a, ...o } = e, s = X(Z, a), c = J(Z, a), l = G(a), u = t(i, S.useRef(null), s.onTriggerChange), d = S.useRef(!1), f = S.useRef(!1), p = S.useCallback(() => d.current = !1, []);
288
+ return S.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ T(z, {
289
+ asChild: !0,
290
+ ...l,
291
+ children: /* @__PURE__ */ T(r.button, {
292
+ "aria-describedby": s.open ? s.contentId : void 0,
293
+ "data-state": s.stateAttribute,
294
+ ...o,
295
+ ref: u,
296
+ onPointerMove: n(e.onPointerMove, (e) => {
297
+ e.pointerType !== "touch" && !f.current && !c.isPointerInTransitRef.current && (s.onTriggerEnter(), f.current = !0);
298
+ }),
299
+ onPointerLeave: n(e.onPointerLeave, () => {
300
+ s.onTriggerLeave(), f.current = !1;
301
+ }),
302
+ onPointerDown: n(e.onPointerDown, () => {
303
+ s.open && s.onClose(), d.current = !0, document.addEventListener("pointerup", p, { once: !0 });
304
+ }),
305
+ onFocus: n(e.onFocus, () => {
306
+ d.current || s.onOpen();
307
+ }),
308
+ onBlur: n(e.onBlur, s.onClose),
309
+ onClick: n(e.onClick, s.onClose)
310
+ })
311
+ });
312
+ });
313
+ be.displayName = Z;
314
+ var Q = "TooltipPortal", [xe, Se] = W(Q, { forceMount: void 0 }), Ce = (e) => {
315
+ let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, o = X(Q, t);
316
+ return /* @__PURE__ */ T(xe, {
317
+ scope: t,
318
+ forceMount: n,
319
+ children: /* @__PURE__ */ T(a, {
320
+ present: n || o.open,
321
+ children: /* @__PURE__ */ T(f, {
322
+ asChild: !0,
323
+ container: i,
324
+ children: r
325
+ })
326
+ })
327
+ });
328
+ };
329
+ Ce.displayName = Q;
330
+ var $ = "TooltipContent", we = S.forwardRef((e, t) => {
331
+ let n = Se($, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...o } = e, s = X($, e.__scopeTooltip);
332
+ return /* @__PURE__ */ T(a, {
333
+ present: r || s.open,
334
+ children: s.disableHoverableContent ? /* @__PURE__ */ T(ke, {
335
+ side: i,
336
+ ...o,
337
+ ref: t
338
+ }) : /* @__PURE__ */ T(Te, {
339
+ side: i,
340
+ ...o,
341
+ ref: t
342
+ })
343
+ });
344
+ }), Te = S.forwardRef((e, n) => {
345
+ let r = X($, e.__scopeTooltip), i = J($, e.__scopeTooltip), a = S.useRef(null), o = t(n, a), [s, c] = S.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = S.useCallback(() => {
346
+ c(null), f(!1);
347
+ }, [f]), m = S.useCallback((e, t) => {
348
+ let n = e.currentTarget, r = {
349
+ x: e.clientX,
350
+ y: e.clientY
351
+ }, i = Ne(r, Me(r, n.getBoundingClientRect())), a = Pe(t.getBoundingClientRect());
352
+ c(Ie([...i, ...a])), f(!0);
353
+ }, [f]);
354
+ return S.useEffect(() => () => p(), [p]), S.useEffect(() => {
355
+ if (l && d) {
356
+ let e = (e) => m(e, d), t = (e) => m(e, l);
357
+ return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
358
+ l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
359
+ };
360
+ }
361
+ }, [
362
+ l,
363
+ d,
364
+ m,
365
+ p
366
+ ]), S.useEffect(() => {
367
+ if (s) {
368
+ let e = (e) => {
369
+ let t = e.target, n = {
370
+ x: e.clientX,
371
+ y: e.clientY
372
+ }, r = l?.contains(t) || d?.contains(t), i = !Fe(n, s);
373
+ r ? p() : i && (p(), u());
374
+ };
375
+ return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
376
+ }
377
+ }, [
378
+ l,
379
+ d,
380
+ s,
381
+ u,
382
+ p
383
+ ]), /* @__PURE__ */ T(ke, {
384
+ ...e,
385
+ ref: o
386
+ });
387
+ }), [Ee, De] = W(Y, { isInside: !1 }), Oe = s("TooltipContent"), ke = S.forwardRef((e, t) => {
388
+ let { __scopeTooltip: n, children: r, "aria-label": i, onEscapeKeyDown: a, onPointerDownOutside: o, ...s } = e, c = X($, n), l = G(n), { onClose: u } = c;
389
+ return S.useEffect(() => (document.addEventListener(q, u), () => document.removeEventListener(q, u)), [u]), S.useEffect(() => {
390
+ if (c.trigger) {
391
+ let e = (e) => {
392
+ e.target?.contains(c.trigger) && u();
393
+ };
394
+ return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
395
+ }
396
+ }, [c.trigger, u]), /* @__PURE__ */ T(d, {
397
+ asChild: !0,
398
+ disableOutsidePointerEvents: !1,
399
+ onEscapeKeyDown: a,
400
+ onPointerDownOutside: o,
401
+ onFocusOutside: (e) => e.preventDefault(),
402
+ onDismiss: u,
403
+ children: /* @__PURE__ */ E(fe, {
404
+ "data-state": c.stateAttribute,
405
+ ...l,
406
+ ...s,
407
+ ref: t,
408
+ style: {
409
+ ...s.style,
410
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
411
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
412
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
413
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
414
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
415
+ },
416
+ children: [/* @__PURE__ */ T(Oe, { children: r }), /* @__PURE__ */ T(Ee, {
417
+ scope: n,
418
+ isInside: !0,
419
+ children: /* @__PURE__ */ T(U, {
420
+ id: c.contentId,
421
+ role: "tooltip",
422
+ children: i || r
423
+ })
424
+ })]
425
+ })
426
+ });
427
+ });
428
+ we.displayName = $;
429
+ var Ae = "TooltipArrow", je = S.forwardRef((e, t) => {
430
+ let { __scopeTooltip: n, ...r } = e, i = G(n);
431
+ return De(Ae, n).isInside ? null : /* @__PURE__ */ T(B, {
432
+ ...i,
433
+ ...r,
434
+ ref: t
435
+ });
436
+ });
437
+ je.displayName = Ae;
438
+ function Me(e, t) {
439
+ let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
440
+ switch (Math.min(n, r, i, a)) {
441
+ case a: return "left";
442
+ case i: return "right";
443
+ case n: return "top";
444
+ case r: return "bottom";
445
+ default: throw Error("unreachable");
446
+ }
447
+ }
448
+ function Ne(e, t, n = 5) {
449
+ let r = [];
450
+ switch (t) {
451
+ case "top":
452
+ r.push({
453
+ x: e.x - n,
454
+ y: e.y + n
455
+ }, {
456
+ x: e.x + n,
457
+ y: e.y + n
458
+ });
459
+ break;
460
+ case "bottom":
461
+ r.push({
462
+ x: e.x - n,
463
+ y: e.y - n
464
+ }, {
465
+ x: e.x + n,
466
+ y: e.y - n
467
+ });
468
+ break;
469
+ case "left":
470
+ r.push({
471
+ x: e.x + n,
472
+ y: e.y - n
473
+ }, {
474
+ x: e.x + n,
475
+ y: e.y + n
476
+ });
477
+ break;
478
+ case "right":
479
+ r.push({
480
+ x: e.x - n,
481
+ y: e.y - n
482
+ }, {
483
+ x: e.x - n,
484
+ y: e.y + n
485
+ });
486
+ break;
487
+ }
488
+ return r;
489
+ }
490
+ function Pe(e) {
491
+ let { top: t, right: n, bottom: r, left: i } = e;
492
+ return [
493
+ {
494
+ x: i,
495
+ y: t
496
+ },
497
+ {
498
+ x: n,
499
+ y: t
500
+ },
501
+ {
502
+ x: n,
503
+ y: r
504
+ },
505
+ {
506
+ x: i,
507
+ y: r
508
+ }
509
+ ];
510
+ }
511
+ function Fe(e, t) {
512
+ let { x: n, y: r } = e, i = !1;
513
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
514
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
515
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
516
+ }
517
+ return i;
518
+ }
519
+ function Ie(e) {
520
+ let t = e.slice();
521
+ return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Le(t);
522
+ }
523
+ function Le(e) {
524
+ if (e.length <= 1) return e.slice();
525
+ let t = [];
526
+ for (let n = 0; n < e.length; n++) {
527
+ let r = e[n];
528
+ for (; t.length >= 2;) {
529
+ let e = t[t.length - 1], n = t[t.length - 2];
530
+ if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
531
+ else break;
532
+ }
533
+ t.push(r);
534
+ }
535
+ t.pop();
536
+ let n = [];
537
+ for (let t = e.length - 1; t >= 0; t--) {
538
+ let r = e[t];
539
+ for (; n.length >= 2;) {
540
+ let e = n[n.length - 1], t = n[n.length - 2];
541
+ if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
542
+ else break;
543
+ }
544
+ n.push(r);
545
+ }
546
+ return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
547
+ }
548
+ var Re = {
549
+ tooltipContent: "_tooltipContent_12gjy_1",
550
+ tooltipArrow: "_tooltipArrow_12gjy_8",
551
+ fadeIn: "_fadeIn_12gjy_1"
552
+ }, ze = e(({ children: e, content: t, className: n, style: r, hoverDelayDuration: i = 1e3 }, a) => {
553
+ let [o, s] = te(!1), c = w(null), l = w("keyboard"), u = () => {
554
+ c.current !== null && (clearTimeout(c.current), c.current = null);
555
+ }, d = () => {
556
+ l.current = "pointer";
557
+ }, f = () => {
558
+ l.current = "keyboard";
559
+ }, p = () => {
560
+ d(), u(), c.current = setTimeout(() => {
561
+ s(!0);
562
+ }, i);
563
+ }, m = () => {
564
+ u(), s(!1);
565
+ };
566
+ return C(() => () => {
567
+ u();
568
+ }, []), /* @__PURE__ */ T(_e, { children: /* @__PURE__ */ E(ye, {
569
+ open: o,
570
+ onOpenChange: (e) => {
571
+ e && l.current === "pointer" || s(e);
572
+ },
573
+ children: [/* @__PURE__ */ T(be, {
574
+ asChild: !0,
575
+ children: /* @__PURE__ */ T("div", {
576
+ ref: a,
577
+ className: n,
578
+ style: r,
579
+ onMouseEnter: p,
580
+ onMouseLeave: m,
581
+ onPointerDown: d,
582
+ onPointerEnter: d,
583
+ onMouseDown: d,
584
+ onKeyDownCapture: f,
585
+ onFocus: () => {
586
+ l.current !== "pointer" && (u(), s(!0));
587
+ },
588
+ onBlur: m,
589
+ onTouchStart: m,
590
+ children: e
591
+ })
592
+ }), /* @__PURE__ */ E(we, {
593
+ className: Re.tooltipContent,
594
+ sideOffset: 5,
595
+ children: [/* @__PURE__ */ T(je, { className: Re.tooltipArrow }), /* @__PURE__ */ T("span", { children: t })]
596
+ })]
597
+ }) });
598
+ });
599
+ //#endregion
600
+ export { ze as t };
@@ -4,7 +4,7 @@ import { r as n } from "./PaginationContext-DIzsZhFd.js";
4
4
  import { useRenderQueue as r } from "./contexts/RenderQueueProvider.js";
5
5
  import { t as i } from "./clsx-BD2qMUU1.js";
6
6
  import { t as a } from "./LoaderIcon-SD35XFV2.js";
7
- import { t as o } from "./CustomThumbnailElement-BxTSbzpP.js";
7
+ import { t as o } from "./CustomThumbnailElement-BfXFJ1V5.js";
8
8
  import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
9
9
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
10
  import './assets/Thumbnail.css';//#region lib/components/layout/sidebar/Thumbnail.module.css
@@ -2,7 +2,7 @@ import { r as e } from "./PaginationContext-DIzsZhFd.js";
2
2
  import { useThumbnailContext as t } from "./contexts/ThumbnailsContext.js";
3
3
  import { useThumbnailContainerRegister as n } from "./contexts/ElementThumbnailContext.js";
4
4
  import { withRef as r } from "./utils/withRef.js";
5
- import { t as i } from "./Thumbnail-BDGp0xdd.js";
5
+ import { t as i } from "./Thumbnail-D0M1-UHT.js";
6
6
  import { useInfiniteScroll as a } from "./utils/hooks/useInfiniteScroll.js";
7
7
  import { useCallback as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u } from "react";
8
8
  import { jsx as d } from "react/jsx-runtime";