@react-pdf-kit/viewer 0.0.0-experimental.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 (498) hide show
  1. package/README.md +204 -0
  2. package/dist/Combination-54a77a7a.js +701 -0
  3. package/dist/MostPageTool.module-13578ad6.js +6 -0
  4. package/dist/OtherTool.module-a4be5f1f.js +6 -0
  5. package/dist/Paginate.module-4eef00aa.js +8 -0
  6. package/dist/PaginationContext-9217cab4.js +201 -0
  7. package/dist/RPLayout.module-b4b23e29.js +14 -0
  8. package/dist/RPSplitter-f6acf13b.js +71 -0
  9. package/dist/RPToolbar.module-27d7fe77.js +10 -0
  10. package/dist/RotateTool.module-67946714.js +6 -0
  11. package/dist/SearchTool.module-99f60dc7.js +16 -0
  12. package/dist/ToolbarLayout.module-6e339802.js +12 -0
  13. package/dist/ZoomTool.module-7082af8c.js +12 -0
  14. package/dist/assets/style.css +1 -0
  15. package/dist/assets/style.js +77 -0
  16. package/dist/clsx-0c6e471a.js +22 -0
  17. package/dist/components/RPConfig.js +17 -0
  18. package/dist/components/RPController.js +136 -0
  19. package/dist/components/RPDropFileZone.js +53 -0
  20. package/dist/components/RPPages.js +1049 -0
  21. package/dist/components/RPProvider.js +126 -0
  22. package/dist/components/RPTheme.js +22 -0
  23. package/dist/components/icons/CheckIcon.js +22 -0
  24. package/dist/components/icons/ChevronDownIcon.js +23 -0
  25. package/dist/components/icons/ChevronUpIcon.js +22 -0
  26. package/dist/components/icons/ClearIcon.js +25 -0
  27. package/dist/components/icons/ClockwiseIcon.js +22 -0
  28. package/dist/components/icons/CloseIcon.js +22 -0
  29. package/dist/components/icons/DarkPdfIcon.js +15 -0
  30. package/dist/components/icons/DualPageIcon.js +22 -0
  31. package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
  32. package/dist/components/icons/FileDownloadDefaultIcon.js +23 -0
  33. package/dist/components/icons/FileUploadDefaultIcon.js +23 -0
  34. package/dist/components/icons/FullScreenIcon.js +22 -0
  35. package/dist/components/icons/GoToDownIcon.js +22 -0
  36. package/dist/components/icons/HandModeDefaultIcon.js +22 -0
  37. package/dist/components/icons/HorizontalScrollingIcon.js +24 -0
  38. package/dist/components/icons/InfoIcon.js +22 -0
  39. package/dist/components/icons/LightPdfIcon.js +15 -0
  40. package/dist/components/icons/LoaderIcon.js +17 -0
  41. package/dist/components/icons/MoonIcon.js +22 -0
  42. package/dist/components/icons/PageScrollingIcon.js +24 -0
  43. package/dist/components/icons/PrintDefaultIcon.js +23 -0
  44. package/dist/components/icons/SearchIcon.js +22 -0
  45. package/dist/components/icons/SinglePageIcon.js +22 -0
  46. package/dist/components/icons/SunIcon.js +25 -0
  47. package/dist/components/icons/TextSelectionDefaultIcon.js +23 -0
  48. package/dist/components/icons/ThreeDotIcon.js +22 -0
  49. package/dist/components/icons/Thumbnail.js +54 -0
  50. package/dist/components/icons/VerticalScrollingIcon.js +24 -0
  51. package/dist/components/icons/WrappedScrollingIcon.js +24 -0
  52. package/dist/components/icons/ZoomInIcon.js +22 -0
  53. package/dist/components/icons/ZoomOutIcon.js +22 -0
  54. package/dist/components/layout/Container.js +21 -0
  55. package/dist/components/layout/LayoutContainer.js +35 -0
  56. package/dist/components/layout/LayoutWrapper.js +11 -0
  57. package/dist/components/layout/RPDefaultLayout.js +238 -0
  58. package/dist/components/layout/RPLayout.js +213 -0
  59. package/dist/components/layout/SkipLink.js +29 -0
  60. package/dist/components/layout/WrapperLayout.js +26 -0
  61. package/dist/components/layout/sidebar/RPSidebar.js +107 -0
  62. package/dist/components/layout/sidebar/RPSplitter.js +8 -0
  63. package/dist/components/layout/sidebar/Thumbnail.js +145 -0
  64. package/dist/components/layout/sidebar/Thumbnails.js +77 -0
  65. package/dist/components/layout/toolbar/DarkModeTool.js +38 -0
  66. package/dist/components/layout/toolbar/DocumentDialog.js +314 -0
  67. package/dist/components/layout/toolbar/DocumentProperties.js +40 -0
  68. package/dist/components/layout/toolbar/FileDownloadTool.js +50 -0
  69. package/dist/components/layout/toolbar/FileUploadTool.js +49 -0
  70. package/dist/components/layout/toolbar/FullScreenTool.js +74 -0
  71. package/dist/components/layout/toolbar/MenuItem.js +19 -0
  72. package/dist/components/layout/toolbar/MenuSeparator.js +15 -0
  73. package/dist/components/layout/toolbar/MostPageTool.js +81 -0
  74. package/dist/components/layout/toolbar/OtherTool.js +199 -0
  75. package/dist/components/layout/toolbar/Paginate.js +145 -0
  76. package/dist/components/layout/toolbar/PrintTool.js +72 -0
  77. package/dist/components/layout/toolbar/PropertyItem.js +12 -0
  78. package/dist/components/layout/toolbar/RPMenuItem.js +33 -0
  79. package/dist/components/layout/toolbar/RPMoreOptions.js +220 -0
  80. package/dist/components/layout/toolbar/RPToolbar.js +151 -0
  81. package/dist/components/layout/toolbar/RPToolbarEnd.js +121 -0
  82. package/dist/components/layout/toolbar/RotateTool.js +60 -0
  83. package/dist/components/layout/toolbar/ScrollModeTool.js +68 -0
  84. package/dist/components/layout/toolbar/SearchCloseButton.js +32 -0
  85. package/dist/components/layout/toolbar/SearchResultNavigator.js +109 -0
  86. package/dist/components/layout/toolbar/SearchTool.js +264 -0
  87. package/dist/components/layout/toolbar/SelectionModeTool.js +52 -0
  88. package/dist/components/layout/toolbar/ThumbnailTool.js +39 -0
  89. package/dist/components/layout/toolbar/ToolbarCustom.js +108 -0
  90. package/dist/components/layout/toolbar/ToolbarDefault.js +192 -0
  91. package/dist/components/layout/toolbar/ToolbarLayout.js +154 -0
  92. package/dist/components/layout/toolbar/ViewModeTool.js +63 -0
  93. package/dist/components/layout/toolbar/ZoomTool.js +150 -0
  94. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +54 -0
  95. package/dist/components/layout/toolbar/tools/DualPageTool.js +26 -0
  96. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +204 -0
  97. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +35 -0
  98. package/dist/components/layout/toolbar/tools/FileUploadTool.js +34 -0
  99. package/dist/components/layout/toolbar/tools/FirstPageTool.js +199 -0
  100. package/dist/components/layout/toolbar/tools/FullScreenTool.js +34 -0
  101. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
  102. package/dist/components/layout/toolbar/tools/InputPageTool.js +92 -0
  103. package/dist/components/layout/toolbar/tools/LastPageTool.js +199 -0
  104. package/dist/components/layout/toolbar/tools/NextPageTool.js +62 -0
  105. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
  106. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +62 -0
  107. package/dist/components/layout/toolbar/tools/PrintTool.js +35 -0
  108. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +47 -0
  109. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +48 -0
  110. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +39 -0
  111. package/dist/components/layout/toolbar/tools/SinglePageTool.js +26 -0
  112. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +36 -0
  113. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +46 -0
  114. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
  115. package/dist/components/layout/toolbar/tools/ZoomInTool.js +58 -0
  116. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +27 -0
  117. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +133 -0
  118. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +58 -0
  119. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +148 -0
  120. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +42 -0
  121. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +29 -0
  122. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +52 -0
  123. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +51 -0
  124. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +43 -0
  125. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +87 -0
  126. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +52 -0
  127. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +64 -0
  128. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +73 -0
  129. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +58 -0
  130. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +67 -0
  131. package/dist/components/page/AnnotationLayer.js +145 -0
  132. package/dist/components/page/CanvasLayer.js +88 -0
  133. package/dist/components/page/CustomElement.js +53 -0
  134. package/dist/components/page/DualPage.js +100 -0
  135. package/dist/components/page/DualPageWithCover.js +132 -0
  136. package/dist/components/page/RPPage.js +144 -0
  137. package/dist/components/page/SinglePage.js +90 -0
  138. package/dist/components/page/TextHighlightLayer.js +198 -0
  139. package/dist/components/page/TextLayer.js +203 -0
  140. package/dist/components/page/searchHighlight.js +37 -0
  141. package/dist/components/ui/Button.js +25 -0
  142. package/dist/components/ui/Checkbox.js +273 -0
  143. package/dist/components/ui/DropDown.js +36 -0
  144. package/dist/components/ui/Input.js +28 -0
  145. package/dist/components/ui/LoadingIndicator.js +47 -0
  146. package/dist/components/ui/PasswordModal.js +75 -0
  147. package/dist/components/ui/RPTooltip.js +571 -0
  148. package/dist/contexts/ConfigContext.js +13 -0
  149. package/dist/contexts/DarkModeContext.js +28 -0
  150. package/dist/contexts/DimensionPagesContext.js +89 -0
  151. package/dist/contexts/DocumentPasswordContext.js +40 -0
  152. package/dist/contexts/DownloadContext.js +21 -0
  153. package/dist/contexts/DropFileZoneContext.js +62 -0
  154. package/dist/contexts/ElementPageContext.js +139 -0
  155. package/dist/contexts/EventCallbackContext.js +34 -0
  156. package/dist/contexts/FileInputContext.js +49 -0
  157. package/dist/contexts/FullScreenContext.js +25 -0
  158. package/dist/contexts/GlobalCurrentPage.js +19 -0
  159. package/dist/contexts/HighlightContext.js +31 -0
  160. package/dist/contexts/IconContext.js +11 -0
  161. package/dist/contexts/IconToolContext.js +13 -0
  162. package/dist/contexts/InitialStateContext.js +13 -0
  163. package/dist/contexts/LayerContext.js +8 -0
  164. package/dist/contexts/LayoutContainerContext.js +16 -0
  165. package/dist/contexts/LicenseContext.js +16 -0
  166. package/dist/contexts/LoaderContext.js +27 -0
  167. package/dist/contexts/LocalizationContext.js +34 -0
  168. package/dist/contexts/OtherToolContext.js +18 -0
  169. package/dist/contexts/PageViewportContext.js +8 -0
  170. package/dist/contexts/PagesRotateContext.js +43 -0
  171. package/dist/contexts/PaginationContext.js +39 -0
  172. package/dist/contexts/PrintContext.js +78 -0
  173. package/dist/contexts/RPDocumentContext.js +69 -0
  174. package/dist/contexts/RenderQueueProvider.js +72 -0
  175. package/dist/contexts/RenderedPagesCache.js +14 -0
  176. package/dist/contexts/RotationContext.js +38 -0
  177. package/dist/contexts/ScrollModeContext.js +22 -0
  178. package/dist/contexts/SearchContext.js +96 -0
  179. package/dist/contexts/SelectionModeContext.js +24 -0
  180. package/dist/contexts/SmoothScaleContext.js +67 -0
  181. package/dist/contexts/SmoothScrollContext.js +12 -0
  182. package/dist/contexts/ThemeContext.js +7 -0
  183. package/dist/contexts/ThumbnailsContext.js +43 -0
  184. package/dist/contexts/ToolComponentContext.js +52 -0
  185. package/dist/contexts/ToolbarComponentContext.js +48 -0
  186. package/dist/contexts/ViewModeContext.js +33 -0
  187. package/dist/contexts/ViewportContext.js +85 -0
  188. package/dist/contexts/VirtualGridContext.js +15 -0
  189. package/dist/contexts/VirtualScrollContext.js +53 -0
  190. package/dist/contexts/ZoomContext.js +107 -0
  191. package/dist/de_DE-a553b162.js +489 -0
  192. package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
  193. package/dist/index-4baea9b5.js +1198 -0
  194. package/dist/index-655864a7.js +27 -0
  195. package/dist/index-c0faa594.js +309 -0
  196. package/dist/index-e3ee9457.js +150 -0
  197. package/dist/libInjectCss.js +9 -0
  198. package/dist/main.js +289 -0
  199. package/dist/types/assets/style.d.ts +1 -0
  200. package/dist/types/components/RPConfig.d.ts +3 -0
  201. package/dist/types/components/RPController.d.ts +3 -0
  202. package/dist/types/components/RPDropFileZone.d.ts +2 -0
  203. package/dist/types/components/RPPages.d.ts +2 -0
  204. package/dist/types/components/RPProvider.d.ts +3 -0
  205. package/dist/types/components/RPTheme.d.ts +3 -0
  206. package/dist/types/components/icons/CheckIcon.d.ts +2 -0
  207. package/dist/types/components/icons/ChevronDownIcon.d.ts +2 -0
  208. package/dist/types/components/icons/ChevronUpIcon.d.ts +2 -0
  209. package/dist/types/components/icons/ClearIcon.d.ts +2 -0
  210. package/dist/types/components/icons/ClockwiseIcon.d.ts +2 -0
  211. package/dist/types/components/icons/CloseIcon.d.ts +2 -0
  212. package/dist/types/components/icons/DarkPdfIcon.d.ts +2 -0
  213. package/dist/types/components/icons/DualPageIcon.d.ts +2 -0
  214. package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
  215. package/dist/types/components/icons/FileDownloadDefaultIcon.d.ts +2 -0
  216. package/dist/types/components/icons/FileUploadDefaultIcon.d.ts +2 -0
  217. package/dist/types/components/icons/FullScreenIcon.d.ts +2 -0
  218. package/dist/types/components/icons/GoToDownIcon.d.ts +2 -0
  219. package/dist/types/components/icons/HandModeDefaultIcon.d.ts +2 -0
  220. package/dist/types/components/icons/HorizontalScrollingIcon.d.ts +2 -0
  221. package/dist/types/components/icons/InfoIcon.d.ts +2 -0
  222. package/dist/types/components/icons/LightPdfIcon.d.ts +2 -0
  223. package/dist/types/components/icons/LoaderIcon.d.ts +2 -0
  224. package/dist/types/components/icons/MoonIcon.d.ts +2 -0
  225. package/dist/types/components/icons/PageScrollingIcon.d.ts +2 -0
  226. package/dist/types/components/icons/PrintDefaultIcon.d.ts +2 -0
  227. package/dist/types/components/icons/SearchIcon.d.ts +2 -0
  228. package/dist/types/components/icons/SinglePageIcon.d.ts +2 -0
  229. package/dist/types/components/icons/SunIcon.d.ts +2 -0
  230. package/dist/types/components/icons/TextSelectionDefaultIcon.d.ts +2 -0
  231. package/dist/types/components/icons/ThreeDotIcon.d.ts +2 -0
  232. package/dist/types/components/icons/Thumbnail.d.ts +2 -0
  233. package/dist/types/components/icons/VerticalScrollingIcon.d.ts +2 -0
  234. package/dist/types/components/icons/WrappedScrollingIcon.d.ts +2 -0
  235. package/dist/types/components/icons/ZoomInIcon.d.ts +2 -0
  236. package/dist/types/components/icons/ZoomOutIcon.d.ts +2 -0
  237. package/dist/types/components/layout/Container.d.ts +8 -0
  238. package/dist/types/components/layout/LayoutContainer.d.ts +10 -0
  239. package/dist/types/components/layout/LayoutWrapper.d.ts +8 -0
  240. package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -0
  241. package/dist/types/components/layout/RPLayout.d.ts +3 -0
  242. package/dist/types/components/layout/SkipLink.d.ts +7 -0
  243. package/dist/types/components/layout/WrapperLayout.d.ts +2 -0
  244. package/dist/types/components/layout/sidebar/RPSidebar.d.ts +1 -0
  245. package/dist/types/components/layout/sidebar/RPSplitter.d.ts +9 -0
  246. package/dist/types/components/layout/sidebar/Thumbnail.d.ts +11 -0
  247. package/dist/types/components/layout/sidebar/Thumbnails.d.ts +6 -0
  248. package/dist/types/components/layout/toolbar/DarkModeTool.d.ts +1 -0
  249. package/dist/types/components/layout/toolbar/DocumentDialog.d.ts +2 -0
  250. package/dist/types/components/layout/toolbar/DocumentProperties.d.ts +1 -0
  251. package/dist/types/components/layout/toolbar/FileDownloadTool.d.ts +2 -0
  252. package/dist/types/components/layout/toolbar/FileUploadTool.d.ts +2 -0
  253. package/dist/types/components/layout/toolbar/FullScreenTool.d.ts +1 -0
  254. package/dist/types/components/layout/toolbar/MenuItem.d.ts +6 -0
  255. package/dist/types/components/layout/toolbar/MenuSeparator.d.ts +1 -0
  256. package/dist/types/components/layout/toolbar/MostPageTool.d.ts +1 -0
  257. package/dist/types/components/layout/toolbar/OtherTool.d.ts +1 -0
  258. package/dist/types/components/layout/toolbar/Paginate.d.ts +1 -0
  259. package/dist/types/components/layout/toolbar/PrintTool.d.ts +1 -0
  260. package/dist/types/components/layout/toolbar/PropertyItem.d.ts +7 -0
  261. package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
  262. package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
  263. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -0
  264. package/dist/types/components/layout/toolbar/RPToolbarEnd.d.ts +1 -0
  265. package/dist/types/components/layout/toolbar/RotateTool.d.ts +1 -0
  266. package/dist/types/components/layout/toolbar/ScrollModeTool.d.ts +1 -0
  267. package/dist/types/components/layout/toolbar/SearchCloseButton.d.ts +7 -0
  268. package/dist/types/components/layout/toolbar/SearchResultNavigator.d.ts +1 -0
  269. package/dist/types/components/layout/toolbar/SearchTool.d.ts +3 -0
  270. package/dist/types/components/layout/toolbar/SelectionModeTool.d.ts +1 -0
  271. package/dist/types/components/layout/toolbar/ThumbnailTool.d.ts +2 -0
  272. package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +3 -0
  273. package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
  274. package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
  275. package/dist/types/components/layout/toolbar/ViewModeTool.d.ts +1 -0
  276. package/dist/types/components/layout/toolbar/ZoomTool.d.ts +1 -0
  277. package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
  278. package/dist/types/components/layout/toolbar/tools/DualPageTool.d.ts +3 -0
  279. package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
  280. package/dist/types/components/layout/toolbar/tools/FileDownloadTool.d.ts +3 -0
  281. package/dist/types/components/layout/toolbar/tools/FileUploadTool.d.ts +3 -0
  282. package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
  283. package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
  284. package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
  285. package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
  286. package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
  287. package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
  288. package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
  289. package/dist/types/components/layout/toolbar/tools/PreviousPageTool.d.ts +3 -0
  290. package/dist/types/components/layout/toolbar/tools/PrintTool.d.ts +3 -0
  291. package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
  292. package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
  293. package/dist/types/components/layout/toolbar/tools/SelectionModeSwitcherTool.d.ts +3 -0
  294. package/dist/types/components/layout/toolbar/tools/SinglePageTool.d.ts +3 -0
  295. package/dist/types/components/layout/toolbar/tools/ThemeSwitcherTool.d.ts +3 -0
  296. package/dist/types/components/layout/toolbar/tools/ThumbnailTool.d.ts +3 -0
  297. package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
  298. package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
  299. package/dist/types/components/layout/toolbar/tools/ZoomLevelDisplay.d.ts +7 -0
  300. package/dist/types/components/layout/toolbar/tools/ZoomLevelTool.d.ts +3 -0
  301. package/dist/types/components/layout/toolbar/tools/ZoomOutTool.d.ts +3 -0
  302. package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
  303. package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
  304. package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
  305. package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
  306. package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
  307. package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
  308. package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
  309. package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
  310. package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
  311. package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
  312. package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
  313. package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
  314. package/dist/types/components/page/AnnotationLayer.d.ts +6 -0
  315. package/dist/types/components/page/CanvasLayer.d.ts +8 -0
  316. package/dist/types/components/page/CustomElement.d.ts +6 -0
  317. package/dist/types/components/page/DualPage.d.ts +5 -0
  318. package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
  319. package/dist/types/components/page/RPPage.d.ts +5 -0
  320. package/dist/types/components/page/SinglePage.d.ts +5 -0
  321. package/dist/types/components/page/TextHighlightLayer.d.ts +10 -0
  322. package/dist/types/components/page/TextLayer.d.ts +6 -0
  323. package/dist/types/components/page/searchHighlight.d.ts +5 -0
  324. package/dist/types/components/ui/Button.d.ts +6 -0
  325. package/dist/types/components/ui/Checkbox.d.ts +10 -0
  326. package/dist/types/components/ui/DropDown.d.ts +10 -0
  327. package/dist/types/components/ui/Input.d.ts +6 -0
  328. package/dist/types/components/ui/LoadingIndicator.d.ts +6 -0
  329. package/dist/types/components/ui/PasswordModal.d.ts +3 -0
  330. package/dist/types/components/ui/RPTooltip.d.ts +9 -0
  331. package/dist/types/contexts/ConfigContext.d.ts +5 -0
  332. package/dist/types/contexts/DarkModeContext.d.ts +5 -0
  333. package/dist/types/contexts/DimensionPagesContext.d.ts +4 -0
  334. package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
  335. package/dist/types/contexts/DownloadContext.d.ts +11 -0
  336. package/dist/types/contexts/DropFileZoneContext.d.ts +5 -0
  337. package/dist/types/contexts/ElementPageContext.d.ts +6 -0
  338. package/dist/types/contexts/EventCallbackContext.d.ts +5 -0
  339. package/dist/types/contexts/FileInputContext.d.ts +7 -0
  340. package/dist/types/contexts/FullScreenContext.d.ts +7 -0
  341. package/dist/types/contexts/GlobalCurrentPage.d.ts +11 -0
  342. package/dist/types/contexts/HighlightContext.d.ts +8 -0
  343. package/dist/types/contexts/IconContext.d.ts +7 -0
  344. package/dist/types/contexts/IconToolContext.d.ts +9 -0
  345. package/dist/types/contexts/InitialStateContext.d.ts +5 -0
  346. package/dist/types/contexts/LayerContext.d.ts +5 -0
  347. package/dist/types/contexts/LayoutContainerContext.d.ts +12 -0
  348. package/dist/types/contexts/LicenseContext.d.ts +7 -0
  349. package/dist/types/contexts/LoaderContext.d.ts +12 -0
  350. package/dist/types/contexts/LocalizationContext.d.ts +5 -0
  351. package/dist/types/contexts/OtherToolContext.d.ts +9 -0
  352. package/dist/types/contexts/PageViewportContext.d.ts +4 -0
  353. package/dist/types/contexts/PagesRotateContext.d.ts +15 -0
  354. package/dist/types/contexts/PaginationContext.d.ts +5 -0
  355. package/dist/types/contexts/PrintContext.d.ts +7 -0
  356. package/dist/types/contexts/RPDocumentContext.d.ts +12 -0
  357. package/dist/types/contexts/RenderQueueProvider.d.ts +17 -0
  358. package/dist/types/contexts/RenderedPagesCache.d.ts +10 -0
  359. package/dist/types/contexts/RotationContext.d.ts +5 -0
  360. package/dist/types/contexts/ScrollModeContext.d.ts +5 -0
  361. package/dist/types/contexts/SearchContext.d.ts +7 -0
  362. package/dist/types/contexts/SelectionModeContext.d.ts +5 -0
  363. package/dist/types/contexts/SmoothScaleContext.d.ts +16 -0
  364. package/dist/types/contexts/SmoothScrollContext.d.ts +8 -0
  365. package/dist/types/contexts/ThemeContext.d.ts +4 -0
  366. package/dist/types/contexts/ThumbnailsContext.d.ts +7 -0
  367. package/dist/types/contexts/ToolComponentContext.d.ts +12 -0
  368. package/dist/types/contexts/ToolbarComponentContext.d.ts +9 -0
  369. package/dist/types/contexts/ViewModeContext.d.ts +5 -0
  370. package/dist/types/contexts/ViewportContext.d.ts +28 -0
  371. package/dist/types/contexts/VirtualGridContext.d.ts +9 -0
  372. package/dist/types/contexts/VirtualScrollContext.d.ts +30 -0
  373. package/dist/types/contexts/ZoomContext.d.ts +5 -0
  374. package/dist/types/libInjectCss.d.ts +1 -0
  375. package/dist/types/locales/de_DE.json.d.ts +83 -0
  376. package/dist/types/locales/en_US.json.d.ts +83 -0
  377. package/dist/types/locales/it_IT.json.d.ts +83 -0
  378. package/dist/types/locales/pt_PT.json.d.ts +83 -0
  379. package/dist/types/locales/th_TH.json.d.ts +83 -0
  380. package/dist/types/locales/zh_CN.json.d.ts +83 -0
  381. package/dist/types/main.d.ts +51 -0
  382. package/dist/types/utils/Queue.d.ts +18 -0
  383. package/dist/types/utils/annotations.d.ts +18 -0
  384. package/dist/types/utils/appConsole.d.ts +24 -0
  385. package/dist/types/utils/approximateFragtion.d.ts +9 -0
  386. package/dist/types/utils/calculatePage.d.ts +12 -0
  387. package/dist/types/utils/charators.d.ts +12 -0
  388. package/dist/types/utils/const.d.ts +3 -0
  389. package/dist/types/utils/constants.d.ts +5 -0
  390. package/dist/types/utils/convertPdfDate.d.ts +1 -0
  391. package/dist/types/utils/dateFormatter.d.ts +1 -0
  392. package/dist/types/utils/elementPagePosition.d.ts +17 -0
  393. package/dist/types/utils/formatFileSize.d.ts +1 -0
  394. package/dist/types/utils/getElementPositionInPage.d.ts +5 -0
  395. package/dist/types/utils/getScrollDistance.d.ts +1 -0
  396. package/dist/types/utils/getThumbnailViewport.d.ts +5 -0
  397. package/dist/types/utils/getWordPositionInPage.d.ts +8 -0
  398. package/dist/types/utils/getZoomLevel.d.ts +2 -0
  399. package/dist/types/utils/highlight.d.ts +14 -0
  400. package/dist/types/utils/hooks/useAccumulateFactor.d.ts +9 -0
  401. package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
  402. package/dist/types/utils/hooks/useDarkMode.d.ts +2 -0
  403. package/dist/types/utils/hooks/useDarkModeProps.d.ts +2 -0
  404. package/dist/types/utils/hooks/useDebounce.d.ts +1 -0
  405. package/dist/types/utils/hooks/useElementSize.d.ts +8 -0
  406. package/dist/types/utils/hooks/useFileDownload.d.ts +3 -0
  407. package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
  408. package/dist/types/utils/hooks/useFullScreen.d.ts +6 -0
  409. package/dist/types/utils/hooks/useGrabScroll.d.ts +11 -0
  410. package/dist/types/utils/hooks/useHighlight.d.ts +10 -0
  411. package/dist/types/utils/hooks/useInfiniteScroll.d.ts +6 -0
  412. package/dist/types/utils/hooks/useLicense.d.ts +2 -0
  413. package/dist/types/utils/hooks/useLoadPdf.d.ts +11 -0
  414. package/dist/types/utils/hooks/useLoadWorker.d.ts +3 -0
  415. package/dist/types/utils/hooks/useLocalization.d.ts +10 -0
  416. package/dist/types/utils/hooks/useMousePressed.d.ts +7 -0
  417. package/dist/types/utils/hooks/usePageRotateContext.d.ts +3 -0
  418. package/dist/types/utils/hooks/usePaginate.d.ts +2 -0
  419. package/dist/types/utils/hooks/usePdfProperties.d.ts +9 -0
  420. package/dist/types/utils/hooks/usePinch.d.ts +1 -0
  421. package/dist/types/utils/hooks/usePresentPage.d.ts +2 -0
  422. package/dist/types/utils/hooks/usePrint.d.ts +12 -0
  423. package/dist/types/utils/hooks/useRequestAnimationFrame.d.ts +5 -0
  424. package/dist/types/utils/hooks/useResizeObserver.d.ts +6 -0
  425. package/dist/types/utils/hooks/useRotate.d.ts +4 -0
  426. package/dist/types/utils/hooks/useScrollToPage.d.ts +3 -0
  427. package/dist/types/utils/hooks/useSearch.d.ts +13 -0
  428. package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
  429. package/dist/types/utils/hooks/useThumbnail.d.ts +7 -0
  430. package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +17 -0
  431. package/dist/types/utils/hooks/useWatermark.d.ts +1 -0
  432. package/dist/types/utils/injectPrintCSS.d.ts +1 -0
  433. package/dist/types/utils/link_service.d.ts +81 -0
  434. package/dist/types/utils/renderPage.d.ts +3 -0
  435. package/dist/types/utils/sanitizeExternalUrl.d.ts +1 -0
  436. package/dist/types/utils/smoothScrollTo.d.ts +2 -0
  437. package/dist/types/utils/types.d.ts +920 -0
  438. package/dist/types/utils/withRef.d.ts +5 -0
  439. package/dist/types/utils/zoom.d.ts +2 -0
  440. package/dist/utils/Queue.js +47 -0
  441. package/dist/utils/annotations.js +277 -0
  442. package/dist/utils/appConsole.js +42 -0
  443. package/dist/utils/approximateFragtion.js +22 -0
  444. package/dist/utils/calculatePage.js +21 -0
  445. package/dist/utils/charators.js +48 -0
  446. package/dist/utils/const.js +9 -0
  447. package/dist/utils/constants.js +8 -0
  448. package/dist/utils/convertPdfDate.js +25 -0
  449. package/dist/utils/dateFormatter.js +7 -0
  450. package/dist/utils/elementPagePosition.js +11 -0
  451. package/dist/utils/formatFileSize.js +9 -0
  452. package/dist/utils/getElementPositionInPage.js +84 -0
  453. package/dist/utils/getScrollDistance.js +4 -0
  454. package/dist/utils/getThumbnailViewport.js +7 -0
  455. package/dist/utils/getWordPositionInPage.js +25 -0
  456. package/dist/utils/getZoomLevel.js +24 -0
  457. package/dist/utils/highlight.js +221 -0
  458. package/dist/utils/hooks/useAccumulateFactor.js +17 -0
  459. package/dist/utils/hooks/useCopyText.js +36 -0
  460. package/dist/utils/hooks/useDarkMode.js +11 -0
  461. package/dist/utils/hooks/useDarkModeProps.js +12 -0
  462. package/dist/utils/hooks/useDebounce.js +19 -0
  463. package/dist/utils/hooks/useElementSize.js +21 -0
  464. package/dist/utils/hooks/useFileDownload.js +33 -0
  465. package/dist/utils/hooks/useFlickerSelectText.js +25 -0
  466. package/dist/utils/hooks/useFullScreen.js +29 -0
  467. package/dist/utils/hooks/useGrabScroll.js +52 -0
  468. package/dist/utils/hooks/useHighlight.js +55 -0
  469. package/dist/utils/hooks/useInfiniteScroll.js +19 -0
  470. package/dist/utils/hooks/useLicense.js +110 -0
  471. package/dist/utils/hooks/useLoadPdf.js +85 -0
  472. package/dist/utils/hooks/useLoadWorker.js +16 -0
  473. package/dist/utils/hooks/useLocalization.js +26 -0
  474. package/dist/utils/hooks/useMousePressed.js +20 -0
  475. package/dist/utils/hooks/usePageRotateContext.js +42 -0
  476. package/dist/utils/hooks/usePaginate.js +37 -0
  477. package/dist/utils/hooks/usePdfProperties.js +37 -0
  478. package/dist/utils/hooks/usePinch.js +147 -0
  479. package/dist/utils/hooks/usePresentPage.js +90 -0
  480. package/dist/utils/hooks/usePrint.js +185 -0
  481. package/dist/utils/hooks/useRequestAnimationFrame.js +17 -0
  482. package/dist/utils/hooks/useResizeObserver.js +22 -0
  483. package/dist/utils/hooks/useRotate.js +27 -0
  484. package/dist/utils/hooks/useScrollToPage.js +37 -0
  485. package/dist/utils/hooks/useSearch.js +162 -0
  486. package/dist/utils/hooks/useTextSelection.js +76 -0
  487. package/dist/utils/hooks/useThumbnail.js +59 -0
  488. package/dist/utils/hooks/useVirtualReactWindow.js +96 -0
  489. package/dist/utils/hooks/useWatermark.js +94 -0
  490. package/dist/utils/injectPrintCSS.js +22 -0
  491. package/dist/utils/link_service.js +138 -0
  492. package/dist/utils/renderPage.js +20 -0
  493. package/dist/utils/sanitizeExternalUrl.js +16 -0
  494. package/dist/utils/smoothScrollTo.js +6 -0
  495. package/dist/utils/types.js +22 -0
  496. package/dist/utils/withRef.js +8 -0
  497. package/dist/utils/zoom.js +6 -0
  498. package/package.json +88 -0
@@ -0,0 +1,75 @@
1
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { c as a } from "../../clsx-0c6e471a.js";
4
+ import { useLocalizationContext as _ } from "../../contexts/LocalizationContext.js";
5
+ import { useDocumentPasswordContext as c } from "../../contexts/DocumentPasswordContext.js";
6
+ import "../../utils/appConsole.js";
7
+ import "../../utils/hooks/useLocalization.js";
8
+ import "../../de_DE-a553b162.js";
9
+ const s = {
10
+ "rp-password-overlay": "_rp-password-overlay_18s56_1",
11
+ "rp-password-modal": "_rp-password-modal_18s56_13",
12
+ "rp-password-title": "_rp-password-title_18s56_27",
13
+ "rp-password-content": "_rp-password-content_18s56_35",
14
+ "rp-password-form": "_rp-password-form_18s56_41",
15
+ "rp-password-input": "_rp-password-input_18s56_45",
16
+ "rp-password-input-invalid": "_rp-password-input-invalid_18s56_62",
17
+ "rp-password-message-invalid": "_rp-password-message-invalid_18s56_66",
18
+ "rp-password-submit-button": "_rp-password-submit-button_18s56_72"
19
+ }, x = () => {
20
+ const [d, e] = u(""), { localeMessages: r } = _(), { setPassword: l, invalidPassword: p } = c(), m = (i) => {
21
+ e(i.target.value);
22
+ }, n = (i) => {
23
+ i.preventDefault(), d && d.trim() && l(d);
24
+ }, w = !d.trim();
25
+ return /* @__PURE__ */ o("div", { className: a(s["rp-password-overlay"]), role: "dialog", "aria-modal": "true", "aria-labelledby": "password-modal-title", children: /* @__PURE__ */ t("div", { className: a(s["rp-password-modal"]), children: [
26
+ /* @__PURE__ */ o("div", { id: "password-modal-title", className: a(s["rp-password-title"]), children: r == null ? void 0 : r.passwordModalTitle }),
27
+ /* @__PURE__ */ o("div", { className: a(s["rp-password-content"]), children: r == null ? void 0 : r.passwordModalMessage }),
28
+ /* @__PURE__ */ t("form", { onSubmit: n, children: [
29
+ /* @__PURE__ */ t("div", { className: a(s["rp-password-form"]), children: [
30
+ /* @__PURE__ */ o(
31
+ "input",
32
+ {
33
+ type: "password",
34
+ value: d,
35
+ onChange: m,
36
+ className: a(
37
+ s["rp-password-input"],
38
+ p && s["rp-password-input-invalid"]
39
+ ),
40
+ placeholder: r == null ? void 0 : r.passwordPlaceholder,
41
+ autoComplete: "off",
42
+ "aria-label": r == null ? void 0 : r.passwordPlaceholder,
43
+ "aria-required": "true",
44
+ "aria-invalid": p,
45
+ "aria-describedby": p ? "password-error" : void 0
46
+ }
47
+ ),
48
+ /* @__PURE__ */ o(
49
+ "div",
50
+ {
51
+ id: "password-error",
52
+ className: a(s["rp-password-message-invalid"]),
53
+ role: "alert",
54
+ "aria-live": "polite",
55
+ children: p && /* @__PURE__ */ o("span", { children: r == null ? void 0 : r.passwordError })
56
+ }
57
+ )
58
+ ] }),
59
+ /* @__PURE__ */ o(
60
+ "button",
61
+ {
62
+ type: "submit",
63
+ disabled: w,
64
+ className: a(s["rp-password-submit-button"]),
65
+ onClick: n,
66
+ "aria-label": r == null ? void 0 : r.passwordConfirmLabel,
67
+ children: r == null ? void 0 : r.passwordConfirmLabel
68
+ }
69
+ )
70
+ ] })
71
+ ] }) });
72
+ };
73
+ export {
74
+ x as default
75
+ };
@@ -0,0 +1,571 @@
1
+ import { jsx as p, jsxs as Y } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { P as S, c as ae, a as k, u as oe, f as Fe, b as E, d as We, i as Be } from "../../index-c0faa594.js";
4
+ import { a as Ge, u as Xe, D as Ve } from "../../index-e3ee9457.js";
5
+ import { u as Ue, a as ze, o as qe, s as Ze, f as Ke, b as Je, c as Qe, h as et, l as tt } from "../../floating-ui.react-dom-5ec29bd6.js";
6
+ import { u as rt } from "../../index-655864a7.js";
7
+ import { withRef as ot } from "../../utils/withRef.js";
8
+ import "react-dom";
9
+ var nt = "Arrow", se = a.forwardRef((e, r) => {
10
+ const { children: t, width: o = 10, height: n = 5, ...i } = e;
11
+ return /* @__PURE__ */ p(
12
+ S.svg,
13
+ {
14
+ ...i,
15
+ ref: r,
16
+ width: o,
17
+ height: n,
18
+ viewBox: "0 0 30 10",
19
+ preserveAspectRatio: "none",
20
+ children: e.asChild ? t : /* @__PURE__ */ p("polygon", { points: "0,0 30,0 15,10" })
21
+ }
22
+ );
23
+ });
24
+ se.displayName = nt;
25
+ var at = se, B = "Popper", [ie, le] = ae(B), [st, ce] = ie(B), pe = (e) => {
26
+ const { __scopePopper: r, children: t } = e, [o, n] = a.useState(null);
27
+ return /* @__PURE__ */ p(st, { scope: r, anchor: o, onAnchorChange: n, children: t });
28
+ };
29
+ pe.displayName = B;
30
+ var de = "PopperAnchor", ue = a.forwardRef(
31
+ (e, r) => {
32
+ const { __scopePopper: t, virtualRef: o, ...n } = e, i = ce(de, t), l = a.useRef(null), h = k(r, l), s = a.useRef(null);
33
+ return a.useEffect(() => {
34
+ const d = s.current;
35
+ s.current = (o == null ? void 0 : o.current) || l.current, d !== s.current && i.onAnchorChange(s.current);
36
+ }), o ? null : /* @__PURE__ */ p(S.div, { ...n, ref: h });
37
+ }
38
+ );
39
+ ue.displayName = de;
40
+ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
41
+ (e, r) => {
42
+ var Z, K, J, Q, ee, te;
43
+ const {
44
+ __scopePopper: t,
45
+ side: o = "bottom",
46
+ sideOffset: n = 0,
47
+ align: i = "center",
48
+ alignOffset: l = 0,
49
+ arrowPadding: h = 0,
50
+ avoidCollisions: s = !0,
51
+ collisionBoundary: d = [],
52
+ collisionPadding: c = 0,
53
+ sticky: f = "partial",
54
+ hideWhenDetached: g = !1,
55
+ updatePositionStrategy: u = "optimized",
56
+ onPlaced: v,
57
+ ...m
58
+ } = e, y = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = rt(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (i !== "center" ? "-" + i : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(d) ? d : [d], _e = U.length > 0, D = {
59
+ padding: Re,
60
+ boundary: U.filter(pt),
61
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
62
+ altBoundary: _e
63
+ }, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } = Ue({
64
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
65
+ strategy: "fixed",
66
+ placement: Ee,
67
+ whileElementsMounted: (..._) => ze(..._, {
68
+ animationFrame: u === "always"
69
+ }),
70
+ elements: {
71
+ reference: y.anchor
72
+ },
73
+ middleware: [
74
+ qe({ mainAxis: n + V, alignmentAxis: l }),
75
+ s && Ze({
76
+ mainAxis: !0,
77
+ crossAxis: !1,
78
+ limiter: f === "partial" ? tt() : void 0,
79
+ ...D
80
+ }),
81
+ s && Ke({ ...D }),
82
+ Je({
83
+ ...D,
84
+ apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
85
+ const { width: je, height: Ye } = re.reference, L = _.floating.style;
86
+ L.setProperty("--radix-popper-available-width", `${Me}px`), L.setProperty("--radix-popper-available-height", `${$e}px`), L.setProperty("--radix-popper-anchor-width", `${je}px`), L.setProperty("--radix-popper-anchor-height", `${Ye}px`);
87
+ }
88
+ }),
89
+ C && Qe({ element: C, padding: h }),
90
+ dt({ arrowWidth: N, arrowHeight: V }),
91
+ g && et({ strategy: "referenceHidden", ...D })
92
+ ]
93
+ }), [q, Ne] = ge(Se), I = Ge(v);
94
+ oe(() => {
95
+ H && (I == null || I());
96
+ }, [H, I]);
97
+ 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, [Le, ke] = a.useState();
98
+ return oe(() => {
99
+ w && ke(window.getComputedStyle(w).zIndex);
100
+ }, [w]), /* @__PURE__ */ p(
101
+ "div",
102
+ {
103
+ ref: Oe.setFloating,
104
+ "data-radix-popper-content-wrapper": "",
105
+ style: {
106
+ ...z,
107
+ transform: H ? z.transform : "translate(0, -200%)",
108
+ // keep off the page when measuring
109
+ minWidth: "max-content",
110
+ zIndex: Le,
111
+ "--radix-popper-transform-origin": [
112
+ (Q = A.transformOrigin) == null ? void 0 : Q.x,
113
+ (ee = A.transformOrigin) == null ? void 0 : ee.y
114
+ ].join(" "),
115
+ // hide the content if using the hide middleware and should be hidden
116
+ // set visibility to hidden and disable pointer events so the UI behaves
117
+ // as if the PopperContent isn't there at all
118
+ ...((te = A.hide) == null ? void 0 : te.referenceHidden) && {
119
+ visibility: "hidden",
120
+ pointerEvents: "none"
121
+ }
122
+ },
123
+ dir: e.dir,
124
+ children: /* @__PURE__ */ p(
125
+ it,
126
+ {
127
+ scope: t,
128
+ placedSide: q,
129
+ onArrowChange: b,
130
+ arrowX: De,
131
+ arrowY: He,
132
+ shouldHideArrow: Ie,
133
+ children: /* @__PURE__ */ p(
134
+ S.div,
135
+ {
136
+ "data-side": q,
137
+ "data-align": Ne,
138
+ ...m,
139
+ ref: T,
140
+ style: {
141
+ ...m.style,
142
+ // if the PopperContent hasn't been placed yet (not all measurements done)
143
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
144
+ animation: H ? void 0 : "none"
145
+ }
146
+ }
147
+ )
148
+ }
149
+ )
150
+ }
151
+ );
152
+ }
153
+ );
154
+ fe.displayName = G;
155
+ var he = "PopperArrow", ct = {
156
+ top: "bottom",
157
+ right: "left",
158
+ bottom: "top",
159
+ left: "right"
160
+ }, ve = a.forwardRef(function(r, t) {
161
+ const { __scopePopper: o, ...n } = r, i = lt(he, o), l = ct[i.placedSide];
162
+ return (
163
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
164
+ // doesn't report size as we'd expect on SVG elements.
165
+ // it reports their bounding box which is effectively the largest path inside the SVG.
166
+ /* @__PURE__ */ p(
167
+ "span",
168
+ {
169
+ ref: i.onArrowChange,
170
+ style: {
171
+ position: "absolute",
172
+ left: i.arrowX,
173
+ top: i.arrowY,
174
+ [l]: 0,
175
+ transformOrigin: {
176
+ top: "",
177
+ right: "0 0",
178
+ bottom: "center 0",
179
+ left: "100% 0"
180
+ }[i.placedSide],
181
+ transform: {
182
+ top: "translateY(100%)",
183
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
184
+ bottom: "rotate(180deg)",
185
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
186
+ }[i.placedSide],
187
+ visibility: i.shouldHideArrow ? "hidden" : void 0
188
+ },
189
+ children: /* @__PURE__ */ p(
190
+ at,
191
+ {
192
+ ...n,
193
+ ref: t,
194
+ style: {
195
+ ...n.style,
196
+ // ensures the element can be measured correctly (mostly for if SVG)
197
+ display: "block"
198
+ }
199
+ }
200
+ )
201
+ }
202
+ )
203
+ );
204
+ });
205
+ ve.displayName = he;
206
+ function pt(e) {
207
+ return e !== null;
208
+ }
209
+ var dt = (e) => ({
210
+ name: "transformOrigin",
211
+ options: e,
212
+ fn(r) {
213
+ var y, w, x;
214
+ const { placement: t, rects: o, middlewareData: n } = r, l = ((y = n.arrow) == null ? void 0 : y.centerOffset) !== 0, h = l ? 0 : e.arrowWidth, s = l ? 0 : e.arrowHeight, [d, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], g = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + s / 2;
215
+ let v = "", m = "";
216
+ return d === "bottom" ? (v = l ? f : `${g}px`, m = `${-s}px`) : d === "top" ? (v = l ? f : `${g}px`, m = `${o.floating.height + s}px`) : d === "right" ? (v = `${-s}px`, m = l ? f : `${u}px`) : d === "left" && (v = `${o.floating.width + s}px`, m = l ? f : `${u}px`), { data: { x: v, y: m } };
217
+ }
218
+ });
219
+ function ge(e) {
220
+ const [r, t = "center"] = e.split("-");
221
+ return [r, t];
222
+ }
223
+ var ut = pe, ft = ue, ht = fe, vt = ve, gt = Object.freeze({
224
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
225
+ position: "absolute",
226
+ border: 0,
227
+ width: 1,
228
+ height: 1,
229
+ padding: 0,
230
+ margin: -1,
231
+ overflow: "hidden",
232
+ clip: "rect(0, 0, 0, 0)",
233
+ whiteSpace: "nowrap",
234
+ wordWrap: "normal"
235
+ }), mt = "VisuallyHidden", me = a.forwardRef(
236
+ (e, r) => /* @__PURE__ */ p(
237
+ S.span,
238
+ {
239
+ ...e,
240
+ ref: r,
241
+ style: { ...gt, ...e.style }
242
+ }
243
+ )
244
+ );
245
+ me.displayName = mt;
246
+ var yt = me, [M, Gt] = ae("Tooltip", [
247
+ le
248
+ ]), $ = le(), ye = "TooltipProvider", wt = 700, F = "tooltip.open", [xt, X] = M(ye), we = (e) => {
249
+ const {
250
+ __scopeTooltip: r,
251
+ delayDuration: t = wt,
252
+ skipDelayDuration: o = 300,
253
+ disableHoverableContent: n = !1,
254
+ children: i
255
+ } = e, l = a.useRef(!0), h = a.useRef(!1), s = a.useRef(0);
256
+ return a.useEffect(() => {
257
+ const d = s.current;
258
+ return () => window.clearTimeout(d);
259
+ }, []), /* @__PURE__ */ p(
260
+ xt,
261
+ {
262
+ scope: r,
263
+ isOpenDelayedRef: l,
264
+ delayDuration: t,
265
+ onOpen: a.useCallback(() => {
266
+ window.clearTimeout(s.current), l.current = !1;
267
+ }, []),
268
+ onClose: a.useCallback(() => {
269
+ window.clearTimeout(s.current), s.current = window.setTimeout(
270
+ () => l.current = !0,
271
+ o
272
+ );
273
+ }, [o]),
274
+ isPointerInTransitRef: h,
275
+ onPointerInTransitChange: a.useCallback((d) => {
276
+ h.current = d;
277
+ }, []),
278
+ disableHoverableContent: n,
279
+ children: i
280
+ }
281
+ );
282
+ };
283
+ we.displayName = ye;
284
+ var O = "Tooltip", [Ct, j] = M(O), xe = (e) => {
285
+ const {
286
+ __scopeTooltip: r,
287
+ children: t,
288
+ open: o,
289
+ defaultOpen: n,
290
+ onOpenChange: i,
291
+ disableHoverableContent: l,
292
+ delayDuration: h
293
+ } = e, s = X(O, e.__scopeTooltip), d = $(r), [c, f] = a.useState(null), g = Xe(), u = a.useRef(0), v = l ?? s.disableHoverableContent, m = h ?? s.delayDuration, y = a.useRef(!1), [w, x] = Fe({
294
+ prop: o,
295
+ defaultProp: n ?? !1,
296
+ onChange: (N) => {
297
+ N ? (s.onOpen(), document.dispatchEvent(new CustomEvent(F))) : s.onClose(), i == null || i(N);
298
+ },
299
+ caller: O
300
+ }), T = a.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
301
+ window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
302
+ }, [x]), b = a.useCallback(() => {
303
+ window.clearTimeout(u.current), u.current = 0, x(!1);
304
+ }, [x]), P = a.useCallback(() => {
305
+ window.clearTimeout(u.current), u.current = window.setTimeout(() => {
306
+ y.current = !0, x(!0), u.current = 0;
307
+ }, m);
308
+ }, [m, x]);
309
+ return a.useEffect(() => () => {
310
+ u.current && (window.clearTimeout(u.current), u.current = 0);
311
+ }, []), /* @__PURE__ */ p(ut, { ...d, children: /* @__PURE__ */ p(
312
+ Ct,
313
+ {
314
+ scope: r,
315
+ contentId: g,
316
+ open: w,
317
+ stateAttribute: T,
318
+ trigger: c,
319
+ onTriggerChange: f,
320
+ onTriggerEnter: a.useCallback(() => {
321
+ s.isOpenDelayedRef.current ? P() : C();
322
+ }, [s.isOpenDelayedRef, P, C]),
323
+ onTriggerLeave: a.useCallback(() => {
324
+ v ? b() : (window.clearTimeout(u.current), u.current = 0);
325
+ }, [b, v]),
326
+ onOpen: C,
327
+ onClose: b,
328
+ disableHoverableContent: v,
329
+ children: t
330
+ }
331
+ ) });
332
+ };
333
+ xe.displayName = O;
334
+ var W = "TooltipTrigger", Ce = a.forwardRef(
335
+ (e, r) => {
336
+ const { __scopeTooltip: t, ...o } = e, n = j(W, t), i = X(W, t), l = $(t), h = a.useRef(null), s = k(r, h, n.onTriggerChange), d = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => d.current = !1, []);
337
+ return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ p(ft, { asChild: !0, ...l, children: /* @__PURE__ */ p(
338
+ S.button,
339
+ {
340
+ "aria-describedby": n.open ? n.contentId : void 0,
341
+ "data-state": n.stateAttribute,
342
+ ...o,
343
+ ref: s,
344
+ onPointerMove: E(e.onPointerMove, (g) => {
345
+ g.pointerType !== "touch" && !c.current && !i.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
346
+ }),
347
+ onPointerLeave: E(e.onPointerLeave, () => {
348
+ n.onTriggerLeave(), c.current = !1;
349
+ }),
350
+ onPointerDown: E(e.onPointerDown, () => {
351
+ n.open && n.onClose(), d.current = !0, document.addEventListener("pointerup", f, { once: !0 });
352
+ }),
353
+ onFocus: E(e.onFocus, () => {
354
+ d.current || n.onOpen();
355
+ }),
356
+ onBlur: E(e.onBlur, n.onClose),
357
+ onClick: E(e.onClick, n.onClose)
358
+ }
359
+ ) });
360
+ }
361
+ );
362
+ Ce.displayName = W;
363
+ var Pt = "TooltipPortal", [Xt, Tt] = M(Pt, {
364
+ forceMount: void 0
365
+ }), R = "TooltipContent", Pe = a.forwardRef(
366
+ (e, r) => {
367
+ const t = Tt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...i } = e, l = j(R, e.__scopeTooltip);
368
+ return /* @__PURE__ */ p(We, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ p(Te, { side: n, ...i, ref: r }) : /* @__PURE__ */ p(bt, { side: n, ...i, ref: r }) });
369
+ }
370
+ ), bt = a.forwardRef((e, r) => {
371
+ const t = j(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), i = k(r, n), [l, h] = a.useState(null), { trigger: s, onClose: d } = t, c = n.current, { onPointerInTransitChange: f } = o, g = a.useCallback(() => {
372
+ h(null), f(!1);
373
+ }, [f]), u = a.useCallback(
374
+ (v, m) => {
375
+ const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = _t(w, y.getBoundingClientRect()), T = Ot(w, x), C = St(m.getBoundingClientRect()), b = Dt([...T, ...C]);
376
+ h(b), f(!0);
377
+ },
378
+ [f]
379
+ );
380
+ return a.useEffect(() => () => g(), [g]), a.useEffect(() => {
381
+ if (s && c) {
382
+ const v = (y) => u(y, c), m = (y) => u(y, s);
383
+ return s.addEventListener("pointerleave", v), c.addEventListener("pointerleave", m), () => {
384
+ s.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", m);
385
+ };
386
+ }
387
+ }, [s, c, u, g]), a.useEffect(() => {
388
+ if (l) {
389
+ const v = (m) => {
390
+ const y = m.target, w = { x: m.clientX, y: m.clientY }, x = (s == null ? void 0 : s.contains(y)) || (c == null ? void 0 : c.contains(y)), T = !Nt(w, l);
391
+ x ? g() : T && (g(), d());
392
+ };
393
+ return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
394
+ }
395
+ }, [s, c, l, d, g]), /* @__PURE__ */ p(Te, { ...e, ref: i });
396
+ }), [At, Et] = M(O, { isInside: !1 }), Rt = Be("TooltipContent"), Te = a.forwardRef(
397
+ (e, r) => {
398
+ const {
399
+ __scopeTooltip: t,
400
+ children: o,
401
+ "aria-label": n,
402
+ onEscapeKeyDown: i,
403
+ onPointerDownOutside: l,
404
+ ...h
405
+ } = e, s = j(R, t), d = $(t), { onClose: c } = s;
406
+ return a.useEffect(() => (document.addEventListener(F, c), () => document.removeEventListener(F, c)), [c]), a.useEffect(() => {
407
+ if (s.trigger) {
408
+ const f = (g) => {
409
+ const u = g.target;
410
+ u != null && u.contains(s.trigger) && c();
411
+ };
412
+ return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
413
+ }
414
+ }, [s.trigger, c]), /* @__PURE__ */ p(
415
+ Ve,
416
+ {
417
+ asChild: !0,
418
+ disableOutsidePointerEvents: !1,
419
+ onEscapeKeyDown: i,
420
+ onPointerDownOutside: l,
421
+ onFocusOutside: (f) => f.preventDefault(),
422
+ onDismiss: c,
423
+ children: /* @__PURE__ */ Y(
424
+ ht,
425
+ {
426
+ "data-state": s.stateAttribute,
427
+ ...d,
428
+ ...h,
429
+ ref: r,
430
+ style: {
431
+ ...h.style,
432
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
433
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
434
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
435
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
436
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
437
+ },
438
+ children: [
439
+ /* @__PURE__ */ p(Rt, { children: o }),
440
+ /* @__PURE__ */ p(At, { scope: t, isInside: !0, children: /* @__PURE__ */ p(yt, { id: s.contentId, role: "tooltip", children: n || o }) })
441
+ ]
442
+ }
443
+ )
444
+ }
445
+ );
446
+ }
447
+ );
448
+ Pe.displayName = R;
449
+ var be = "TooltipArrow", Ae = a.forwardRef(
450
+ (e, r) => {
451
+ const { __scopeTooltip: t, ...o } = e, n = $(t);
452
+ return Et(
453
+ be,
454
+ t
455
+ ).isInside ? null : /* @__PURE__ */ p(vt, { ...n, ...o, ref: r });
456
+ }
457
+ );
458
+ Ae.displayName = be;
459
+ function _t(e, r) {
460
+ const t = Math.abs(r.top - e.y), o = Math.abs(r.bottom - e.y), n = Math.abs(r.right - e.x), i = Math.abs(r.left - e.x);
461
+ switch (Math.min(t, o, n, i)) {
462
+ case i:
463
+ return "left";
464
+ case n:
465
+ return "right";
466
+ case t:
467
+ return "top";
468
+ case o:
469
+ return "bottom";
470
+ default:
471
+ throw new Error("unreachable");
472
+ }
473
+ }
474
+ function Ot(e, r, t = 5) {
475
+ const o = [];
476
+ switch (r) {
477
+ case "top":
478
+ o.push(
479
+ { x: e.x - t, y: e.y + t },
480
+ { x: e.x + t, y: e.y + t }
481
+ );
482
+ break;
483
+ case "bottom":
484
+ o.push(
485
+ { x: e.x - t, y: e.y - t },
486
+ { x: e.x + t, y: e.y - t }
487
+ );
488
+ break;
489
+ case "left":
490
+ o.push(
491
+ { x: e.x + t, y: e.y - t },
492
+ { x: e.x + t, y: e.y + t }
493
+ );
494
+ break;
495
+ case "right":
496
+ o.push(
497
+ { x: e.x - t, y: e.y - t },
498
+ { x: e.x - t, y: e.y + t }
499
+ );
500
+ break;
501
+ }
502
+ return o;
503
+ }
504
+ function St(e) {
505
+ const { top: r, right: t, bottom: o, left: n } = e;
506
+ return [
507
+ { x: n, y: r },
508
+ { x: t, y: r },
509
+ { x: t, y: o },
510
+ { x: n, y: o }
511
+ ];
512
+ }
513
+ function Nt(e, r) {
514
+ const { x: t, y: o } = e;
515
+ let n = !1;
516
+ for (let i = 0, l = r.length - 1; i < r.length; l = i++) {
517
+ const h = r[i], s = r[l], d = h.x, c = h.y, f = s.x, g = s.y;
518
+ c > o != g > o && t < (f - d) * (o - c) / (g - c) + d && (n = !n);
519
+ }
520
+ return n;
521
+ }
522
+ function Dt(e) {
523
+ const r = e.slice();
524
+ 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), Ht(r);
525
+ }
526
+ function Ht(e) {
527
+ if (e.length <= 1)
528
+ return e.slice();
529
+ const r = [];
530
+ for (let o = 0; o < e.length; o++) {
531
+ const n = e[o];
532
+ for (; r.length >= 2; ) {
533
+ const i = r[r.length - 1], l = r[r.length - 2];
534
+ if ((i.x - l.x) * (n.y - l.y) >= (i.y - l.y) * (n.x - l.x))
535
+ r.pop();
536
+ else
537
+ break;
538
+ }
539
+ r.push(n);
540
+ }
541
+ r.pop();
542
+ const t = [];
543
+ for (let o = e.length - 1; o >= 0; o--) {
544
+ const n = e[o];
545
+ for (; t.length >= 2; ) {
546
+ const i = t[t.length - 1], l = t[t.length - 2];
547
+ if ((i.x - l.x) * (n.y - l.y) >= (i.y - l.y) * (n.x - l.x))
548
+ t.pop();
549
+ else
550
+ break;
551
+ }
552
+ t.push(n);
553
+ }
554
+ 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);
555
+ }
556
+ const It = "_tooltipContent_12gjy_1", Lt = "_tooltipArrow_12gjy_8", kt = "_fadeIn_12gjy_1", ne = {
557
+ tooltipContent: It,
558
+ tooltipArrow: Lt,
559
+ fadeIn: kt
560
+ }, Vt = ot(
561
+ ({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ p(we, { children: /* @__PURE__ */ Y(xe, { delayDuration: 1e3, children: [
562
+ /* @__PURE__ */ p(Ce, { asChild: !0, children: /* @__PURE__ */ p("div", { ref: n, className: t, style: o, children: e }) }),
563
+ /* @__PURE__ */ Y(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
564
+ /* @__PURE__ */ p(Ae, { className: ne.tooltipArrow }),
565
+ /* @__PURE__ */ p("span", { children: r })
566
+ ] })
567
+ ] }) })
568
+ );
569
+ export {
570
+ Vt as default
571
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { createContext as i, useContext as s } from "react";
3
+ const o = i({
4
+ workerUrlAdded: !1
5
+ }), f = () => s(o), x = (t) => {
6
+ const { children: e, ...r } = t;
7
+ return /* @__PURE__ */ n(o.Provider, { value: r, children: e });
8
+ };
9
+ export {
10
+ o as ConfigContext,
11
+ x as ConfigContextProvider,
12
+ f as useConfigContext
13
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { createContext as f, useContext as a, useEffect as n } from "react";
3
+ import { useDarkMode as u } from "../utils/hooks/useDarkMode.js";
4
+ import { appConsole as p } from "../utils/appConsole.js";
5
+ const d = f({
6
+ darkMode: !1,
7
+ setDarkMode: (e) => {
8
+ }
9
+ }), M = () => {
10
+ const e = a(d);
11
+ return typeof (e == null ? void 0 : e.darkMode) > "u" && p.warn("Please use this hooks inside children component of RPProvider"), e;
12
+ }, v = ({
13
+ children: e,
14
+ darkMode: o,
15
+ onDarkModeChange: r
16
+ }) => {
17
+ const { darkMode: t, setDarkMode: s } = u(o);
18
+ return n(() => {
19
+ typeof o == "boolean" && s(o);
20
+ }, [o, s]), n(() => {
21
+ r && r(t);
22
+ }, [r, t]), /* @__PURE__ */ i(d.Provider, { value: { darkMode: t, setDarkMode: s }, children: e });
23
+ };
24
+ export {
25
+ d as DarkModeContext,
26
+ v as DarkModeProvider,
27
+ M as useDarkModeContext
28
+ };