@weavy/uikit-react 14.0.4 → 15.0.1

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 (360) hide show
  1. package/.vscode/settings.json +2 -0
  2. package/changelog.md +10 -0
  3. package/dist/cjs/client/WeavyClient.d.ts +1 -0
  4. package/dist/cjs/components/Attachment.d.ts +5 -5
  5. package/dist/cjs/components/Blob.d.ts +9 -0
  6. package/dist/cjs/components/Comment.d.ts +18 -0
  7. package/dist/cjs/components/CommentCount.d.ts +7 -0
  8. package/dist/cjs/components/CommentEdit.d.ts +16 -0
  9. package/dist/cjs/components/CommentPlaceholder.d.ts +8 -0
  10. package/dist/cjs/components/CommentTrashed.d.ts +15 -0
  11. package/dist/cjs/components/CommentView.d.ts +18 -0
  12. package/dist/cjs/components/Comments.d.ts +8 -0
  13. package/dist/cjs/components/ConversationListItem.d.ts +1 -1
  14. package/dist/cjs/components/Dropzone.d.ts +10 -0
  15. package/dist/cjs/components/Editor.d.ts +25 -0
  16. package/dist/cjs/components/Embed.d.ts +8 -0
  17. package/dist/cjs/components/FileItem.d.ts +41 -0
  18. package/dist/cjs/components/FileList.d.ts +11 -0
  19. package/dist/cjs/components/FileVersions.d.ts +9 -0
  20. package/dist/cjs/components/Files.d.ts +4 -0
  21. package/dist/cjs/components/Image.d.ts +3 -3
  22. package/dist/cjs/components/MeetingCard.d.ts +1 -1
  23. package/dist/cjs/components/Meetings.d.ts +2 -1
  24. package/dist/cjs/components/Poll.d.ts +8 -0
  25. package/dist/cjs/components/PollOption.d.ts +10 -0
  26. package/dist/cjs/components/Post.d.ts +21 -0
  27. package/dist/cjs/components/PostEdit.d.ts +17 -0
  28. package/dist/cjs/components/PostList.d.ts +6 -0
  29. package/dist/cjs/components/PostPlaceholder.d.ts +8 -0
  30. package/dist/cjs/components/PostTrashed.d.ts +14 -0
  31. package/dist/cjs/components/PostView.d.ts +21 -0
  32. package/dist/cjs/components/Posts.d.ts +4 -0
  33. package/dist/cjs/components/Preview.d.ts +1 -3
  34. package/dist/cjs/components/PreviewFiles.d.ts +10 -0
  35. package/dist/cjs/components/Reactions.d.ts +6 -2
  36. package/dist/cjs/components/SearchUsers.d.ts +2 -1
  37. package/dist/cjs/contexts/CloudFilesContext.d.ts +9 -0
  38. package/dist/cjs/hooks/useApps.d.ts +1 -0
  39. package/dist/cjs/hooks/useCloudFiles.d.ts +3 -0
  40. package/dist/cjs/hooks/useCommentList.d.ts +1 -0
  41. package/dist/cjs/hooks/useEmbeds.d.ts +5 -0
  42. package/dist/cjs/hooks/useFileList.d.ts +1 -0
  43. package/dist/cjs/hooks/useFileUploader.d.ts +8 -0
  44. package/dist/cjs/hooks/useFileVersions.d.ts +2 -0
  45. package/dist/cjs/hooks/useInfiniteScroll.d.ts +4 -0
  46. package/dist/cjs/hooks/useIsFirstRender.d.ts +2 -0
  47. package/dist/cjs/hooks/useMutateApps.d.ts +5 -0
  48. package/dist/cjs/hooks/useMutateComment.d.ts +10 -0
  49. package/dist/cjs/hooks/useMutateConversationName.d.ts +1 -1
  50. package/dist/cjs/hooks/useMutateDeleteReaction.d.ts +3 -1
  51. package/dist/cjs/hooks/useMutateEditComment.d.ts +10 -0
  52. package/dist/cjs/hooks/useMutateEditPost.d.ts +10 -0
  53. package/dist/cjs/hooks/useMutateExternalBlobs.d.ts +2 -2
  54. package/dist/cjs/hooks/useMutateFile.d.ts +26 -0
  55. package/dist/cjs/hooks/useMutateFileRename.d.ts +5 -0
  56. package/dist/cjs/hooks/useMutateFileSubscribe.d.ts +7 -0
  57. package/dist/cjs/hooks/useMutateFileTrash.d.ts +10 -0
  58. package/dist/cjs/hooks/useMutateFileVersion.d.ts +7 -0
  59. package/dist/cjs/hooks/useMutateFiles.d.ts +2 -0
  60. package/dist/cjs/hooks/useMutateLeaveConversation.d.ts +4 -0
  61. package/dist/cjs/hooks/useMutateMessage.d.ts +2 -2
  62. package/dist/cjs/hooks/useMutatePost.d.ts +10 -0
  63. package/dist/cjs/hooks/useMutateReaction.d.ts +3 -1
  64. package/dist/cjs/hooks/useMutateRead.d.ts +1 -1
  65. package/dist/cjs/hooks/useMutateReplaceReaction.d.ts +6 -0
  66. package/dist/cjs/hooks/useMutateRestoreComment.d.ts +5 -0
  67. package/dist/cjs/hooks/useMutateRestorePost.d.ts +4 -0
  68. package/dist/cjs/hooks/useMutateStarred.d.ts +4 -0
  69. package/dist/cjs/hooks/useMutateSubscribe.d.ts +4 -0
  70. package/dist/cjs/hooks/useMutateTrashComment.d.ts +5 -0
  71. package/dist/cjs/hooks/useMutateTrashPost.d.ts +4 -0
  72. package/dist/cjs/hooks/useMutateTyping.d.ts +2 -0
  73. package/dist/cjs/hooks/useMutateUnsubscribe.d.ts +4 -0
  74. package/dist/cjs/hooks/useMutateVote.d.ts +5 -0
  75. package/dist/cjs/hooks/usePost.d.ts +1 -0
  76. package/dist/cjs/hooks/usePosts.d.ts +1 -0
  77. package/dist/cjs/hooks/usePostsList.d.ts +1 -0
  78. package/dist/cjs/hooks/useReactionList.d.ts +1 -0
  79. package/dist/cjs/hooks/useSessionState.d.ts +2 -0
  80. package/dist/cjs/hooks/useUnload.d.ts +2 -0
  81. package/dist/cjs/hooks/useUpdateEffect.d.ts +3 -0
  82. package/dist/cjs/hooks/useVotes.d.ts +1 -0
  83. package/dist/cjs/index.d.ts +3 -1
  84. package/dist/cjs/index.js +28 -6
  85. package/dist/cjs/index.js.map +1 -1
  86. package/dist/cjs/types/ConversationListItem.d.ts +1 -0
  87. package/dist/cjs/types/Files.d.ts +7 -0
  88. package/dist/cjs/types/Message.d.ts +2 -2
  89. package/dist/cjs/types/Posts.d.ts +4 -0
  90. package/dist/cjs/types/interfaces.d.ts +9 -0
  91. package/dist/cjs/types/types.d.ts +138 -22
  92. package/dist/cjs/ui/Dropdown.d.ts +18 -2
  93. package/dist/cjs/ui/Icon.d.ts +10 -2
  94. package/dist/cjs/ui/Overlay.d.ts +3 -1
  95. package/dist/cjs/ui/Sheet.d.ts +14 -0
  96. package/dist/cjs/ui/Spinner.d.ts +2 -1
  97. package/dist/cjs/utils/cacheUtils.d.ts +14 -0
  98. package/dist/cjs/utils/fileUtilities.d.ts +10 -1
  99. package/dist/cjs/utils/mentions.d.ts +6 -0
  100. package/dist/cjs/utils/openUrl.d.ts +1 -0
  101. package/dist/css/weavy-chat.css +637 -218
  102. package/dist/css/weavy-files.css +3046 -0
  103. package/dist/css/weavy-messenger.css +643 -213
  104. package/dist/css/weavy-posts.css +2773 -0
  105. package/dist/css/weavy.css +1749 -308
  106. package/dist/esm/client/WeavyClient.d.ts +1 -0
  107. package/dist/esm/components/Attachment.d.ts +5 -5
  108. package/dist/esm/components/Blob.d.ts +9 -0
  109. package/dist/esm/components/Comment.d.ts +18 -0
  110. package/dist/esm/components/CommentCount.d.ts +7 -0
  111. package/dist/esm/components/CommentEdit.d.ts +16 -0
  112. package/dist/esm/components/CommentPlaceholder.d.ts +8 -0
  113. package/dist/esm/components/CommentTrashed.d.ts +15 -0
  114. package/dist/esm/components/CommentView.d.ts +18 -0
  115. package/dist/esm/components/Comments.d.ts +8 -0
  116. package/dist/esm/components/ConversationListItem.d.ts +1 -1
  117. package/dist/esm/components/Dropzone.d.ts +10 -0
  118. package/dist/esm/components/Editor.d.ts +25 -0
  119. package/dist/esm/components/Embed.d.ts +8 -0
  120. package/dist/esm/components/FileItem.d.ts +41 -0
  121. package/dist/esm/components/FileList.d.ts +11 -0
  122. package/dist/esm/components/FileVersions.d.ts +9 -0
  123. package/dist/esm/components/Files.d.ts +4 -0
  124. package/dist/esm/components/Image.d.ts +3 -3
  125. package/dist/esm/components/MeetingCard.d.ts +1 -1
  126. package/dist/esm/components/Meetings.d.ts +2 -1
  127. package/dist/esm/components/Poll.d.ts +8 -0
  128. package/dist/esm/components/PollOption.d.ts +10 -0
  129. package/dist/esm/components/Post.d.ts +21 -0
  130. package/dist/esm/components/PostEdit.d.ts +17 -0
  131. package/dist/esm/components/PostList.d.ts +6 -0
  132. package/dist/esm/components/PostPlaceholder.d.ts +8 -0
  133. package/dist/esm/components/PostTrashed.d.ts +14 -0
  134. package/dist/esm/components/PostView.d.ts +21 -0
  135. package/dist/esm/components/Posts.d.ts +4 -0
  136. package/dist/esm/components/Preview.d.ts +1 -3
  137. package/dist/esm/components/PreviewFiles.d.ts +10 -0
  138. package/dist/esm/components/Reactions.d.ts +6 -2
  139. package/dist/esm/components/SearchUsers.d.ts +2 -1
  140. package/dist/esm/contexts/CloudFilesContext.d.ts +9 -0
  141. package/dist/esm/hooks/useApps.d.ts +1 -0
  142. package/dist/esm/hooks/useCloudFiles.d.ts +3 -0
  143. package/dist/esm/hooks/useCommentList.d.ts +1 -0
  144. package/dist/esm/hooks/useEmbeds.d.ts +5 -0
  145. package/dist/esm/hooks/useFileList.d.ts +1 -0
  146. package/dist/esm/hooks/useFileUploader.d.ts +8 -0
  147. package/dist/esm/hooks/useFileVersions.d.ts +2 -0
  148. package/dist/esm/hooks/useInfiniteScroll.d.ts +4 -0
  149. package/dist/esm/hooks/useIsFirstRender.d.ts +2 -0
  150. package/dist/esm/hooks/useMutateApps.d.ts +5 -0
  151. package/dist/esm/hooks/useMutateComment.d.ts +10 -0
  152. package/dist/esm/hooks/useMutateConversationName.d.ts +1 -1
  153. package/dist/esm/hooks/useMutateDeleteReaction.d.ts +3 -1
  154. package/dist/esm/hooks/useMutateEditComment.d.ts +10 -0
  155. package/dist/esm/hooks/useMutateEditPost.d.ts +10 -0
  156. package/dist/esm/hooks/useMutateExternalBlobs.d.ts +2 -2
  157. package/dist/esm/hooks/useMutateFile.d.ts +26 -0
  158. package/dist/esm/hooks/useMutateFileRename.d.ts +5 -0
  159. package/dist/esm/hooks/useMutateFileSubscribe.d.ts +7 -0
  160. package/dist/esm/hooks/useMutateFileTrash.d.ts +10 -0
  161. package/dist/esm/hooks/useMutateFileVersion.d.ts +7 -0
  162. package/dist/esm/hooks/useMutateFiles.d.ts +2 -0
  163. package/dist/esm/hooks/useMutateLeaveConversation.d.ts +4 -0
  164. package/dist/esm/hooks/useMutateMessage.d.ts +2 -2
  165. package/dist/esm/hooks/useMutatePost.d.ts +10 -0
  166. package/dist/esm/hooks/useMutateReaction.d.ts +3 -1
  167. package/dist/esm/hooks/useMutateRead.d.ts +1 -1
  168. package/dist/esm/hooks/useMutateReplaceReaction.d.ts +6 -0
  169. package/dist/esm/hooks/useMutateRestoreComment.d.ts +5 -0
  170. package/dist/esm/hooks/useMutateRestorePost.d.ts +4 -0
  171. package/dist/esm/hooks/useMutateStarred.d.ts +4 -0
  172. package/dist/esm/hooks/useMutateSubscribe.d.ts +4 -0
  173. package/dist/esm/hooks/useMutateTrashComment.d.ts +5 -0
  174. package/dist/esm/hooks/useMutateTrashPost.d.ts +4 -0
  175. package/dist/esm/hooks/useMutateTyping.d.ts +2 -0
  176. package/dist/esm/hooks/useMutateUnsubscribe.d.ts +4 -0
  177. package/dist/esm/hooks/useMutateVote.d.ts +5 -0
  178. package/dist/esm/hooks/usePost.d.ts +1 -0
  179. package/dist/esm/hooks/usePosts.d.ts +1 -0
  180. package/dist/esm/hooks/usePostsList.d.ts +1 -0
  181. package/dist/esm/hooks/useReactionList.d.ts +1 -0
  182. package/dist/esm/hooks/useSessionState.d.ts +2 -0
  183. package/dist/esm/hooks/useUnload.d.ts +2 -0
  184. package/dist/esm/hooks/useUpdateEffect.d.ts +3 -0
  185. package/dist/esm/hooks/useVotes.d.ts +1 -0
  186. package/dist/esm/index.d.ts +3 -1
  187. package/dist/esm/index.js +28 -6
  188. package/dist/esm/index.js.map +1 -1
  189. package/dist/esm/types/ConversationListItem.d.ts +1 -0
  190. package/dist/esm/types/Files.d.ts +7 -0
  191. package/dist/esm/types/Message.d.ts +2 -2
  192. package/dist/esm/types/Posts.d.ts +4 -0
  193. package/dist/esm/types/interfaces.d.ts +9 -0
  194. package/dist/esm/types/types.d.ts +138 -22
  195. package/dist/esm/ui/Dropdown.d.ts +18 -2
  196. package/dist/esm/ui/Icon.d.ts +10 -2
  197. package/dist/esm/ui/Overlay.d.ts +3 -1
  198. package/dist/esm/ui/Sheet.d.ts +14 -0
  199. package/dist/esm/ui/Spinner.d.ts +2 -1
  200. package/dist/esm/utils/cacheUtils.d.ts +14 -0
  201. package/dist/esm/utils/fileUtilities.d.ts +10 -1
  202. package/dist/esm/utils/mentions.d.ts +6 -0
  203. package/dist/esm/utils/openUrl.d.ts +1 -0
  204. package/dist/index.d.ts +50 -6
  205. package/package.json +8 -2
  206. package/src/client/WeavyClient.ts +35 -1
  207. package/src/components/Attachment.tsx +20 -13
  208. package/src/components/Blob.tsx +28 -0
  209. package/src/components/Comment.tsx +43 -0
  210. package/src/components/CommentCount.tsx +15 -0
  211. package/src/components/CommentEdit.tsx +48 -0
  212. package/src/components/CommentPlaceholder.tsx +34 -0
  213. package/src/components/CommentTrashed.tsx +45 -0
  214. package/src/components/CommentView.tsx +142 -0
  215. package/src/components/Comments.tsx +78 -0
  216. package/src/components/Conversation.tsx +85 -31
  217. package/src/components/ConversationList.tsx +12 -41
  218. package/src/components/ConversationListItem.tsx +125 -74
  219. package/src/components/Dropzone.tsx +26 -0
  220. package/src/components/Editor.tsx +700 -0
  221. package/src/components/Embed.tsx +80 -0
  222. package/src/components/FileItem.tsx +391 -0
  223. package/src/components/FileList.tsx +166 -0
  224. package/src/components/FileVersions.tsx +100 -0
  225. package/src/components/Files.tsx +294 -0
  226. package/src/components/Image.tsx +11 -10
  227. package/src/components/Meeting.tsx +1 -2
  228. package/src/components/MeetingCard.tsx +1 -1
  229. package/src/components/Meetings.tsx +13 -5
  230. package/src/components/Message.tsx +14 -19
  231. package/src/components/Messages.tsx +38 -64
  232. package/src/components/NewConversation.tsx +8 -6
  233. package/src/components/PdfViewer.tsx +2 -2
  234. package/src/components/Poll.tsx +45 -0
  235. package/src/components/PollOption.tsx +65 -0
  236. package/src/components/Post.tsx +45 -0
  237. package/src/components/PostEdit.tsx +49 -0
  238. package/src/components/PostList.tsx +95 -0
  239. package/src/components/PostPlaceholder.tsx +32 -0
  240. package/src/components/PostTrashed.tsx +35 -0
  241. package/src/components/PostView.tsx +194 -0
  242. package/src/components/Posts.tsx +59 -0
  243. package/src/components/Preview.tsx +16 -23
  244. package/src/components/PreviewFiles.tsx +336 -0
  245. package/src/components/Reactions.tsx +142 -38
  246. package/src/components/SearchUsers.tsx +77 -37
  247. package/src/components/Typing.tsx +1 -1
  248. package/src/{components/FileBrowser.tsx → contexts/CloudFilesContext.tsx} +46 -30
  249. package/src/contexts/PreviewContext.tsx +102 -85
  250. package/src/contexts/WeavyContext.tsx +10 -6
  251. package/src/hooks/useApps.ts +23 -0
  252. package/src/hooks/useCloudFiles.ts +12 -0
  253. package/src/hooks/useCommentList.ts +30 -0
  254. package/src/hooks/useEmbeds.ts +126 -0
  255. package/src/hooks/useEvents.ts +3 -1
  256. package/src/hooks/useFileList.ts +84 -0
  257. package/src/hooks/useFileUploader.ts +38 -1
  258. package/src/hooks/useFileVersions.ts +20 -0
  259. package/src/hooks/useInfiniteScroll.ts +45 -0
  260. package/src/hooks/useIsFirstRender.ts +15 -0
  261. package/src/hooks/useMembers.ts +3 -3
  262. package/src/hooks/useMutateApps.ts +48 -0
  263. package/src/hooks/useMutateComment.ts +60 -0
  264. package/src/hooks/useMutateConversationName.ts +1 -1
  265. package/src/hooks/useMutateDeleteReaction.ts +17 -4
  266. package/src/hooks/useMutateEditComment.ts +63 -0
  267. package/src/hooks/useMutateEditPost.ts +64 -0
  268. package/src/hooks/useMutateExternalBlobs.ts +5 -9
  269. package/src/hooks/useMutateFile.ts +311 -0
  270. package/src/hooks/useMutateFileRename.ts +51 -0
  271. package/src/hooks/useMutateFileSubscribe.ts +80 -0
  272. package/src/hooks/useMutateFileTrash.ts +115 -0
  273. package/src/hooks/useMutateFileVersion.ts +85 -0
  274. package/src/hooks/useMutateFiles.ts +23 -0
  275. package/src/hooks/useMutateLeaveConversation.ts +38 -0
  276. package/src/hooks/useMutateMessage.ts +23 -62
  277. package/src/hooks/useMutatePost.ts +60 -0
  278. package/src/hooks/useMutateReaction.ts +21 -6
  279. package/src/hooks/useMutateRead.ts +8 -2
  280. package/src/hooks/useMutateRemoveMembers.ts +2 -9
  281. package/src/hooks/useMutateReplaceReaction.ts +59 -0
  282. package/src/hooks/useMutateRestoreComment.ts +37 -0
  283. package/src/hooks/useMutateRestorePost.ts +36 -0
  284. package/src/hooks/useMutateStarred.ts +35 -0
  285. package/src/hooks/useMutateSubscribe.ts +36 -0
  286. package/src/hooks/useMutateTrashComment.ts +37 -0
  287. package/src/hooks/useMutateTrashPost.ts +36 -0
  288. package/src/hooks/useMutateTyping.ts +5 -3
  289. package/src/hooks/useMutateUnsubscribe.ts +36 -0
  290. package/src/hooks/useMutateVote.ts +59 -0
  291. package/src/hooks/usePost.ts +20 -0
  292. package/src/hooks/usePosts.ts +21 -0
  293. package/src/hooks/usePostsList.ts +31 -0
  294. package/src/hooks/useReactionList.ts +21 -0
  295. package/src/hooks/useSearchUsers.ts +2 -2
  296. package/src/hooks/useSessionState.ts +23 -0
  297. package/src/hooks/useUnload.ts +19 -0
  298. package/src/hooks/useUpdateEffect.ts +16 -0
  299. package/src/hooks/useVotes.ts +21 -0
  300. package/src/index.ts +5 -1
  301. package/src/scss/theme/_appbar.scss +8 -4
  302. package/src/scss/theme/_card.scss +2 -0
  303. package/src/scss/theme/_comment-editor-cm.scss +5 -1
  304. package/src/scss/theme/_comments.scss +9 -8
  305. package/src/scss/theme/_conversations.scss +4 -0
  306. package/src/scss/theme/_files.scss +2 -81
  307. package/src/scss/theme/_icons.scss +21 -3
  308. package/src/scss/theme/_input.scss +13 -7
  309. package/src/scss/theme/_item.scss +23 -1
  310. package/src/scss/theme/_message-editor-cm.scss +5 -1
  311. package/src/scss/theme/_pager.scss +1 -1
  312. package/src/scss/theme/_post-editor-cm.scss +2 -2
  313. package/src/scss/theme/_post.scss +3 -10
  314. package/src/scss/theme/_preview-pdf-viewer.scss +996 -0
  315. package/src/scss/theme/_preview-pdf.scss +57 -783
  316. package/src/scss/theme/_sheet.scss +4 -1
  317. package/src/scss/theme/_spinner.scss +10 -1
  318. package/src/scss/theme/_tables.scss +2 -0
  319. package/src/scss/theme/base/_scroll.scss +3 -0
  320. package/src/scss/weavy-chat.scss +3 -1
  321. package/src/scss/weavy-files.scss +31 -0
  322. package/src/scss/weavy-messenger.scss +3 -1
  323. package/src/scss/weavy-posts.scss +35 -0
  324. package/src/scss/weavy.scss +2 -0
  325. package/src/types/ConversationListItem.ts +1 -0
  326. package/src/types/Files.ts +7 -0
  327. package/src/types/Message.ts +2 -2
  328. package/src/types/Posts.ts +4 -0
  329. package/src/types/interfaces.ts +13 -0
  330. package/src/types/types.ts +157 -28
  331. package/src/ui/Button.tsx +6 -5
  332. package/src/ui/Dropdown.tsx +67 -16
  333. package/src/ui/Icon.tsx +112 -15
  334. package/src/ui/Overlay.tsx +6 -2
  335. package/src/ui/Sheet.tsx +87 -0
  336. package/src/ui/Spinner.tsx +7 -4
  337. package/src/utils/cacheUtils.ts +246 -0
  338. package/src/utils/fileUtilities.ts +208 -24
  339. package/src/utils/infinite-scroll.js +103 -0
  340. package/src/utils/mentions.ts +50 -0
  341. package/src/utils/openUrl.ts +41 -0
  342. package/src/utils/{scrollToBottom.js → scroll-position.js} +50 -9
  343. package/src/utils/{scrollbarDetection.js → scrollbar-detection.js} +0 -0
  344. package/src/utils/utils.js +15 -1
  345. package/tsconfig.json +1 -1
  346. package/dist/cjs/components/ConversationForm.d.ts +0 -7
  347. package/dist/cjs/components/File.d.ts +0 -9
  348. package/dist/cjs/components/FileBrowser.d.ts +0 -6
  349. package/dist/cjs/hooks/usePreview.d.ts +0 -4
  350. package/dist/cjs/hooks/useReactions.d.ts +0 -3
  351. package/dist/esm/components/ConversationForm.d.ts +0 -7
  352. package/dist/esm/components/File.d.ts +0 -9
  353. package/dist/esm/components/FileBrowser.d.ts +0 -6
  354. package/dist/esm/hooks/usePreview.d.ts +0 -4
  355. package/dist/esm/hooks/useReactions.d.ts +0 -3
  356. package/src/components/ConversationForm.tsx +0 -210
  357. package/src/components/File.tsx +0 -21
  358. package/src/hooks/usePreview.ts +0 -21
  359. package/src/hooks/useReactions.ts +0 -51
  360. package/src/utils/infiniteScroll.js +0 -184
@@ -0,0 +1,996 @@
1
+ /* Copyright 2014 Mozilla Foundation
2
+ *
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ // CSS from pdfjs-dist/web/pdf_viewer.css
17
+ // - Disable any images.
18
+ // - Move any :root {} selectors out of this file so they're not scoped by a selector.
19
+
20
+ .textLayer {
21
+ position: absolute;
22
+ text-align: initial;
23
+ left: 0;
24
+ top: 0;
25
+ right: 0;
26
+ bottom: 0;
27
+ overflow: hidden;
28
+ opacity: 0.25;
29
+ line-height: 1;
30
+ -webkit-text-size-adjust: none;
31
+ -moz-text-size-adjust: none;
32
+ text-size-adjust: none;
33
+ forced-color-adjust: none;
34
+ }
35
+
36
+ .textLayer span,
37
+ .textLayer br {
38
+ color: transparent;
39
+ position: absolute;
40
+ white-space: pre;
41
+ cursor: text;
42
+ transform-origin: 0% 0%;
43
+ }
44
+
45
+ /* Only necessary in Google Chrome, see issue 14205, and most unfortunately
46
+ * the problem doesn't show up in "text" reference tests. */
47
+ .textLayer span.markedContent {
48
+ top: 0;
49
+ height: 0;
50
+ }
51
+
52
+ .textLayer .highlight {
53
+ margin: -1px;
54
+ padding: 1px;
55
+ background-color: rgba(180, 0, 170, 1);
56
+ border-radius: 4px;
57
+ }
58
+
59
+ .textLayer .highlight.appended {
60
+ position: initial;
61
+ }
62
+
63
+ .textLayer .highlight.begin {
64
+ border-radius: 4px 0 0 4px;
65
+ }
66
+
67
+ .textLayer .highlight.end {
68
+ border-radius: 0 4px 4px 0;
69
+ }
70
+
71
+ .textLayer .highlight.middle {
72
+ border-radius: 0;
73
+ }
74
+
75
+ .textLayer .highlight.selected {
76
+ background-color: rgba(0, 100, 0, 1);
77
+ }
78
+
79
+ .textLayer ::-moz-selection {
80
+ background: blue;
81
+ background: AccentColor;
82
+ }
83
+
84
+ .textLayer ::selection {
85
+ background: blue;
86
+ background: AccentColor;
87
+ }
88
+
89
+ /* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
90
+ .textLayer br::-moz-selection {
91
+ background: transparent;
92
+ }
93
+ .textLayer br::selection {
94
+ background: transparent;
95
+ }
96
+
97
+ .textLayer .endOfContent {
98
+ display: block;
99
+ position: absolute;
100
+ left: 0;
101
+ top: 100%;
102
+ right: 0;
103
+ bottom: 0;
104
+ z-index: -1;
105
+ cursor: default;
106
+ -webkit-user-select: none;
107
+ -moz-user-select: none;
108
+ user-select: none;
109
+ }
110
+
111
+ .textLayer .endOfContent.active {
112
+ top: 0;
113
+ }
114
+
115
+ @media (forced-colors: active) {
116
+ .annotationLayer .textWidgetAnnotation input:required,
117
+ .annotationLayer .textWidgetAnnotation textarea:required,
118
+ .annotationLayer .choiceWidgetAnnotation select:required,
119
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:required,
120
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:required {
121
+ outline: 1.5px solid selectedItem;
122
+ }
123
+ }
124
+
125
+ .annotationLayer {
126
+ position: absolute;
127
+ top: 0;
128
+ left: 0;
129
+ pointer-events: none;
130
+ transform-origin: 0 0;
131
+ }
132
+
133
+ .annotationLayer section {
134
+ position: absolute;
135
+ text-align: initial;
136
+ pointer-events: auto;
137
+ box-sizing: border-box;
138
+ transform-origin: 0 0;
139
+ }
140
+
141
+ .annotationLayer .linkAnnotation > a,
142
+ .annotationLayer .buttonWidgetAnnotation.pushButton > a {
143
+ position: absolute;
144
+ font-size: 1em;
145
+ top: 0;
146
+ left: 0;
147
+ width: 100%;
148
+ height: 100%;
149
+ }
150
+
151
+ .annotationLayer .buttonWidgetAnnotation.pushButton > canvas {
152
+ width: 100%;
153
+ height: 100%;
154
+ }
155
+
156
+ .annotationLayer .linkAnnotation > a:hover,
157
+ .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
158
+ opacity: 0.2;
159
+ background: rgba(255, 255, 0, 1);
160
+ box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
161
+ }
162
+
163
+ .annotationLayer .textAnnotation img {
164
+ position: absolute;
165
+ cursor: pointer;
166
+ width: 100%;
167
+ height: 100%;
168
+ }
169
+
170
+ .annotationLayer .textWidgetAnnotation input,
171
+ .annotationLayer .textWidgetAnnotation textarea,
172
+ .annotationLayer .choiceWidgetAnnotation select,
173
+ .annotationLayer .buttonWidgetAnnotation.checkBox input,
174
+ .annotationLayer .buttonWidgetAnnotation.radioButton input {
175
+ background-image: var(--annotation-unfocused-field-background);
176
+ border: 2px solid var(--input-unfocused-border-color);
177
+ box-sizing: border-box;
178
+ font: calc(9px * var(--scale-factor)) sans-serif;
179
+ height: 100%;
180
+ margin: 0;
181
+ vertical-align: top;
182
+ width: 100%;
183
+ }
184
+
185
+ .annotationLayer .textWidgetAnnotation input:required,
186
+ .annotationLayer .textWidgetAnnotation textarea:required,
187
+ .annotationLayer .choiceWidgetAnnotation select:required,
188
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:required,
189
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:required {
190
+ outline: 1.5px solid red;
191
+ }
192
+
193
+ .annotationLayer .choiceWidgetAnnotation select option {
194
+ padding: 0;
195
+ }
196
+
197
+ .annotationLayer .buttonWidgetAnnotation.radioButton input {
198
+ border-radius: 50%;
199
+ }
200
+
201
+ .annotationLayer .textWidgetAnnotation textarea {
202
+ resize: none;
203
+ }
204
+
205
+ .annotationLayer .textWidgetAnnotation input[disabled],
206
+ .annotationLayer .textWidgetAnnotation textarea[disabled],
207
+ .annotationLayer .choiceWidgetAnnotation select[disabled],
208
+ .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
209
+ .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
210
+ background: none;
211
+ border: 2px solid var(--input-disabled-border-color);
212
+ cursor: not-allowed;
213
+ }
214
+
215
+ .annotationLayer .textWidgetAnnotation input:hover,
216
+ .annotationLayer .textWidgetAnnotation textarea:hover,
217
+ .annotationLayer .choiceWidgetAnnotation select:hover,
218
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
219
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
220
+ border: 2px solid var(--input-hover-border-color);
221
+ }
222
+ .annotationLayer .textWidgetAnnotation input:hover,
223
+ .annotationLayer .textWidgetAnnotation textarea:hover,
224
+ .annotationLayer .choiceWidgetAnnotation select:hover,
225
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:hover {
226
+ border-radius: 2px;
227
+ }
228
+
229
+ .annotationLayer .textWidgetAnnotation input:focus,
230
+ .annotationLayer .textWidgetAnnotation textarea:focus,
231
+ .annotationLayer .choiceWidgetAnnotation select:focus {
232
+ background: none;
233
+ border: 2px solid var(--input-focus-border-color);
234
+ border-radius: 2px;
235
+ outline: var(--input-focus-outline);
236
+ }
237
+
238
+ .annotationLayer .buttonWidgetAnnotation.checkBox :focus,
239
+ .annotationLayer .buttonWidgetAnnotation.radioButton :focus {
240
+ background-image: none;
241
+ background-color: transparent;
242
+ }
243
+
244
+ .annotationLayer .buttonWidgetAnnotation.checkBox :focus {
245
+ border: 2px solid var(--input-focus-border-color);
246
+ border-radius: 2px;
247
+ outline: var(--input-focus-outline);
248
+ }
249
+
250
+ .annotationLayer .buttonWidgetAnnotation.radioButton :focus {
251
+ border: 2px solid var(--input-focus-border-color);
252
+ outline: var(--input-focus-outline);
253
+ }
254
+
255
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
256
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
257
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
258
+ background-color: CanvasText;
259
+ content: "";
260
+ display: block;
261
+ position: absolute;
262
+ }
263
+
264
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
265
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
266
+ height: 80%;
267
+ left: 45%;
268
+ width: 1px;
269
+ }
270
+
271
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
272
+ transform: rotate(45deg);
273
+ }
274
+
275
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
276
+ transform: rotate(-45deg);
277
+ }
278
+
279
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
280
+ border-radius: 50%;
281
+ height: 50%;
282
+ left: 30%;
283
+ top: 20%;
284
+ width: 50%;
285
+ }
286
+
287
+ .annotationLayer .textWidgetAnnotation input.comb {
288
+ font-family: monospace;
289
+ padding-left: 2px;
290
+ padding-right: 0;
291
+ }
292
+
293
+ .annotationLayer .textWidgetAnnotation input.comb:focus {
294
+ /*
295
+ * Letter spacing is placed on the right side of each character. Hence, the
296
+ * letter spacing of the last character may be placed outside the visible
297
+ * area, causing horizontal scrolling. We avoid this by extending the width
298
+ * when the element has focus and revert this when it loses focus.
299
+ */
300
+ width: 103%;
301
+ }
302
+
303
+ .annotationLayer .buttonWidgetAnnotation.checkBox input,
304
+ .annotationLayer .buttonWidgetAnnotation.radioButton input {
305
+ -webkit-appearance: none;
306
+ -moz-appearance: none;
307
+ appearance: none;
308
+ }
309
+
310
+ .annotationLayer .popupTriggerArea {
311
+ height: 100%;
312
+ width: 100%;
313
+ }
314
+
315
+ .annotationLayer .popupWrapper {
316
+ position: absolute;
317
+ font-size: calc(9px * var(--scale-factor));
318
+ width: 100%;
319
+ min-width: calc(180px * var(--scale-factor));
320
+ pointer-events: none;
321
+ }
322
+
323
+ .annotationLayer .popup {
324
+ position: absolute;
325
+ max-width: calc(180px * var(--scale-factor));
326
+ background-color: rgba(255, 255, 153, 1);
327
+ box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))
328
+ rgba(136, 136, 136, 1);
329
+ border-radius: calc(2px * var(--scale-factor));
330
+ padding: calc(6px * var(--scale-factor));
331
+ margin-left: calc(5px * var(--scale-factor));
332
+ cursor: pointer;
333
+ font: message-box;
334
+ white-space: normal;
335
+ word-wrap: break-word;
336
+ pointer-events: auto;
337
+ }
338
+
339
+ .annotationLayer .popup > * {
340
+ font-size: calc(9px * var(--scale-factor));
341
+ }
342
+
343
+ .annotationLayer .popup h1 {
344
+ display: inline-block;
345
+ }
346
+
347
+ .annotationLayer .popupDate {
348
+ display: inline-block;
349
+ margin-left: calc(5px * var(--scale-factor));
350
+ }
351
+
352
+ .annotationLayer .popupContent {
353
+ border-top: 1px solid rgba(51, 51, 51, 1);
354
+ margin-top: calc(2px * var(--scale-factor));
355
+ padding-top: calc(2px * var(--scale-factor));
356
+ }
357
+
358
+ .annotationLayer .richText > * {
359
+ white-space: pre-wrap;
360
+ font-size: calc(9px * var(--scale-factor));
361
+ }
362
+
363
+ .annotationLayer .highlightAnnotation,
364
+ .annotationLayer .underlineAnnotation,
365
+ .annotationLayer .squigglyAnnotation,
366
+ .annotationLayer .strikeoutAnnotation,
367
+ .annotationLayer .freeTextAnnotation,
368
+ .annotationLayer .lineAnnotation svg line,
369
+ .annotationLayer .squareAnnotation svg rect,
370
+ .annotationLayer .circleAnnotation svg ellipse,
371
+ .annotationLayer .polylineAnnotation svg polyline,
372
+ .annotationLayer .polygonAnnotation svg polygon,
373
+ .annotationLayer .caretAnnotation,
374
+ .annotationLayer .inkAnnotation svg polyline,
375
+ .annotationLayer .stampAnnotation,
376
+ .annotationLayer .fileAttachmentAnnotation {
377
+ cursor: pointer;
378
+ }
379
+
380
+ .annotationLayer section svg {
381
+ position: absolute;
382
+ width: 100%;
383
+ height: 100%;
384
+ }
385
+
386
+ .annotationLayer .annotationTextContent {
387
+ position: absolute;
388
+ width: 100%;
389
+ height: 100%;
390
+ opacity: 0;
391
+ color: transparent;
392
+ -webkit-user-select: none;
393
+ -moz-user-select: none;
394
+ user-select: none;
395
+ pointer-events: none;
396
+ }
397
+
398
+ .annotationLayer .annotationTextContent span {
399
+ width: 100%;
400
+ display: inline-block;
401
+ }
402
+
403
+ @media (forced-colors: active) {
404
+ .xfaLayer *:required {
405
+ outline: 1.5px solid selectedItem;
406
+ }
407
+ }
408
+
409
+ .xfaLayer {
410
+ background-color: transparent;
411
+ }
412
+
413
+ .xfaLayer .highlight {
414
+ margin: -1px;
415
+ padding: 1px;
416
+ background-color: rgba(239, 203, 237, 1);
417
+ border-radius: 4px;
418
+ }
419
+
420
+ .xfaLayer .highlight.appended {
421
+ position: initial;
422
+ }
423
+
424
+ .xfaLayer .highlight.begin {
425
+ border-radius: 4px 0 0 4px;
426
+ }
427
+
428
+ .xfaLayer .highlight.end {
429
+ border-radius: 0 4px 4px 0;
430
+ }
431
+
432
+ .xfaLayer .highlight.middle {
433
+ border-radius: 0;
434
+ }
435
+
436
+ .xfaLayer .highlight.selected {
437
+ background-color: rgba(203, 223, 203, 1);
438
+ }
439
+
440
+ .xfaPage {
441
+ overflow: hidden;
442
+ position: relative;
443
+ }
444
+
445
+ .xfaContentarea {
446
+ position: absolute;
447
+ }
448
+
449
+ .xfaPrintOnly {
450
+ display: none;
451
+ }
452
+
453
+ .xfaLayer {
454
+ position: absolute;
455
+ text-align: initial;
456
+ top: 0;
457
+ left: 0;
458
+ transform-origin: 0 0;
459
+ line-height: 1.2;
460
+ }
461
+
462
+ .xfaLayer * {
463
+ color: inherit;
464
+ font: inherit;
465
+ font-style: inherit;
466
+ font-weight: inherit;
467
+ font-kerning: inherit;
468
+ letter-spacing: -0.01px;
469
+ text-align: inherit;
470
+ text-decoration: inherit;
471
+ box-sizing: border-box;
472
+ background-color: transparent;
473
+ padding: 0;
474
+ margin: 0;
475
+ pointer-events: auto;
476
+ line-height: inherit;
477
+ }
478
+
479
+ .xfaLayer *:required {
480
+ outline: 1.5px solid red;
481
+ }
482
+
483
+ .xfaLayer div {
484
+ pointer-events: none;
485
+ }
486
+
487
+ .xfaLayer svg {
488
+ pointer-events: none;
489
+ }
490
+
491
+ .xfaLayer svg * {
492
+ pointer-events: none;
493
+ }
494
+
495
+ .xfaLayer a {
496
+ color: blue;
497
+ }
498
+
499
+ .xfaRich li {
500
+ margin-left: 3em;
501
+ }
502
+
503
+ .xfaFont {
504
+ color: black;
505
+ font-weight: normal;
506
+ font-kerning: none;
507
+ font-size: 10px;
508
+ font-style: normal;
509
+ letter-spacing: 0;
510
+ text-decoration: none;
511
+ vertical-align: 0;
512
+ }
513
+
514
+ .xfaCaption {
515
+ overflow: hidden;
516
+ flex: 0 0 auto;
517
+ }
518
+
519
+ .xfaCaptionForCheckButton {
520
+ overflow: hidden;
521
+ flex: 1 1 auto;
522
+ }
523
+
524
+ .xfaLabel {
525
+ height: 100%;
526
+ width: 100%;
527
+ }
528
+
529
+ .xfaLeft {
530
+ display: flex;
531
+ flex-direction: row;
532
+ align-items: center;
533
+ }
534
+
535
+ .xfaRight {
536
+ display: flex;
537
+ flex-direction: row-reverse;
538
+ align-items: center;
539
+ }
540
+
541
+ .xfaLeft > .xfaCaption,
542
+ .xfaLeft > .xfaCaptionForCheckButton,
543
+ .xfaRight > .xfaCaption,
544
+ .xfaRight > .xfaCaptionForCheckButton {
545
+ max-height: 100%;
546
+ }
547
+
548
+ .xfaTop {
549
+ display: flex;
550
+ flex-direction: column;
551
+ align-items: flex-start;
552
+ }
553
+
554
+ .xfaBottom {
555
+ display: flex;
556
+ flex-direction: column-reverse;
557
+ align-items: flex-start;
558
+ }
559
+
560
+ .xfaTop > .xfaCaption,
561
+ .xfaTop > .xfaCaptionForCheckButton,
562
+ .xfaBottom > .xfaCaption,
563
+ .xfaBottom > .xfaCaptionForCheckButton {
564
+ width: 100%;
565
+ }
566
+
567
+ .xfaBorder {
568
+ background-color: transparent;
569
+ position: absolute;
570
+ pointer-events: none;
571
+ }
572
+
573
+ .xfaWrapped {
574
+ width: 100%;
575
+ height: 100%;
576
+ }
577
+
578
+ .xfaTextfield:focus,
579
+ .xfaSelect:focus {
580
+ background-image: none;
581
+ background-color: transparent;
582
+ outline: var(--xfa-focus-outline);
583
+ outline-offset: -1px;
584
+ }
585
+
586
+ .xfaCheckbox:focus,
587
+ .xfaRadio:focus {
588
+ outline: var(--xfa-focus-outline);
589
+ }
590
+
591
+ .xfaTextfield,
592
+ .xfaSelect {
593
+ height: 100%;
594
+ width: 100%;
595
+ flex: 1 1 auto;
596
+ border: none;
597
+ resize: none;
598
+ background-image: var(--xfa-unfocused-field-background);
599
+ }
600
+
601
+ .xfaSelect {
602
+ padding-left: 2px;
603
+ padding-right: 2px;
604
+ padding-inline: 2px;
605
+ }
606
+
607
+ .xfaTop > .xfaTextfield,
608
+ .xfaTop > .xfaSelect,
609
+ .xfaBottom > .xfaTextfield,
610
+ .xfaBottom > .xfaSelect {
611
+ flex: 0 1 auto;
612
+ }
613
+
614
+ .xfaButton {
615
+ cursor: pointer;
616
+ width: 100%;
617
+ height: 100%;
618
+ border: none;
619
+ text-align: center;
620
+ }
621
+
622
+ .xfaLink {
623
+ width: 100%;
624
+ height: 100%;
625
+ position: absolute;
626
+ top: 0;
627
+ left: 0;
628
+ }
629
+
630
+ .xfaCheckbox,
631
+ .xfaRadio {
632
+ width: 100%;
633
+ height: 100%;
634
+ flex: 0 0 auto;
635
+ border: none;
636
+ }
637
+
638
+ .xfaRich {
639
+ white-space: pre-wrap;
640
+ width: 100%;
641
+ height: 100%;
642
+ }
643
+
644
+ .xfaImage {
645
+ -o-object-position: left top;
646
+ object-position: left top;
647
+ -o-object-fit: contain;
648
+ object-fit: contain;
649
+ width: 100%;
650
+ height: 100%;
651
+ }
652
+
653
+ .xfaLrTb,
654
+ .xfaRlTb,
655
+ .xfaTb {
656
+ display: flex;
657
+ flex-direction: column;
658
+ align-items: stretch;
659
+ }
660
+
661
+ .xfaLr {
662
+ display: flex;
663
+ flex-direction: row;
664
+ align-items: stretch;
665
+ }
666
+
667
+ .xfaRl {
668
+ display: flex;
669
+ flex-direction: row-reverse;
670
+ align-items: stretch;
671
+ }
672
+
673
+ .xfaTb > div {
674
+ justify-content: left;
675
+ }
676
+
677
+ .xfaPosition {
678
+ position: relative;
679
+ }
680
+
681
+ .xfaArea {
682
+ position: relative;
683
+ }
684
+
685
+ .xfaValignMiddle {
686
+ display: flex;
687
+ align-items: center;
688
+ }
689
+
690
+ .xfaTable {
691
+ display: flex;
692
+ flex-direction: column;
693
+ align-items: stretch;
694
+ }
695
+
696
+ .xfaTable .xfaRow {
697
+ display: flex;
698
+ flex-direction: row;
699
+ align-items: stretch;
700
+ }
701
+
702
+ .xfaTable .xfaRlRow {
703
+ display: flex;
704
+ flex-direction: row-reverse;
705
+ align-items: stretch;
706
+ flex: 1;
707
+ }
708
+
709
+ .xfaTable .xfaRlRow > div {
710
+ flex: 1;
711
+ }
712
+
713
+ .xfaNonInteractive input,
714
+ .xfaNonInteractive textarea,
715
+ .xfaDisabled input,
716
+ .xfaDisabled textarea,
717
+ .xfaReadOnly input,
718
+ .xfaReadOnly textarea {
719
+ background: initial;
720
+ }
721
+
722
+ @media print {
723
+ .xfaTextfield,
724
+ .xfaSelect {
725
+ background: transparent;
726
+ }
727
+
728
+ .xfaSelect {
729
+ -webkit-appearance: none;
730
+ -moz-appearance: none;
731
+ appearance: none;
732
+ text-indent: 1px;
733
+ text-overflow: "";
734
+ }
735
+ }
736
+
737
+ [data-editor-rotation="90"] {
738
+ transform: rotate(90deg);
739
+ }
740
+ [data-editor-rotation="180"] {
741
+ transform: rotate(180deg);
742
+ }
743
+ [data-editor-rotation="270"] {
744
+ transform: rotate(270deg);
745
+ }
746
+
747
+ .annotationEditorLayer {
748
+ background: transparent;
749
+ position: absolute;
750
+ top: 0;
751
+ left: 0;
752
+ font-size: calc(100px * var(--scale-factor));
753
+ transform-origin: 0 0;
754
+ cursor: auto;
755
+ z-index: 20000;
756
+ }
757
+
758
+ .annotationEditorLayer.freeTextEditing {
759
+ cursor: var(--editorFreeText-editing-cursor);
760
+ }
761
+
762
+ .annotationEditorLayer.inkEditing {
763
+ cursor: var(--editorInk-editing-cursor);
764
+ }
765
+
766
+ .annotationEditorLayer .selectedEditor {
767
+ outline: var(--focus-outline);
768
+ resize: none;
769
+ }
770
+
771
+ .annotationEditorLayer .freeTextEditor {
772
+ position: absolute;
773
+ background: transparent;
774
+ border-radius: 3px;
775
+ padding: calc(var(--freetext-padding) * var(--scale-factor));
776
+ resize: none;
777
+ width: auto;
778
+ height: auto;
779
+ z-index: 1;
780
+ transform-origin: 0 0;
781
+ touch-action: none;
782
+ cursor: auto;
783
+ }
784
+
785
+ .annotationEditorLayer .freeTextEditor .internal {
786
+ background: transparent;
787
+ border: none;
788
+ top: 0;
789
+ left: 0;
790
+ overflow: visible;
791
+ white-space: nowrap;
792
+ resize: none;
793
+ font: 10px sans-serif;
794
+ line-height: var(--freetext-line-height);
795
+ }
796
+
797
+ .annotationEditorLayer .freeTextEditor .overlay {
798
+ position: absolute;
799
+ display: none;
800
+ background: transparent;
801
+ top: 0;
802
+ left: 0;
803
+ width: 100%;
804
+ height: 100%;
805
+ }
806
+
807
+ .annotationEditorLayer .freeTextEditor .overlay.enabled {
808
+ display: block;
809
+ }
810
+
811
+ .annotationEditorLayer .freeTextEditor .internal:empty::before {
812
+ content: attr(default-content);
813
+ color: gray;
814
+ }
815
+
816
+ .annotationEditorLayer .freeTextEditor .internal:focus {
817
+ outline: none;
818
+ }
819
+
820
+ .annotationEditorLayer .inkEditor.disabled {
821
+ resize: none;
822
+ }
823
+
824
+ .annotationEditorLayer .inkEditor.disabled.selectedEditor {
825
+ resize: horizontal;
826
+ }
827
+
828
+ .annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),
829
+ .annotationEditorLayer .inkEditor:hover:not(.selectedEditor) {
830
+ outline: var(--hover-outline);
831
+ }
832
+
833
+ .annotationEditorLayer .inkEditor {
834
+ position: absolute;
835
+ background: transparent;
836
+ border-radius: 3px;
837
+ overflow: auto;
838
+ width: 100%;
839
+ height: 100%;
840
+ z-index: 1;
841
+ transform-origin: 0 0;
842
+ cursor: auto;
843
+ }
844
+
845
+ .annotationEditorLayer .inkEditor.editing {
846
+ resize: none;
847
+ cursor: inherit;
848
+ }
849
+
850
+ .annotationEditorLayer .inkEditor .inkEditorCanvas {
851
+ position: absolute;
852
+ top: 0;
853
+ left: 0;
854
+ width: 100%;
855
+ height: 100%;
856
+ touch-action: none;
857
+ }
858
+
859
+ [data-main-rotation="90"] {
860
+ transform: rotate(90deg) translateY(-100%);
861
+ }
862
+ [data-main-rotation="180"] {
863
+ transform: rotate(180deg) translate(-100%, -100%);
864
+ }
865
+ [data-main-rotation="270"] {
866
+ transform: rotate(270deg) translateX(-100%);
867
+ }
868
+
869
+ .pdfViewer {
870
+ padding-bottom: var(--pdfViewer-padding-bottom);
871
+ }
872
+
873
+ .pdfViewer .canvasWrapper {
874
+ overflow: hidden;
875
+ }
876
+
877
+ .pdfViewer .page {
878
+ direction: ltr;
879
+ width: 816px;
880
+ height: 1056px;
881
+ margin: var(--page-margin);
882
+ position: relative;
883
+ overflow: visible;
884
+ border: var(--page-border);
885
+ -o-border-image: var(--page-border-image);
886
+ border-image: var(--page-border-image);
887
+ background-clip: content-box;
888
+ background-color: rgba(255, 255, 255, 1);
889
+ }
890
+
891
+ .pdfViewer .dummyPage {
892
+ position: relative;
893
+ width: 0;
894
+ height: var(--viewer-container-height);
895
+ }
896
+
897
+ .pdfViewer.removePageBorders .page {
898
+ margin: 0 auto 10px;
899
+ border: none;
900
+ }
901
+
902
+ .pdfViewer.singlePageView {
903
+ display: inline-block;
904
+ }
905
+
906
+ .pdfViewer.singlePageView .page {
907
+ margin: 0;
908
+ border: none;
909
+ }
910
+
911
+ .pdfViewer.scrollHorizontal,
912
+ .pdfViewer.scrollWrapped,
913
+ .spread {
914
+ margin-left: 3.5px;
915
+ margin-right: 3.5px;
916
+ text-align: center;
917
+ }
918
+
919
+ .pdfViewer.scrollHorizontal,
920
+ .spread {
921
+ white-space: nowrap;
922
+ }
923
+
924
+ .pdfViewer.removePageBorders,
925
+ .pdfViewer.scrollHorizontal .spread,
926
+ .pdfViewer.scrollWrapped .spread {
927
+ margin-left: 0;
928
+ margin-right: 0;
929
+ }
930
+
931
+ .spread .page,
932
+ .spread .dummyPage,
933
+ .pdfViewer.scrollHorizontal .page,
934
+ .pdfViewer.scrollWrapped .page,
935
+ .pdfViewer.scrollHorizontal .spread,
936
+ .pdfViewer.scrollWrapped .spread {
937
+ display: inline-block;
938
+ vertical-align: middle;
939
+ }
940
+
941
+ .spread .page,
942
+ .pdfViewer.scrollHorizontal .page,
943
+ .pdfViewer.scrollWrapped .page {
944
+ margin-left: var(--spreadHorizontalWrapped-margin-LR);
945
+ margin-right: var(--spreadHorizontalWrapped-margin-LR);
946
+ }
947
+
948
+ .pdfViewer.removePageBorders .spread .page,
949
+ .pdfViewer.removePageBorders.scrollHorizontal .page,
950
+ .pdfViewer.removePageBorders.scrollWrapped .page {
951
+ margin-left: 5px;
952
+ margin-right: 5px;
953
+ }
954
+
955
+ .pdfViewer .page canvas {
956
+ margin: 0;
957
+ display: block;
958
+ }
959
+
960
+ .pdfViewer .page canvas[hidden] {
961
+ display: none;
962
+ }
963
+
964
+ .pdfViewer .page .loadingIcon {
965
+ position: absolute;
966
+ display: block;
967
+ left: 0;
968
+ top: 0;
969
+ right: 0;
970
+ bottom: 0;
971
+ //background: url("images/loading-icon.gif") center no-repeat;
972
+ }
973
+ .pdfViewer .page .loadingIcon.notVisible {
974
+ background: none;
975
+ }
976
+
977
+ .pdfViewer.enablePermissions .textLayer span {
978
+ -webkit-user-select: none !important;
979
+ -moz-user-select: none !important;
980
+ user-select: none !important;
981
+ cursor: not-allowed;
982
+ }
983
+
984
+ .pdfPresentationMode .pdfViewer {
985
+ padding-bottom: 0;
986
+ }
987
+
988
+ .pdfPresentationMode .spread {
989
+ margin: 0;
990
+ }
991
+
992
+ .pdfPresentationMode .pdfViewer .page {
993
+ margin: 0 auto;
994
+ border: 2px solid transparent;
995
+ }
996
+