@react-pdf-kit/viewer 2.6.0-beta.2 → 2.6.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 (343) hide show
  1. package/dist/AnnotationLayer-D6BfL976.js +113 -0
  2. package/dist/Button-jStpvb3T.js +21 -0
  3. package/dist/Checkbox-Brta-YKG.js +195 -0
  4. package/dist/Combination-DqNkTtir.js +695 -0
  5. package/dist/Container-DTWaZzc7.js +16 -0
  6. package/dist/CustomThumbnailElement-C2quEICO.js +19 -0
  7. package/dist/DarkPdfIcon-B5ehd9CV.js +9 -0
  8. package/dist/DocumentDialog-DHAWcYIz.js +324 -0
  9. package/dist/DropDown-DikL-krI.js +33 -0
  10. package/dist/Input-Bb_-ljl1.js +31 -0
  11. package/dist/LightPdfIcon-DL8MYtWQ.js +9 -0
  12. package/dist/LoaderIcon-D9YjinGf.js +14 -0
  13. package/dist/LoadingIndicator-MWrbKa6X.js +45 -0
  14. package/dist/MenuItem-BJDWfzAw.js +15 -0
  15. package/dist/MenuSeparator-D1H5l8Ej.js +6 -0
  16. package/dist/MostPageTool.module-BRVv-sGz.js +4 -0
  17. package/dist/OtherTool.module-BQY9Nfqz.js +4 -0
  18. package/dist/Paginate.module-B0GMw-MB.js +8 -0
  19. package/dist/PaginationContext--n91mIJ4.js +232 -0
  20. package/dist/PasswordModal-BDHdSpxf.js +76 -0
  21. package/dist/PropertyItem-evJWWmWZ.js +18 -0
  22. package/dist/RPDropFileZone-BunRfzst.js +35 -0
  23. package/dist/RPLayout.module-Vc3h4xxS.js +14 -0
  24. package/dist/RPPage-BuSGUFzw.js +91 -0
  25. package/dist/RPPages-V5CNUXFD.js +1007 -0
  26. package/dist/RPSplitter-C63X9M8w.js +121 -0
  27. package/dist/RPToolbar.module-BwqWLviy.js +10 -0
  28. package/dist/RPTooltip-ZZoFqP7C.js +381 -0
  29. package/dist/RotateTool.module-DH5yWbvM.js +4 -0
  30. package/dist/SearchTool.module-DUkVXfOn.js +16 -0
  31. package/dist/SkipLink-Bvbn3miT.js +18 -0
  32. package/dist/TextHighlightLayer-BSVgBxR3.js +157 -0
  33. package/dist/TextLayer-DWGFN9SF.js +125 -0
  34. package/dist/Thumbnail-Dwo2-4Ki.js +97 -0
  35. package/dist/Thumbnails-ComClyJJ.js +52 -0
  36. package/dist/ToolbarLayout.module-Zo715dbb.js +12 -0
  37. package/dist/WrapperLayout-Dcd9l9xH.js +13 -0
  38. package/dist/ZoomTool.module-BrIPy8pO.js +11 -0
  39. package/dist/assets/AnnotationLayer.css +1 -0
  40. package/dist/assets/Button.css +1 -0
  41. package/dist/assets/Checkbox.css +1 -0
  42. package/dist/assets/Container.css +1 -0
  43. package/dist/assets/CustomThumbnailElement.css +1 -0
  44. package/dist/assets/DocumentDialog.css +1 -0
  45. package/dist/assets/DropDown.css +1 -0
  46. package/dist/assets/Input.css +1 -0
  47. package/dist/assets/LoaderIcon.css +1 -0
  48. package/dist/assets/LoadingIndicator.css +1 -0
  49. package/dist/assets/MenuItem.css +1 -0
  50. package/dist/assets/MenuSeparator.css +1 -0
  51. package/dist/assets/MostPageTool.css +1 -0
  52. package/dist/assets/OtherTool.css +1 -0
  53. package/dist/assets/Paginate.css +1 -0
  54. package/dist/assets/PasswordModal.css +1 -0
  55. package/dist/assets/PropertyItem.css +1 -0
  56. package/dist/assets/RPDropFileZone.css +1 -0
  57. package/dist/assets/RPLayout.css +1 -0
  58. package/dist/assets/RPPage.css +1 -0
  59. package/dist/assets/RPPages.css +1 -0
  60. package/dist/assets/RPSplitter.css +1 -0
  61. package/dist/assets/RPToolbar.css +1 -0
  62. package/dist/assets/RPTooltip.css +1 -0
  63. package/dist/assets/RotateTool.css +1 -0
  64. package/dist/assets/SearchTool.css +1 -0
  65. package/dist/assets/SkipLink.css +1 -0
  66. package/dist/assets/TextHighlightLayer.css +1 -0
  67. package/dist/assets/TextLayer.css +1 -0
  68. package/dist/assets/Thumbnail.css +1 -0
  69. package/dist/assets/Thumbnails.css +1 -0
  70. package/dist/assets/ToolbarLayout.css +1 -0
  71. package/dist/assets/WrapperLayout.css +1 -0
  72. package/dist/assets/ZoomTool.css +1 -0
  73. package/dist/assets/style.js +2 -77
  74. package/dist/chunk-C_CI6nMA.js +13 -0
  75. package/dist/clsx-B7LyVm5O.js +16 -0
  76. package/dist/components/RPConfig.js +24 -26
  77. package/dist/components/RPController.js +85 -135
  78. package/dist/components/RPDropFileZone.js +3 -61
  79. package/dist/components/RPPages.js +3 -1115
  80. package/dist/components/RPProvider.js +50 -131
  81. package/dist/components/RPTheme.js +20 -21
  82. package/dist/components/icons/CheckIcon.js +16 -22
  83. package/dist/components/icons/ChevronDownIcon.js +17 -23
  84. package/dist/components/icons/ChevronUpIcon.js +16 -22
  85. package/dist/components/icons/ClearIcon.js +26 -25
  86. package/dist/components/icons/ClockwiseIcon.js +16 -22
  87. package/dist/components/icons/CloseIcon.js +16 -22
  88. package/dist/components/icons/DarkPdfIcon.js +2 -15
  89. package/dist/components/icons/DualPageIcon.js +16 -22
  90. package/dist/components/icons/DualPageWithCoverIcon.js +16 -22
  91. package/dist/components/icons/FileDownloadDefaultIcon.js +20 -23
  92. package/dist/components/icons/FileUploadDefaultIcon.js +20 -23
  93. package/dist/components/icons/FullScreenIcon.js +16 -22
  94. package/dist/components/icons/GoToDownIcon.js +16 -22
  95. package/dist/components/icons/HandModeDefaultIcon.js +16 -22
  96. package/dist/components/icons/HorizontalScrollingIcon.js +18 -24
  97. package/dist/components/icons/InfoIcon.js +16 -22
  98. package/dist/components/icons/LightPdfIcon.js +2 -15
  99. package/dist/components/icons/LoaderIcon.js +2 -17
  100. package/dist/components/icons/MoonIcon.js +16 -22
  101. package/dist/components/icons/PageScrollingIcon.js +18 -24
  102. package/dist/components/icons/PrintDefaultIcon.js +20 -23
  103. package/dist/components/icons/SearchIcon.js +16 -22
  104. package/dist/components/icons/SinglePageIcon.js +15 -21
  105. package/dist/components/icons/SunIcon.js +26 -25
  106. package/dist/components/icons/TextSelectionDefaultIcon.js +20 -23
  107. package/dist/components/icons/ThreeDotIcon.js +16 -22
  108. package/dist/components/icons/Thumbnail.js +39 -54
  109. package/dist/components/icons/VerticalScrollingIcon.js +18 -24
  110. package/dist/components/icons/WrappedScrollingIcon.js +18 -24
  111. package/dist/components/icons/ZoomInIcon.js +16 -22
  112. package/dist/components/icons/ZoomOutIcon.js +16 -22
  113. package/dist/components/layout/Container.js +2 -21
  114. package/dist/components/layout/LayoutContainer.js +23 -34
  115. package/dist/components/layout/LayoutWrapper.js +14 -10
  116. package/dist/components/layout/RPDefaultLayout.js +99 -244
  117. package/dist/components/layout/RPLayout.js +70 -220
  118. package/dist/components/layout/SkipLink.js +3 -29
  119. package/dist/components/layout/WrapperLayout.js +2 -27
  120. package/dist/components/layout/sidebar/CustomThumbnailElement.js +2 -68
  121. package/dist/components/layout/sidebar/RPSidebar.js +61 -112
  122. package/dist/components/layout/sidebar/RPSplitter.js +2 -9
  123. package/dist/components/layout/sidebar/Thumbnail.js +3 -155
  124. package/dist/components/layout/sidebar/Thumbnails.js +2 -82
  125. package/dist/components/layout/toolbar/DarkModeTool.js +44 -36
  126. package/dist/components/layout/toolbar/DocumentDialog.js +2 -322
  127. package/dist/components/layout/toolbar/DocumentProperties.js +30 -39
  128. package/dist/components/layout/toolbar/FileDownloadTool.js +54 -50
  129. package/dist/components/layout/toolbar/FileUploadTool.js +54 -49
  130. package/dist/components/layout/toolbar/FullScreenTool.js +62 -72
  131. package/dist/components/layout/toolbar/MenuItem.js +2 -19
  132. package/dist/components/layout/toolbar/MenuSeparator.js +2 -15
  133. package/dist/components/layout/toolbar/MostPageTool.js +62 -81
  134. package/dist/components/layout/toolbar/OtherTool.js +97 -198
  135. package/dist/components/layout/toolbar/Paginate.js +111 -145
  136. package/dist/components/layout/toolbar/PrintTool.js +70 -72
  137. package/dist/components/layout/toolbar/PropertyItem.js +2 -12
  138. package/dist/components/layout/toolbar/RPMenuItem.js +22 -31
  139. package/dist/components/layout/toolbar/RPMoreOptions.js +140 -220
  140. package/dist/components/layout/toolbar/RPToolbar.js +45 -151
  141. package/dist/components/layout/toolbar/RPToolbarEnd.js +23 -121
  142. package/dist/components/layout/toolbar/RotateTool.js +49 -60
  143. package/dist/components/layout/toolbar/ScrollModeTool.js +79 -67
  144. package/dist/components/layout/toolbar/SearchCloseButton.js +23 -31
  145. package/dist/components/layout/toolbar/SearchResultNavigator.js +39 -100
  146. package/dist/components/layout/toolbar/SearchTool.js +226 -267
  147. package/dist/components/layout/toolbar/SelectionModeTool.js +59 -51
  148. package/dist/components/layout/toolbar/ThumbnailTool.js +30 -39
  149. package/dist/components/layout/toolbar/ToolbarCustom.js +56 -113
  150. package/dist/components/layout/toolbar/ToolbarDefault.js +58 -196
  151. package/dist/components/layout/toolbar/ToolbarLayout.js +12 -158
  152. package/dist/components/layout/toolbar/ViewModeTool.js +82 -62
  153. package/dist/components/layout/toolbar/ZoomTool.js +139 -150
  154. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +24 -54
  155. package/dist/components/layout/toolbar/tools/DualPageTool.js +23 -25
  156. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +2 -206
  157. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +23 -35
  158. package/dist/components/layout/toolbar/tools/FileUploadTool.js +23 -34
  159. package/dist/components/layout/toolbar/tools/FirstPageTool.js +2 -201
  160. package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -33
  161. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +24 -36
  162. package/dist/components/layout/toolbar/tools/InputPageTool.js +51 -92
  163. package/dist/components/layout/toolbar/tools/LastPageTool.js +2 -201
  164. package/dist/components/layout/toolbar/tools/NextPageTool.js +32 -61
  165. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +24 -36
  166. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -62
  167. package/dist/components/layout/toolbar/tools/PrintTool.js +23 -35
  168. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +23 -47
  169. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +26 -47
  170. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +29 -38
  171. package/dist/components/layout/toolbar/tools/SinglePageTool.js +22 -24
  172. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +24 -35
  173. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +24 -46
  174. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +24 -36
  175. package/dist/components/layout/toolbar/tools/ZoomInTool.js +29 -58
  176. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +26 -26
  177. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +94 -133
  178. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +29 -58
  179. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +60 -148
  180. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +31 -42
  181. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +23 -28
  182. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -52
  183. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +25 -51
  184. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +26 -42
  185. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +57 -87
  186. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -52
  187. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +44 -64
  188. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +80 -71
  189. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +59 -57
  190. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +79 -66
  191. package/dist/components/page/AnnotationLayer.js +2 -146
  192. package/dist/components/page/CanvasLayer.js +47 -71
  193. package/dist/components/page/CustomElement.js +18 -53
  194. package/dist/components/page/DualPage.js +43 -98
  195. package/dist/components/page/DualPageWithCover.js +66 -130
  196. package/dist/components/page/RPPage.js +2 -143
  197. package/dist/components/page/SinglePage.js +27 -88
  198. package/dist/components/page/TextHighlightLayer.js +2 -198
  199. package/dist/components/page/TextLayer.js +2 -202
  200. package/dist/components/page/searchHighlight.js +32 -37
  201. package/dist/components/ui/Button.js +2 -25
  202. package/dist/components/ui/Checkbox.js +2 -273
  203. package/dist/components/ui/DropDown.js +2 -36
  204. package/dist/components/ui/Input.js +2 -28
  205. package/dist/components/ui/LoadingIndicator.js +2 -59
  206. package/dist/components/ui/PasswordModal.js +2 -75
  207. package/dist/components/ui/RPTooltip.js +2 -357
  208. package/dist/contexts/ConfigContext.js +13 -12
  209. package/dist/contexts/DarkModeContext.js +26 -27
  210. package/dist/contexts/DimensionPagesContext.js +49 -60
  211. package/dist/contexts/DocumentPasswordContext.js +37 -35
  212. package/dist/contexts/DownloadContext.js +13 -21
  213. package/dist/contexts/DropFileZoneContext.js +35 -62
  214. package/dist/contexts/ElementPageContext.js +114 -139
  215. package/dist/contexts/ElementThumbnailContext.js +132 -195
  216. package/dist/contexts/EventCallbackContext.js +19 -34
  217. package/dist/contexts/FileInputContext.js +30 -49
  218. package/dist/contexts/FullScreenContext.js +31 -24
  219. package/dist/contexts/GlobalCurrentPage.js +21 -18
  220. package/dist/contexts/HighlightContext.js +22 -31
  221. package/dist/contexts/IconContext.js +9 -11
  222. package/dist/contexts/IconToolContext.js +14 -11
  223. package/dist/contexts/InitialStateContext.js +9 -11
  224. package/dist/contexts/LayerContext.js +9 -8
  225. package/dist/contexts/LayoutContainerContext.js +12 -16
  226. package/dist/contexts/LayoutDropFileZoneContext.js +8 -11
  227. package/dist/contexts/LicenseContext.js +12 -17
  228. package/dist/contexts/LoaderContext.js +14 -27
  229. package/dist/contexts/LocalizationContext.js +22 -33
  230. package/dist/contexts/OtherToolContext.js +17 -17
  231. package/dist/contexts/PageViewportContext.js +9 -8
  232. package/dist/contexts/PagesRotateContext.js +42 -43
  233. package/dist/contexts/PaginationContext.js +2 -40
  234. package/dist/contexts/PrintContext.js +67 -78
  235. package/dist/contexts/RPDocumentContext.js +60 -73
  236. package/dist/contexts/RenderQueueProvider.js +43 -72
  237. package/dist/contexts/RenderedPagesCache.js +17 -13
  238. package/dist/contexts/RotationContext.js +27 -38
  239. package/dist/contexts/ScrollModeContext.js +22 -20
  240. package/dist/contexts/SearchContext.js +39 -97
  241. package/dist/contexts/SelectionModeContext.js +22 -23
  242. package/dist/contexts/SmoothScrollContext.js +18 -16
  243. package/dist/contexts/ThemeContext.js +5 -7
  244. package/dist/contexts/ThumbnailsContext.js +26 -43
  245. package/dist/contexts/ToolComponentContext.js +54 -51
  246. package/dist/contexts/ToolbarComponentContext.js +48 -47
  247. package/dist/contexts/ViewModeContext.js +34 -31
  248. package/dist/contexts/ViewportContext.js +91 -85
  249. package/dist/contexts/VirtualGridContext.js +17 -14
  250. package/dist/contexts/VirtualScrollContext.js +42 -52
  251. package/dist/contexts/ZoomContext.js +95 -107
  252. package/dist/de_DE--0LF-SJR.js +483 -0
  253. package/dist/dist-7FA4Do6I.js +1286 -0
  254. package/dist/dist-BRVqFn7R.js +144 -0
  255. package/dist/dist-C3WNMuW2.js +29 -0
  256. package/dist/dist-CKteKPPA.js +947 -0
  257. package/dist/dist-bK-AHWLF.js +314 -0
  258. package/dist/lib-BiapEtK1.js +10261 -0
  259. package/dist/libInjectCss.js +7 -8
  260. package/dist/main-CHO5p1qM.js +60 -0
  261. package/dist/main.js +53 -296
  262. package/dist/style-9n_QpMZt.js +5 -0
  263. package/dist/useWatermark-CvAAf66v.js +67 -0
  264. package/dist/utils/Queue.js +40 -46
  265. package/dist/utils/annotations.js +227 -261
  266. package/dist/utils/appConsole.js +24 -42
  267. package/dist/utils/approximateFragtion.js +16 -21
  268. package/dist/utils/calculatePage.js +29 -20
  269. package/dist/utils/charators.js +39 -48
  270. package/dist/utils/const.js +8 -11
  271. package/dist/utils/constants.js +4 -8
  272. package/dist/utils/convertPdfDate.js +20 -24
  273. package/dist/utils/dateFormatter.js +7 -7
  274. package/dist/utils/elementPagePosition.js +10 -10
  275. package/dist/utils/formatFileSize.js +17 -8
  276. package/dist/utils/getElementPositionInPage.js +44 -82
  277. package/dist/utils/getScrollDistance.js +4 -4
  278. package/dist/utils/getThumbnailViewport.js +12 -6
  279. package/dist/utils/getWordPositionInPage.js +24 -24
  280. package/dist/utils/getZoomLevel.js +16 -23
  281. package/dist/utils/highlight.js +195 -212
  282. package/dist/utils/hooks/useCopyText.js +23 -33
  283. package/dist/utils/hooks/useDarkMode.js +10 -10
  284. package/dist/utils/hooks/useDarkModeProps.js +9 -10
  285. package/dist/utils/hooks/useDebounce.js +22 -18
  286. package/dist/utils/hooks/useDropFileZone.js +13 -11
  287. package/dist/utils/hooks/useElementSize.js +24 -20
  288. package/dist/utils/hooks/useFileDownload.js +16 -33
  289. package/dist/utils/hooks/useFlickerSelectText.js +19 -24
  290. package/dist/utils/hooks/useFullScreen.js +31 -28
  291. package/dist/utils/hooks/useGrabScroll.js +52 -51
  292. package/dist/utils/hooks/useHighlight.js +92 -92
  293. package/dist/utils/hooks/useInfiniteScroll.js +17 -18
  294. package/dist/utils/hooks/useLicense.js +113 -135
  295. package/dist/utils/hooks/useLoadPdf.js +107 -100
  296. package/dist/utils/hooks/useLoadWorker.js +13 -15
  297. package/dist/utils/hooks/useLocalization.js +25 -25
  298. package/dist/utils/hooks/useMousePressed.js +25 -19
  299. package/dist/utils/hooks/usePageRotateContext.js +25 -41
  300. package/dist/utils/hooks/usePaginate.js +2 -38
  301. package/dist/utils/hooks/usePdfProperties.js +38 -36
  302. package/dist/utils/hooks/usePinch.js +65 -100
  303. package/dist/utils/hooks/usePresentPage.js +69 -92
  304. package/dist/utils/hooks/usePrint.js +167 -178
  305. package/dist/utils/hooks/useRequestAnimationFrame.js +16 -16
  306. package/dist/utils/hooks/useResizeObserver.js +18 -21
  307. package/dist/utils/hooks/useRotate.js +15 -27
  308. package/dist/utils/hooks/useScrollToPage.js +2 -38
  309. package/dist/utils/hooks/useSearch.js +125 -163
  310. package/dist/utils/hooks/useTextSelection.js +69 -75
  311. package/dist/utils/hooks/useThumbnail.js +42 -59
  312. package/dist/utils/hooks/useVirtualReactWindow.js +85 -96
  313. package/dist/utils/hooks/useWatermark.js +2 -78
  314. package/dist/utils/injectPrintCSS.js +6 -21
  315. package/dist/utils/link_service.js +59 -137
  316. package/dist/utils/renderPage.js +20 -19
  317. package/dist/utils/sanitizeExternalUrl.js +12 -15
  318. package/dist/utils/smoothScrollTo.js +8 -5
  319. package/dist/utils/types.js +29 -21
  320. package/dist/utils/withRef.js +7 -7
  321. package/dist/utils/zoom.js +5 -6
  322. package/package.json +7 -7
  323. package/dist/Combination-17ab8af1.js +0 -698
  324. package/dist/MostPageTool.module-13578ad6.js +0 -6
  325. package/dist/OtherTool.module-a4be5f1f.js +0 -6
  326. package/dist/Paginate.module-4eef00aa.js +0 -8
  327. package/dist/PaginationContext-87f832f2.js +0 -233
  328. package/dist/RPLayout.module-92fa19f7.js +0 -14
  329. package/dist/RPSplitter-b62772f9.js +0 -122
  330. package/dist/RPToolbar.module-27d7fe77.js +0 -10
  331. package/dist/RotateTool.module-67946714.js +0 -6
  332. package/dist/SearchTool.module-99f60dc7.js +0 -16
  333. package/dist/ToolbarLayout.module-6e339802.js +0 -12
  334. package/dist/ZoomTool.module-7082af8c.js +0 -12
  335. package/dist/assets/style.css +0 -1
  336. package/dist/clsx-0c6e471a.js +0 -22
  337. package/dist/de_DE-8145915f.js +0 -489
  338. package/dist/index-113053cf.js +0 -309
  339. package/dist/index-11f3cd64.js +0 -983
  340. package/dist/index-23911b43.js +0 -150
  341. package/dist/index-ada501c4.js +0 -27
  342. package/dist/index-d0f0aa9a.js +0 -1542
  343. package/dist/index-e04c91b1.js +0 -11671
@@ -1,44 +1,27 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { createContext as s, useContext as l, useState as c } from "react";
3
- import { useThumbnail as d } from "../utils/hooks/useThumbnail.js";
4
- import "./RPDocumentContext.js";
5
- import "../utils/hooks/useLoadPdf.js";
6
- import "pdfjs-dist";
7
- import "../utils/types.js";
8
- import "../de_DE-8145915f.js";
9
- import "../utils/getThumbnailViewport.js";
10
- import "./ConfigContext.js";
11
- import "./DocumentPasswordContext.js";
12
- import "../utils/appConsole.js";
13
- import "../utils/const.js";
14
- import "../utils/hooks/usePdfProperties.js";
15
- import "../utils/convertPdfDate.js";
16
- import "../utils/formatFileSize.js";
17
- const e = s({
18
- thumbnailPages: {},
19
- addPage: (t) => {
20
- },
21
- addToPage: (t) => {
22
- },
23
- thumbnailLength: 0,
24
- setActive: (t) => {
25
- },
26
- active: !1
27
- }), w = () => l(e), y = ({
28
- children: t,
29
- initialThumbnailsVisible: o
30
- }) => {
31
- const { thumbnailPages: i, addPage: r, addToPage: a, thumbnailLength: m } = d(), [n, p] = c(o);
32
- return /* @__PURE__ */ u(
33
- e.Provider,
34
- {
35
- value: { thumbnailPages: i, addPage: r, addToPage: a, thumbnailLength: m, active: n, setActive: p },
36
- children: t
37
- }
38
- );
39
- };
40
- export {
41
- e as ThumbnailContext,
42
- y as ThumbnailProvider,
43
- w as useThumbnailContext
1
+ import { useThumbnail as e } from "../utils/hooks/useThumbnail.js";
2
+ import { createContext as t, useContext as n, useState as r } from "react";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ //#region lib/contexts/ThumbnailsContext.tsx
5
+ var a = t({
6
+ thumbnailPages: {},
7
+ addPage: (e) => {},
8
+ addToPage: (e) => {},
9
+ thumbnailLength: 0,
10
+ setActive: (e) => {},
11
+ active: !1
12
+ }), o = () => n(a), s = ({ children: t, initialThumbnailsVisible: n }) => {
13
+ let { thumbnailPages: o, addPage: s, addToPage: c, thumbnailLength: l } = e(), [u, d] = r(n);
14
+ return /* @__PURE__ */ i(a.Provider, {
15
+ value: {
16
+ thumbnailPages: o,
17
+ addPage: s,
18
+ addToPage: c,
19
+ thumbnailLength: l,
20
+ active: u,
21
+ setActive: d
22
+ },
23
+ children: t
24
+ });
44
25
  };
26
+ //#endregion
27
+ export { a as ThumbnailContext, s as ThumbnailProvider, o as useThumbnailContext };
@@ -1,52 +1,55 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { createContext as u, useContext as n, useState as s } from "react";
3
- const i = () => {
4
- throw new Error("setSlots is not initialized yet");
5
- }, o = u({
6
- themeSwitcher: !0,
7
- documentProperties: !0,
8
- rotateTool: !0,
9
- fullscreenTool: !0,
10
- openFileTool: !0,
11
- dropFileZone: !0,
12
- downloadTool: !0,
13
- viewModeTool: !0,
14
- scrollModeTool: !0,
15
- printTool: !0,
16
- thumbnailTool: !0,
17
- showPrintProgress: !0,
18
- selectionModeTool: !0,
19
- jumpNavigationTool: !0,
20
- sidebarEnable: !0,
21
- pageNavigationTool: !0,
22
- searchTool: !0,
23
- zoomTool: !0,
24
- setSlots: i
25
- }), c = () => n(o), T = {
26
- themeSwitcher: !0,
27
- documentProperties: !0,
28
- rotateTool: !0,
29
- fullscreenTool: !0,
30
- openFileTool: !0,
31
- dropFileZone: !0,
32
- downloadTool: !0,
33
- viewModeTool: !0,
34
- scrollModeTool: !0,
35
- printTool: !0,
36
- thumbnailTool: !0,
37
- showPrintProgress: !0,
38
- selectionModeTool: !0,
39
- jumpNavigationTool: !0,
40
- sidebarEnable: !0,
41
- pageNavigationTool: !0,
42
- searchTool: !0,
43
- zoomTool: !0
44
- }, p = ({ children: e }) => {
45
- const [t, r] = s(T);
46
- return /* @__PURE__ */ l(o.Provider, { value: { ...t, setSlots: r }, children: e });
47
- };
48
- export {
49
- o as ToolComponentContext,
50
- p as ToolComponentProvider,
51
- c as useToolComponentContext
1
+ import { createContext as e, useContext as t, useState as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ var i = e({
4
+ themeSwitcher: !0,
5
+ documentProperties: !0,
6
+ rotateTool: !0,
7
+ fullscreenTool: !0,
8
+ openFileTool: !0,
9
+ dropFileZone: !0,
10
+ downloadTool: !0,
11
+ viewModeTool: !0,
12
+ scrollModeTool: !0,
13
+ printTool: !0,
14
+ thumbnailTool: !0,
15
+ showPrintProgress: !0,
16
+ selectionModeTool: !0,
17
+ jumpNavigationTool: !0,
18
+ sidebarEnable: !0,
19
+ pageNavigationTool: !0,
20
+ searchTool: !0,
21
+ zoomTool: !0,
22
+ setSlots: () => {
23
+ throw Error("setSlots is not initialized yet");
24
+ }
25
+ }), a = () => t(i), o = {
26
+ themeSwitcher: !0,
27
+ documentProperties: !0,
28
+ rotateTool: !0,
29
+ fullscreenTool: !0,
30
+ openFileTool: !0,
31
+ dropFileZone: !0,
32
+ downloadTool: !0,
33
+ viewModeTool: !0,
34
+ scrollModeTool: !0,
35
+ printTool: !0,
36
+ thumbnailTool: !0,
37
+ showPrintProgress: !0,
38
+ selectionModeTool: !0,
39
+ jumpNavigationTool: !0,
40
+ sidebarEnable: !0,
41
+ pageNavigationTool: !0,
42
+ searchTool: !0,
43
+ zoomTool: !0
44
+ }, s = ({ children: e }) => {
45
+ let [t, a] = n(o);
46
+ return /* @__PURE__ */ r(i.Provider, {
47
+ value: {
48
+ ...t,
49
+ setSlots: a
50
+ },
51
+ children: e
52
+ });
52
53
  };
54
+ //#endregion
55
+ export { i as ToolComponentContext, s as ToolComponentProvider, a as useToolComponentContext };
@@ -1,48 +1,49 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { createContext as l, useContext as n, useMemo as i } from "react";
3
- const e = l({
4
- themeSwitcher: !0,
5
- documentProperties: !0,
6
- rotateTool: !0,
7
- fullscreenTool: !0,
8
- openFileTool: !0,
9
- dropFileZone: !0,
10
- downloadTool: !0,
11
- viewModeTool: !0,
12
- scrollModeTool: !0,
13
- printTool: !0,
14
- showPrintProgress: !0,
15
- selectionModeTool: !0,
16
- jumpNavigationTool: !0,
17
- sidebarEnable: !0
18
- }), d = () => n(e), T = {
19
- themeSwitcher: !0,
20
- documentProperties: !0,
21
- rotateTool: !0,
22
- fullscreenTool: !0,
23
- openFileTool: !0,
24
- dropFileZone: !0,
25
- downloadTool: !0,
26
- viewModeTool: !0,
27
- scrollModeTool: !0,
28
- printTool: !0,
29
- thumbnailTool: !0,
30
- showPrintProgress: !0,
31
- selectionModeTool: !0,
32
- jumpNavigationTool: !0,
33
- sidebarEnable: !0,
34
- pageNavigationTool: !0,
35
- searchTool: !0,
36
- zoomTool: !0
37
- }, c = ({ children: r, slots: o }) => {
38
- const t = i(() => ({
39
- ...T,
40
- ...o
41
- }), [o]);
42
- return /* @__PURE__ */ u(e.Provider, { value: t, children: r });
43
- };
44
- export {
45
- e as ToolbarComponentContext,
46
- c as ToolbarComponentProvider,
47
- d as useToolbarComponentContext
1
+ import { createContext as e, useContext as t, useMemo as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region lib/contexts/ToolbarComponentContext.tsx
4
+ var i = e({
5
+ themeSwitcher: !0,
6
+ documentProperties: !0,
7
+ rotateTool: !0,
8
+ fullscreenTool: !0,
9
+ openFileTool: !0,
10
+ dropFileZone: !0,
11
+ downloadTool: !0,
12
+ viewModeTool: !0,
13
+ scrollModeTool: !0,
14
+ printTool: !0,
15
+ showPrintProgress: !0,
16
+ selectionModeTool: !0,
17
+ jumpNavigationTool: !0,
18
+ sidebarEnable: !0
19
+ }), a = () => t(i), o = {
20
+ themeSwitcher: !0,
21
+ documentProperties: !0,
22
+ rotateTool: !0,
23
+ fullscreenTool: !0,
24
+ openFileTool: !0,
25
+ dropFileZone: !0,
26
+ downloadTool: !0,
27
+ viewModeTool: !0,
28
+ scrollModeTool: !0,
29
+ printTool: !0,
30
+ thumbnailTool: !0,
31
+ showPrintProgress: !0,
32
+ selectionModeTool: !0,
33
+ jumpNavigationTool: !0,
34
+ sidebarEnable: !0,
35
+ pageNavigationTool: !0,
36
+ searchTool: !0,
37
+ zoomTool: !0
38
+ }, s = ({ children: e, slots: t }) => {
39
+ let a = n(() => ({
40
+ ...o,
41
+ ...t
42
+ }), [t]);
43
+ return /* @__PURE__ */ r(i.Provider, {
44
+ value: a,
45
+ children: e
46
+ });
48
47
  };
48
+ //#endregion
49
+ export { i as ToolbarComponentContext, s as ToolbarComponentProvider, a as useToolbarComponentContext };
@@ -1,33 +1,36 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import { createContext as P, useContext as d, useState as E, useCallback as i, useMemo as f } from "react";
3
- import { appConsole as p } from "../utils/appConsole.js";
4
1
  import { ViewMode as e } from "../utils/types.js";
5
- import { useInitialStateContext as G } from "./InitialStateContext.js";
6
- import "../de_DE-8145915f.js";
7
- const s = P({
8
- columnCount: 1,
9
- setSinglePage: () => {
10
- },
11
- setDualPage: () => {
12
- },
13
- setDualPageWithCover: () => {
14
- },
15
- viewMode: e.SINGLE_PAGE
16
- }), S = () => {
17
- const o = d(s);
18
- return typeof o.columnCount > "u" && p.error("Please use this hooks inside children component of RPProvider"), o;
19
- }, w = ({ children: o }) => {
20
- const { initialViewMode: r = e.SINGLE_PAGE } = G(), u = r === e.SINGLE_PAGE ? 1 : r === e.DUAL_PAGE_WITH_COVER ? -2 : 2, [t, n] = E(u), a = i(() => {
21
- n(1);
22
- }, []), l = i(() => {
23
- n(2);
24
- }, []), c = i(() => {
25
- n(-2);
26
- }, []), m = f(() => t === 1 ? e.SINGLE_PAGE : t === -2 ? e.DUAL_PAGE_WITH_COVER : e.DUAL_PAGE, [t]);
27
- return /* @__PURE__ */ C(s.Provider, { value: { columnCount: Math.abs(t), setSinglePage: a, setDualPage: l, setDualPageWithCover: c, viewMode: m }, children: o });
28
- };
29
- export {
30
- s as ViewModeContext,
31
- w as ViewModeProvider,
32
- S as useViewModeContext
2
+ import { appConsole as t } from "../utils/appConsole.js";
3
+ import { useInitialStateContext as n } from "./InitialStateContext.js";
4
+ import { createContext as r, useCallback as i, useContext as a, useMemo as o, useState as s } from "react";
5
+ import { jsx as c } from "react/jsx-runtime";
6
+ //#region lib/contexts/ViewModeContext.tsx
7
+ var l = r({
8
+ columnCount: 1,
9
+ setSinglePage: () => {},
10
+ setDualPage: () => {},
11
+ setDualPageWithCover: () => {},
12
+ viewMode: e.SINGLE_PAGE
13
+ }), u = () => {
14
+ let e = a(l);
15
+ return e.columnCount === void 0 && t.error("Please use this hooks inside children component of RPProvider"), e;
16
+ }, d = ({ children: t }) => {
17
+ let { initialViewMode: r = e.SINGLE_PAGE } = n(), [a, u] = s(r === e.SINGLE_PAGE ? 1 : r === e.DUAL_PAGE_WITH_COVER ? -2 : 2), d = i(() => {
18
+ u(1);
19
+ }, []), f = i(() => {
20
+ u(2);
21
+ }, []), p = i(() => {
22
+ u(-2);
23
+ }, []), m = o(() => a === 1 ? e.SINGLE_PAGE : a === -2 ? e.DUAL_PAGE_WITH_COVER : e.DUAL_PAGE, [a]);
24
+ return /* @__PURE__ */ c(l.Provider, {
25
+ value: {
26
+ columnCount: Math.abs(a),
27
+ setSinglePage: d,
28
+ setDualPage: f,
29
+ setDualPageWithCover: p,
30
+ viewMode: m
31
+ },
32
+ children: t
33
+ });
33
34
  };
35
+ //#endregion
36
+ export { l as ViewModeContext, d as ViewModeProvider, u as useViewModeContext };
@@ -1,85 +1,91 @@
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
- xs: 320,
6
- sm: 640,
7
- md: 768,
8
- lg: 1024,
9
- xl: 1280,
10
- "2xl": 1536
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
27
- }) => {
28
- const [a, b] = u(!1), { container: t } = M(), [r, f] = u({
29
- width: (t == null ? void 0 : t.clientWidth) || window.innerWidth,
30
- height: (t == null ? void 0 : t.clientHeight) || window.innerHeight,
31
- isMobile: !1,
32
- currentBreakpoint: "xs",
33
- orientation: "portrait"
34
- }), n = g(() => ({
35
- ...w,
36
- md: p
37
- }), [p]), h = (e) => {
38
- const o = Object.entries(n);
39
- for (let i = o.length - 1; i >= 0; i--)
40
- if (e >= o[i][1])
41
- return o[i][0];
42
- return "xs";
43
- }, x = () => {
44
- const e = navigator.userAgent.toLowerCase();
45
- return ["iphone", "ipod", "ipad", "android", "mobile", "phone", "tablet"].some((i) => e.includes(i));
46
- };
47
- c(() => {
48
- const e = r.width <= n.md;
49
- b(e);
50
- }, [r, n]), c(() => {
51
- s && s(a, r.width);
52
- }, [s, a, r]), c(() => {
53
- if (!t)
54
- return;
55
- const e = () => {
56
- const i = t.clientWidth, d = t.clientHeight;
57
- f({
58
- width: i,
59
- height: d,
60
- isMobile: x(),
61
- currentBreakpoint: h(i),
62
- orientation: d > i ? "portrait" : "landscape"
63
- });
64
- };
65
- e();
66
- const o = new ResizeObserver(e);
67
- return o.observe(t), window.addEventListener("resize", e), () => {
68
- o.disconnect(), window.removeEventListener("resize", e);
69
- };
70
- }, [t]);
71
- const v = {
72
- ...r,
73
- breakpoints: n,
74
- isBreakpoint: (e) => r.width >= n[e],
75
- isMobileDevice: r.isMobile,
76
- isPortrait: r.orientation === "portrait",
77
- isLandscape: r.orientation === "landscape",
78
- isSmallScreen: a
79
- };
80
- return /* @__PURE__ */ k(m.Provider, { value: v, children: l });
81
- }, V = () => B(m) ?? E;
82
- export {
83
- O as ViewportProvider,
84
- V as useViewportContext
85
- };
1
+ import { useLayoutContainer as e } from "./LayoutContainerContext.js";
2
+ import { createContext as t, useContext as n, useEffect as r, useMemo as i, useState as a } from "react";
3
+ import { jsx as o } from "react/jsx-runtime";
4
+ //#region lib/contexts/ViewportContext.tsx
5
+ var s = {
6
+ xs: 320,
7
+ sm: 640,
8
+ md: 768,
9
+ lg: 1024,
10
+ xl: 1280,
11
+ "2xl": 1536
12
+ }, c = {
13
+ width: 0,
14
+ height: 0,
15
+ isMobile: !1,
16
+ currentBreakpoint: "xs",
17
+ orientation: "portrait",
18
+ breakpoints: s,
19
+ isBreakpoint: () => !1,
20
+ isMobileDevice: !1,
21
+ isPortrait: !0,
22
+ isLandscape: !1,
23
+ isSmallScreen: !1
24
+ }, l = t(void 0), u = ({ children: t, mobileWidth: n = 768, onLayoutWidthChange: c }) => {
25
+ let [u, d] = a(!1), { container: f } = e(), [p, m] = a({
26
+ width: f?.clientWidth || window.innerWidth,
27
+ height: f?.clientHeight || window.innerHeight,
28
+ isMobile: !1,
29
+ currentBreakpoint: "xs",
30
+ orientation: "portrait"
31
+ }), h = i(() => ({
32
+ ...s,
33
+ md: n
34
+ }), [n]), g = (e) => {
35
+ let t = Object.entries(h);
36
+ for (let n = t.length - 1; n >= 0; n--) if (e >= t[n][1]) return t[n][0];
37
+ return "xs";
38
+ }, _ = () => {
39
+ let e = navigator.userAgent.toLowerCase();
40
+ return [
41
+ "iphone",
42
+ "ipod",
43
+ "ipad",
44
+ "android",
45
+ "mobile",
46
+ "phone",
47
+ "tablet"
48
+ ].some((t) => e.includes(t));
49
+ };
50
+ r(() => {
51
+ d(p.width <= h.md);
52
+ }, [p, h]), r(() => {
53
+ c && c(u, p.width);
54
+ }, [
55
+ c,
56
+ u,
57
+ p
58
+ ]), r(() => {
59
+ if (!f) return;
60
+ let e = () => {
61
+ let e = f.clientWidth, t = f.clientHeight;
62
+ m({
63
+ width: e,
64
+ height: t,
65
+ isMobile: _(),
66
+ currentBreakpoint: g(e),
67
+ orientation: t > e ? "portrait" : "landscape"
68
+ });
69
+ };
70
+ e();
71
+ let t = new ResizeObserver(e);
72
+ return t.observe(f), window.addEventListener("resize", e), () => {
73
+ t.disconnect(), window.removeEventListener("resize", e);
74
+ };
75
+ }, [f]);
76
+ let v = (e) => p.width >= h[e], y = {
77
+ ...p,
78
+ breakpoints: h,
79
+ isBreakpoint: v,
80
+ isMobileDevice: p.isMobile,
81
+ isPortrait: p.orientation === "portrait",
82
+ isLandscape: p.orientation === "landscape",
83
+ isSmallScreen: u
84
+ };
85
+ return /* @__PURE__ */ o(l.Provider, {
86
+ value: y,
87
+ children: t
88
+ });
89
+ }, d = () => n(l) ?? c;
90
+ //#endregion
91
+ export { u as ViewportProvider, d as useViewportContext };
@@ -1,15 +1,18 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { createContext as u, useContext as i, useState as s } from "react";
3
- const t = u({
4
- columnCount: 1,
5
- setColumnCount: () => {
6
- }
7
- }), m = () => i(t), c = ({ children: o }) => {
8
- const [r, e] = s(1);
9
- return /* @__PURE__ */ n(t.Provider, { value: { columnCount: r, setColumnCount: e }, children: o });
10
- };
11
- export {
12
- t as VirtualGridContext,
13
- c as VirtualGridProvider,
14
- m as useVirtualGridContext
1
+ import { createContext as e, useContext as t, useState as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region lib/contexts/VirtualGridContext.tsx
4
+ var i = e({
5
+ columnCount: 1,
6
+ setColumnCount: () => {}
7
+ }), a = () => t(i), o = ({ children: e }) => {
8
+ let [t, a] = n(1);
9
+ return /* @__PURE__ */ r(i.Provider, {
10
+ value: {
11
+ columnCount: t,
12
+ setColumnCount: a
13
+ },
14
+ children: e
15
+ });
15
16
  };
17
+ //#endregion
18
+ export { i as VirtualGridContext, o as VirtualGridProvider, a as useVirtualGridContext };
@@ -1,53 +1,43 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { createContext as g, useContext as R, useState as e } from "react";
3
- const l = g({
4
- getVirtualScrollRef: () => {
5
- },
6
- getPageScrollElementRef: () => {
7
- },
8
- getVirtualScrollableElementRef: () => {
9
- },
10
- scrollPosition: {
11
- scrollTop: 0,
12
- scrollLeft: 0
13
- },
14
- setScrollPosition: () => {
15
- },
16
- totalInnerDimensions: {
17
- height: 0,
18
- width: 0
19
- },
20
- setTotalInnerDimensions: () => {
21
- }
22
- }), E = () => R(l), h = ({ children: t }) => {
23
- const [o, r] = e(), [n, s] = e(), [i, c] = e(), [a, S] = e({
24
- scrollTop: 0,
25
- scrollLeft: 0
26
- }), [u, f] = e({
27
- height: 0,
28
- width: 0
29
- });
30
- return /* @__PURE__ */ m(
31
- l.Provider,
32
- {
33
- value: {
34
- virtualScrollRef: o,
35
- getVirtualScrollRef: r,
36
- pageScrollElementRef: i,
37
- getPageScrollElementRef: c,
38
- virtualScrollableElementRef: n,
39
- getVirtualScrollableElementRef: s,
40
- scrollPosition: a,
41
- setScrollPosition: S,
42
- totalInnerDimensions: u,
43
- setTotalInnerDimensions: f
44
- },
45
- children: t
46
- }
47
- );
48
- };
49
- export {
50
- l as VirtualScrollContext,
51
- h as VirtualScrollProvider,
52
- E as useVirtualScrollContext
1
+ import { createContext as e, useContext as t, useState as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region lib/contexts/VirtualScrollContext.tsx
4
+ var i = e({
5
+ getVirtualScrollRef: () => {},
6
+ getPageScrollElementRef: () => {},
7
+ getVirtualScrollableElementRef: () => {},
8
+ scrollPosition: {
9
+ scrollTop: 0,
10
+ scrollLeft: 0
11
+ },
12
+ setScrollPosition: () => {},
13
+ totalInnerDimensions: {
14
+ height: 0,
15
+ width: 0
16
+ },
17
+ setTotalInnerDimensions: () => {}
18
+ }), a = () => t(i), o = ({ children: e }) => {
19
+ let [t, a] = n(), [o, s] = n(), [c, l] = n(), [u, d] = n({
20
+ scrollTop: 0,
21
+ scrollLeft: 0
22
+ }), [f, p] = n({
23
+ height: 0,
24
+ width: 0
25
+ });
26
+ return /* @__PURE__ */ r(i.Provider, {
27
+ value: {
28
+ virtualScrollRef: t,
29
+ getVirtualScrollRef: a,
30
+ pageScrollElementRef: c,
31
+ getPageScrollElementRef: l,
32
+ virtualScrollableElementRef: o,
33
+ getVirtualScrollableElementRef: s,
34
+ scrollPosition: u,
35
+ setScrollPosition: d,
36
+ totalInnerDimensions: f,
37
+ setTotalInnerDimensions: p
38
+ },
39
+ children: e
40
+ });
53
41
  };
42
+ //#endregion
43
+ export { i as VirtualScrollContext, o as VirtualScrollProvider, a as useVirtualScrollContext };