@docmentis/udoc-viewer 0.7.19 → 0.8.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 (386) hide show
  1. package/API-COMPARISON.md +441 -0
  2. package/LICENSE-APACHE +202 -0
  3. package/LICENSE-MIT +21 -0
  4. package/README.md +23 -1220
  5. package/dist/index.d.ts +40 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +52 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/version.d.ts +2 -0
  10. package/dist/version.d.ts.map +1 -0
  11. package/dist/version.js +7 -0
  12. package/dist/version.js.map +1 -0
  13. package/dist/worker/worker-source.d.ts +3 -0
  14. package/dist/worker/worker-source.d.ts.map +1 -0
  15. package/dist/worker/worker-source.js +11 -0
  16. package/dist/worker/worker.d.ts +2 -0
  17. package/dist/worker/worker.d.ts.map +1 -0
  18. package/dist/worker/worker.js +5 -0
  19. package/dist/worker/worker.js.map +1 -0
  20. package/package.json +48 -59
  21. package/dist/package.json +0 -79
  22. package/dist/src/UDocClient.d.ts +0 -730
  23. package/dist/src/UDocClient.d.ts.map +0 -1
  24. package/dist/src/UDocClient.js +0 -649
  25. package/dist/src/UDocClient.js.map +0 -1
  26. package/dist/src/UDocViewer.d.ts +0 -883
  27. package/dist/src/UDocViewer.d.ts.map +0 -1
  28. package/dist/src/UDocViewer.js +0 -2180
  29. package/dist/src/UDocViewer.js.map +0 -1
  30. package/dist/src/fonts.d.ts +0 -47
  31. package/dist/src/fonts.d.ts.map +0 -1
  32. package/dist/src/fonts.js +0 -49
  33. package/dist/src/fonts.js.map +0 -1
  34. package/dist/src/index.d.ts +0 -13
  35. package/dist/src/index.d.ts.map +0 -1
  36. package/dist/src/index.js +0 -5
  37. package/dist/src/index.js.map +0 -1
  38. package/dist/src/meta-url.d.ts +0 -2
  39. package/dist/src/meta-url.d.ts.map +0 -1
  40. package/dist/src/meta-url.js +0 -10
  41. package/dist/src/meta-url.js.map +0 -1
  42. package/dist/src/performance/PerformanceCounter.d.ts +0 -132
  43. package/dist/src/performance/PerformanceCounter.d.ts.map +0 -1
  44. package/dist/src/performance/PerformanceCounter.js +0 -129
  45. package/dist/src/performance/PerformanceCounter.js.map +0 -1
  46. package/dist/src/performance/index.d.ts +0 -2
  47. package/dist/src/performance/index.d.ts.map +0 -1
  48. package/dist/src/performance/index.js +0 -2
  49. package/dist/src/performance/index.js.map +0 -1
  50. package/dist/src/ui/framework/component.d.ts +0 -68
  51. package/dist/src/ui/framework/component.d.ts.map +0 -1
  52. package/dist/src/ui/framework/component.js +0 -97
  53. package/dist/src/ui/framework/component.js.map +0 -1
  54. package/dist/src/ui/framework/dom.d.ts +0 -19
  55. package/dist/src/ui/framework/dom.d.ts.map +0 -1
  56. package/dist/src/ui/framework/dom.js +0 -29
  57. package/dist/src/ui/framework/dom.js.map +0 -1
  58. package/dist/src/ui/framework/events.d.ts +0 -18
  59. package/dist/src/ui/framework/events.d.ts.map +0 -1
  60. package/dist/src/ui/framework/events.js +0 -23
  61. package/dist/src/ui/framework/events.js.map +0 -1
  62. package/dist/src/ui/framework/index.d.ts +0 -15
  63. package/dist/src/ui/framework/index.d.ts.map +0 -1
  64. package/dist/src/ui/framework/index.js +0 -15
  65. package/dist/src/ui/framework/index.js.map +0 -1
  66. package/dist/src/ui/framework/selectors.d.ts +0 -51
  67. package/dist/src/ui/framework/selectors.d.ts.map +0 -1
  68. package/dist/src/ui/framework/selectors.js +0 -28
  69. package/dist/src/ui/framework/selectors.js.map +0 -1
  70. package/dist/src/ui/framework/store.d.ts +0 -44
  71. package/dist/src/ui/framework/store.d.ts.map +0 -1
  72. package/dist/src/ui/framework/store.js +0 -79
  73. package/dist/src/ui/framework/store.js.map +0 -1
  74. package/dist/src/ui/viewer/a11y.d.ts +0 -26
  75. package/dist/src/ui/viewer/a11y.d.ts.map +0 -1
  76. package/dist/src/ui/viewer/a11y.js +0 -116
  77. package/dist/src/ui/viewer/a11y.js.map +0 -1
  78. package/dist/src/ui/viewer/actions.d.ts +0 -308
  79. package/dist/src/ui/viewer/actions.d.ts.map +0 -1
  80. package/dist/src/ui/viewer/actions.js +0 -2
  81. package/dist/src/ui/viewer/actions.js.map +0 -1
  82. package/dist/src/ui/viewer/animation-presets.d.ts +0 -37
  83. package/dist/src/ui/viewer/animation-presets.d.ts.map +0 -1
  84. package/dist/src/ui/viewer/animation-presets.js +0 -123
  85. package/dist/src/ui/viewer/animation-presets.js.map +0 -1
  86. package/dist/src/ui/viewer/animation.d.ts +0 -162
  87. package/dist/src/ui/viewer/animation.d.ts.map +0 -1
  88. package/dist/src/ui/viewer/animation.js +0 -506
  89. package/dist/src/ui/viewer/animation.js.map +0 -1
  90. package/dist/src/ui/viewer/annotation/LinkRenderer.d.ts +0 -9
  91. package/dist/src/ui/viewer/annotation/LinkRenderer.d.ts.map +0 -1
  92. package/dist/src/ui/viewer/annotation/LinkRenderer.js +0 -17
  93. package/dist/src/ui/viewer/annotation/LinkRenderer.js.map +0 -1
  94. package/dist/src/ui/viewer/annotation/MarkupRenderer.d.ts +0 -21
  95. package/dist/src/ui/viewer/annotation/MarkupRenderer.d.ts.map +0 -1
  96. package/dist/src/ui/viewer/annotation/MarkupRenderer.js +0 -136
  97. package/dist/src/ui/viewer/annotation/MarkupRenderer.js.map +0 -1
  98. package/dist/src/ui/viewer/annotation/ShapeRenderer.d.ts +0 -33
  99. package/dist/src/ui/viewer/annotation/ShapeRenderer.d.ts.map +0 -1
  100. package/dist/src/ui/viewer/annotation/ShapeRenderer.js +0 -379
  101. package/dist/src/ui/viewer/annotation/ShapeRenderer.js.map +0 -1
  102. package/dist/src/ui/viewer/annotation/TextRenderer.d.ts +0 -23
  103. package/dist/src/ui/viewer/annotation/TextRenderer.d.ts.map +0 -1
  104. package/dist/src/ui/viewer/annotation/TextRenderer.js +0 -196
  105. package/dist/src/ui/viewer/annotation/TextRenderer.js.map +0 -1
  106. package/dist/src/ui/viewer/annotation/index.d.ts +0 -9
  107. package/dist/src/ui/viewer/annotation/index.d.ts.map +0 -1
  108. package/dist/src/ui/viewer/annotation/index.js +0 -10
  109. package/dist/src/ui/viewer/annotation/index.js.map +0 -1
  110. package/dist/src/ui/viewer/annotation/propertyUtils.d.ts +0 -29
  111. package/dist/src/ui/viewer/annotation/propertyUtils.d.ts.map +0 -1
  112. package/dist/src/ui/viewer/annotation/propertyUtils.js +0 -151
  113. package/dist/src/ui/viewer/annotation/propertyUtils.js.map +0 -1
  114. package/dist/src/ui/viewer/annotation/render.d.ts +0 -24
  115. package/dist/src/ui/viewer/annotation/render.d.ts.map +0 -1
  116. package/dist/src/ui/viewer/annotation/render.js +0 -191
  117. package/dist/src/ui/viewer/annotation/render.js.map +0 -1
  118. package/dist/src/ui/viewer/annotation/types.d.ts +0 -309
  119. package/dist/src/ui/viewer/annotation/types.d.ts.map +0 -1
  120. package/dist/src/ui/viewer/annotation/types.js +0 -7
  121. package/dist/src/ui/viewer/annotation/types.js.map +0 -1
  122. package/dist/src/ui/viewer/annotation/utils.d.ts +0 -75
  123. package/dist/src/ui/viewer/annotation/utils.d.ts.map +0 -1
  124. package/dist/src/ui/viewer/annotation/utils.js +0 -250
  125. package/dist/src/ui/viewer/annotation/utils.js.map +0 -1
  126. package/dist/src/ui/viewer/components/AnnotationPanel.d.ts +0 -20
  127. package/dist/src/ui/viewer/components/AnnotationPanel.d.ts.map +0 -1
  128. package/dist/src/ui/viewer/components/AnnotationPanel.js +0 -276
  129. package/dist/src/ui/viewer/components/AnnotationPanel.js.map +0 -1
  130. package/dist/src/ui/viewer/components/AttachmentsPanel.d.ts +0 -8
  131. package/dist/src/ui/viewer/components/AttachmentsPanel.d.ts.map +0 -1
  132. package/dist/src/ui/viewer/components/AttachmentsPanel.js +0 -16
  133. package/dist/src/ui/viewer/components/AttachmentsPanel.js.map +0 -1
  134. package/dist/src/ui/viewer/components/BookmarksPanel.d.ts +0 -8
  135. package/dist/src/ui/viewer/components/BookmarksPanel.d.ts.map +0 -1
  136. package/dist/src/ui/viewer/components/BookmarksPanel.js +0 -16
  137. package/dist/src/ui/viewer/components/BookmarksPanel.js.map +0 -1
  138. package/dist/src/ui/viewer/components/Branding.d.ts +0 -49
  139. package/dist/src/ui/viewer/components/Branding.d.ts.map +0 -1
  140. package/dist/src/ui/viewer/components/Branding.js +0 -334
  141. package/dist/src/ui/viewer/components/Branding.js.map +0 -1
  142. package/dist/src/ui/viewer/components/ColorSelect.d.ts +0 -26
  143. package/dist/src/ui/viewer/components/ColorSelect.d.ts.map +0 -1
  144. package/dist/src/ui/viewer/components/ColorSelect.js +0 -120
  145. package/dist/src/ui/viewer/components/ColorSelect.js.map +0 -1
  146. package/dist/src/ui/viewer/components/FloatingToolbar.d.ts +0 -10
  147. package/dist/src/ui/viewer/components/FloatingToolbar.d.ts.map +0 -1
  148. package/dist/src/ui/viewer/components/FloatingToolbar.js +0 -396
  149. package/dist/src/ui/viewer/components/FloatingToolbar.js.map +0 -1
  150. package/dist/src/ui/viewer/components/FontsPanel.d.ts +0 -12
  151. package/dist/src/ui/viewer/components/FontsPanel.d.ts.map +0 -1
  152. package/dist/src/ui/viewer/components/FontsPanel.js +0 -141
  153. package/dist/src/ui/viewer/components/FontsPanel.js.map +0 -1
  154. package/dist/src/ui/viewer/components/LayersPanel.d.ts +0 -12
  155. package/dist/src/ui/viewer/components/LayersPanel.d.ts.map +0 -1
  156. package/dist/src/ui/viewer/components/LayersPanel.js +0 -139
  157. package/dist/src/ui/viewer/components/LayersPanel.js.map +0 -1
  158. package/dist/src/ui/viewer/components/LeftPanel.d.ts +0 -11
  159. package/dist/src/ui/viewer/components/LeftPanel.d.ts.map +0 -1
  160. package/dist/src/ui/viewer/components/LeftPanel.js +0 -296
  161. package/dist/src/ui/viewer/components/LeftPanel.js.map +0 -1
  162. package/dist/src/ui/viewer/components/LoadingOverlay.d.ts +0 -13
  163. package/dist/src/ui/viewer/components/LoadingOverlay.d.ts.map +0 -1
  164. package/dist/src/ui/viewer/components/LoadingOverlay.js +0 -146
  165. package/dist/src/ui/viewer/components/LoadingOverlay.js.map +0 -1
  166. package/dist/src/ui/viewer/components/NumberInput.d.ts +0 -32
  167. package/dist/src/ui/viewer/components/NumberInput.d.ts.map +0 -1
  168. package/dist/src/ui/viewer/components/NumberInput.js +0 -101
  169. package/dist/src/ui/viewer/components/NumberInput.js.map +0 -1
  170. package/dist/src/ui/viewer/components/OutlinePanel.d.ts +0 -11
  171. package/dist/src/ui/viewer/components/OutlinePanel.d.ts.map +0 -1
  172. package/dist/src/ui/viewer/components/OutlinePanel.js +0 -307
  173. package/dist/src/ui/viewer/components/OutlinePanel.js.map +0 -1
  174. package/dist/src/ui/viewer/components/PasswordDialog.d.ts +0 -16
  175. package/dist/src/ui/viewer/components/PasswordDialog.d.ts.map +0 -1
  176. package/dist/src/ui/viewer/components/PasswordDialog.js +0 -179
  177. package/dist/src/ui/viewer/components/PasswordDialog.js.map +0 -1
  178. package/dist/src/ui/viewer/components/PermitNoticeOverlay.d.ts +0 -27
  179. package/dist/src/ui/viewer/components/PermitNoticeOverlay.d.ts.map +0 -1
  180. package/dist/src/ui/viewer/components/PermitNoticeOverlay.js +0 -79
  181. package/dist/src/ui/viewer/components/PermitNoticeOverlay.js.map +0 -1
  182. package/dist/src/ui/viewer/components/PrintDialog.d.ts +0 -34
  183. package/dist/src/ui/viewer/components/PrintDialog.d.ts.map +0 -1
  184. package/dist/src/ui/viewer/components/PrintDialog.js +0 -317
  185. package/dist/src/ui/viewer/components/PrintDialog.js.map +0 -1
  186. package/dist/src/ui/viewer/components/RightPanel.d.ts +0 -10
  187. package/dist/src/ui/viewer/components/RightPanel.d.ts.map +0 -1
  188. package/dist/src/ui/viewer/components/RightPanel.js +0 -154
  189. package/dist/src/ui/viewer/components/RightPanel.js.map +0 -1
  190. package/dist/src/ui/viewer/components/SearchPanel.d.ts +0 -21
  191. package/dist/src/ui/viewer/components/SearchPanel.d.ts.map +0 -1
  192. package/dist/src/ui/viewer/components/SearchPanel.js +0 -323
  193. package/dist/src/ui/viewer/components/SearchPanel.js.map +0 -1
  194. package/dist/src/ui/viewer/components/SheetTabBar.d.ts +0 -9
  195. package/dist/src/ui/viewer/components/SheetTabBar.d.ts.map +0 -1
  196. package/dist/src/ui/viewer/components/SheetTabBar.js +0 -57
  197. package/dist/src/ui/viewer/components/SheetTabBar.js.map +0 -1
  198. package/dist/src/ui/viewer/components/Spread.d.ts +0 -85
  199. package/dist/src/ui/viewer/components/Spread.d.ts.map +0 -1
  200. package/dist/src/ui/viewer/components/Spread.js +0 -749
  201. package/dist/src/ui/viewer/components/Spread.js.map +0 -1
  202. package/dist/src/ui/viewer/components/SubToolbar.d.ts +0 -11
  203. package/dist/src/ui/viewer/components/SubToolbar.d.ts.map +0 -1
  204. package/dist/src/ui/viewer/components/SubToolbar.js +0 -722
  205. package/dist/src/ui/viewer/components/SubToolbar.js.map +0 -1
  206. package/dist/src/ui/viewer/components/ThumbnailPanel.d.ts +0 -12
  207. package/dist/src/ui/viewer/components/ThumbnailPanel.d.ts.map +0 -1
  208. package/dist/src/ui/viewer/components/ThumbnailPanel.js +0 -290
  209. package/dist/src/ui/viewer/components/ThumbnailPanel.js.map +0 -1
  210. package/dist/src/ui/viewer/components/Toolbar.d.ts +0 -12
  211. package/dist/src/ui/viewer/components/Toolbar.d.ts.map +0 -1
  212. package/dist/src/ui/viewer/components/Toolbar.js +0 -761
  213. package/dist/src/ui/viewer/components/Toolbar.js.map +0 -1
  214. package/dist/src/ui/viewer/components/ViewModeMenu.d.ts +0 -10
  215. package/dist/src/ui/viewer/components/ViewModeMenu.d.ts.map +0 -1
  216. package/dist/src/ui/viewer/components/ViewModeMenu.js +0 -206
  217. package/dist/src/ui/viewer/components/ViewModeMenu.js.map +0 -1
  218. package/dist/src/ui/viewer/components/Viewport.d.ts +0 -28
  219. package/dist/src/ui/viewer/components/Viewport.d.ts.map +0 -1
  220. package/dist/src/ui/viewer/components/Viewport.js +0 -1721
  221. package/dist/src/ui/viewer/components/Viewport.js.map +0 -1
  222. package/dist/src/ui/viewer/effects.d.ts +0 -8
  223. package/dist/src/ui/viewer/effects.d.ts.map +0 -1
  224. package/dist/src/ui/viewer/effects.js +0 -452
  225. package/dist/src/ui/viewer/effects.js.map +0 -1
  226. package/dist/src/ui/viewer/i18n/ar.d.ts +0 -3
  227. package/dist/src/ui/viewer/i18n/ar.d.ts.map +0 -1
  228. package/dist/src/ui/viewer/i18n/ar.js +0 -198
  229. package/dist/src/ui/viewer/i18n/ar.js.map +0 -1
  230. package/dist/src/ui/viewer/i18n/de.d.ts +0 -3
  231. package/dist/src/ui/viewer/i18n/de.d.ts.map +0 -1
  232. package/dist/src/ui/viewer/i18n/de.js +0 -198
  233. package/dist/src/ui/viewer/i18n/de.js.map +0 -1
  234. package/dist/src/ui/viewer/i18n/en.d.ts +0 -3
  235. package/dist/src/ui/viewer/i18n/en.d.ts.map +0 -1
  236. package/dist/src/ui/viewer/i18n/en.js +0 -200
  237. package/dist/src/ui/viewer/i18n/en.js.map +0 -1
  238. package/dist/src/ui/viewer/i18n/es.d.ts +0 -3
  239. package/dist/src/ui/viewer/i18n/es.d.ts.map +0 -1
  240. package/dist/src/ui/viewer/i18n/es.js +0 -198
  241. package/dist/src/ui/viewer/i18n/es.js.map +0 -1
  242. package/dist/src/ui/viewer/i18n/fr.d.ts +0 -3
  243. package/dist/src/ui/viewer/i18n/fr.d.ts.map +0 -1
  244. package/dist/src/ui/viewer/i18n/fr.js +0 -198
  245. package/dist/src/ui/viewer/i18n/fr.js.map +0 -1
  246. package/dist/src/ui/viewer/i18n/index.d.ts +0 -27
  247. package/dist/src/ui/viewer/i18n/index.d.ts.map +0 -1
  248. package/dist/src/ui/viewer/i18n/index.js +0 -88
  249. package/dist/src/ui/viewer/i18n/index.js.map +0 -1
  250. package/dist/src/ui/viewer/i18n/ja.d.ts +0 -3
  251. package/dist/src/ui/viewer/i18n/ja.d.ts.map +0 -1
  252. package/dist/src/ui/viewer/i18n/ja.js +0 -198
  253. package/dist/src/ui/viewer/i18n/ja.js.map +0 -1
  254. package/dist/src/ui/viewer/i18n/ko.d.ts +0 -3
  255. package/dist/src/ui/viewer/i18n/ko.d.ts.map +0 -1
  256. package/dist/src/ui/viewer/i18n/ko.js +0 -198
  257. package/dist/src/ui/viewer/i18n/ko.js.map +0 -1
  258. package/dist/src/ui/viewer/i18n/pt-BR.d.ts +0 -3
  259. package/dist/src/ui/viewer/i18n/pt-BR.d.ts.map +0 -1
  260. package/dist/src/ui/viewer/i18n/pt-BR.js +0 -198
  261. package/dist/src/ui/viewer/i18n/pt-BR.js.map +0 -1
  262. package/dist/src/ui/viewer/i18n/ru.d.ts +0 -3
  263. package/dist/src/ui/viewer/i18n/ru.d.ts.map +0 -1
  264. package/dist/src/ui/viewer/i18n/ru.js +0 -198
  265. package/dist/src/ui/viewer/i18n/ru.js.map +0 -1
  266. package/dist/src/ui/viewer/i18n/types.d.ts +0 -176
  267. package/dist/src/ui/viewer/i18n/types.d.ts.map +0 -1
  268. package/dist/src/ui/viewer/i18n/types.js +0 -2
  269. package/dist/src/ui/viewer/i18n/types.js.map +0 -1
  270. package/dist/src/ui/viewer/i18n/zh-CN.d.ts +0 -3
  271. package/dist/src/ui/viewer/i18n/zh-CN.d.ts.map +0 -1
  272. package/dist/src/ui/viewer/i18n/zh-CN.js +0 -198
  273. package/dist/src/ui/viewer/i18n/zh-CN.js.map +0 -1
  274. package/dist/src/ui/viewer/i18n/zh-TW.d.ts +0 -3
  275. package/dist/src/ui/viewer/i18n/zh-TW.d.ts.map +0 -1
  276. package/dist/src/ui/viewer/i18n/zh-TW.js +0 -198
  277. package/dist/src/ui/viewer/i18n/zh-TW.js.map +0 -1
  278. package/dist/src/ui/viewer/icons.d.ts +0 -77
  279. package/dist/src/ui/viewer/icons.d.ts.map +0 -1
  280. package/dist/src/ui/viewer/icons.js +0 -109
  281. package/dist/src/ui/viewer/icons.js.map +0 -1
  282. package/dist/src/ui/viewer/index.d.ts +0 -6
  283. package/dist/src/ui/viewer/index.d.ts.map +0 -1
  284. package/dist/src/ui/viewer/index.js +0 -6
  285. package/dist/src/ui/viewer/index.js.map +0 -1
  286. package/dist/src/ui/viewer/layout/index.d.ts +0 -3
  287. package/dist/src/ui/viewer/layout/index.d.ts.map +0 -1
  288. package/dist/src/ui/viewer/layout/index.js +0 -3
  289. package/dist/src/ui/viewer/layout/index.js.map +0 -1
  290. package/dist/src/ui/viewer/layout/pixelAlign.d.ts +0 -8
  291. package/dist/src/ui/viewer/layout/pixelAlign.d.ts.map +0 -1
  292. package/dist/src/ui/viewer/layout/pixelAlign.js +0 -42
  293. package/dist/src/ui/viewer/layout/pixelAlign.js.map +0 -1
  294. package/dist/src/ui/viewer/layout/spreadLayout.d.ts +0 -155
  295. package/dist/src/ui/viewer/layout/spreadLayout.d.ts.map +0 -1
  296. package/dist/src/ui/viewer/layout/spreadLayout.js +0 -574
  297. package/dist/src/ui/viewer/layout/spreadLayout.js.map +0 -1
  298. package/dist/src/ui/viewer/navigation.d.ts +0 -91
  299. package/dist/src/ui/viewer/navigation.d.ts.map +0 -1
  300. package/dist/src/ui/viewer/navigation.js +0 -59
  301. package/dist/src/ui/viewer/navigation.js.map +0 -1
  302. package/dist/src/ui/viewer/reducer.d.ts +0 -4
  303. package/dist/src/ui/viewer/reducer.d.ts.map +0 -1
  304. package/dist/src/ui/viewer/reducer.js +0 -841
  305. package/dist/src/ui/viewer/reducer.js.map +0 -1
  306. package/dist/src/ui/viewer/search/index.d.ts +0 -2
  307. package/dist/src/ui/viewer/search/index.d.ts.map +0 -1
  308. package/dist/src/ui/viewer/search/index.js +0 -2
  309. package/dist/src/ui/viewer/search/index.js.map +0 -1
  310. package/dist/src/ui/viewer/search/search.d.ts +0 -31
  311. package/dist/src/ui/viewer/search/search.d.ts.map +0 -1
  312. package/dist/src/ui/viewer/search/search.js +0 -446
  313. package/dist/src/ui/viewer/search/search.js.map +0 -1
  314. package/dist/src/ui/viewer/shell.d.ts +0 -65
  315. package/dist/src/ui/viewer/shell.d.ts.map +0 -1
  316. package/dist/src/ui/viewer/shell.js +0 -366
  317. package/dist/src/ui/viewer/shell.js.map +0 -1
  318. package/dist/src/ui/viewer/state.d.ts +0 -313
  319. package/dist/src/ui/viewer/state.d.ts.map +0 -1
  320. package/dist/src/ui/viewer/state.js +0 -157
  321. package/dist/src/ui/viewer/state.js.map +0 -1
  322. package/dist/src/ui/viewer/styles-inline.d.ts +0 -2
  323. package/dist/src/ui/viewer/styles-inline.d.ts.map +0 -1
  324. package/dist/src/ui/viewer/styles-inline.js +0 -3526
  325. package/dist/src/ui/viewer/styles-inline.js.map +0 -1
  326. package/dist/src/ui/viewer/text/index.d.ts +0 -6
  327. package/dist/src/ui/viewer/text/index.d.ts.map +0 -1
  328. package/dist/src/ui/viewer/text/index.js +0 -6
  329. package/dist/src/ui/viewer/text/index.js.map +0 -1
  330. package/dist/src/ui/viewer/text/render.d.ts +0 -18
  331. package/dist/src/ui/viewer/text/render.d.ts.map +0 -1
  332. package/dist/src/ui/viewer/text/render.js +0 -480
  333. package/dist/src/ui/viewer/text/render.js.map +0 -1
  334. package/dist/src/ui/viewer/text/selection.d.ts +0 -12
  335. package/dist/src/ui/viewer/text/selection.d.ts.map +0 -1
  336. package/dist/src/ui/viewer/text/selection.js +0 -69
  337. package/dist/src/ui/viewer/text/selection.js.map +0 -1
  338. package/dist/src/ui/viewer/tools/AnnotationDrawController.d.ts +0 -21
  339. package/dist/src/ui/viewer/tools/AnnotationDrawController.d.ts.map +0 -1
  340. package/dist/src/ui/viewer/tools/AnnotationDrawController.js +0 -410
  341. package/dist/src/ui/viewer/tools/AnnotationDrawController.js.map +0 -1
  342. package/dist/src/ui/viewer/tools/AnnotationSelectController.d.ts +0 -22
  343. package/dist/src/ui/viewer/tools/AnnotationSelectController.d.ts.map +0 -1
  344. package/dist/src/ui/viewer/tools/AnnotationSelectController.js +0 -378
  345. package/dist/src/ui/viewer/tools/AnnotationSelectController.js.map +0 -1
  346. package/dist/src/ui/viewer/tools/AnnotationUndoManager.d.ts +0 -29
  347. package/dist/src/ui/viewer/tools/AnnotationUndoManager.d.ts.map +0 -1
  348. package/dist/src/ui/viewer/tools/AnnotationUndoManager.js +0 -144
  349. package/dist/src/ui/viewer/tools/AnnotationUndoManager.js.map +0 -1
  350. package/dist/src/ui/viewer/tools/ViewToolController.d.ts +0 -20
  351. package/dist/src/ui/viewer/tools/ViewToolController.d.ts.map +0 -1
  352. package/dist/src/ui/viewer/tools/ViewToolController.js +0 -179
  353. package/dist/src/ui/viewer/tools/ViewToolController.js.map +0 -1
  354. package/dist/src/ui/viewer/transition-gl.d.ts +0 -25
  355. package/dist/src/ui/viewer/transition-gl.d.ts.map +0 -1
  356. package/dist/src/ui/viewer/transition-gl.js +0 -823
  357. package/dist/src/ui/viewer/transition-gl.js.map +0 -1
  358. package/dist/src/ui/viewer/transition.d.ts +0 -26
  359. package/dist/src/ui/viewer/transition.d.ts.map +0 -1
  360. package/dist/src/ui/viewer/transition.js +0 -1383
  361. package/dist/src/ui/viewer/transition.js.map +0 -1
  362. package/dist/src/wasm/LICENSE +0 -112
  363. package/dist/src/wasm/udoc.d.ts +0 -1338
  364. package/dist/src/wasm/udoc.js +0 -2645
  365. package/dist/src/wasm/udoc_bg.wasm +0 -0
  366. package/dist/src/wasm/udoc_bg.wasm.d.ts +0 -58
  367. package/dist/src/worker/WorkerClient.d.ts +0 -489
  368. package/dist/src/worker/WorkerClient.d.ts.map +0 -1
  369. package/dist/src/worker/WorkerClient.js +0 -1383
  370. package/dist/src/worker/WorkerClient.js.map +0 -1
  371. package/dist/src/worker/index.d.ts +0 -4
  372. package/dist/src/worker/index.d.ts.map +0 -1
  373. package/dist/src/worker/index.js +0 -2
  374. package/dist/src/worker/index.js.map +0 -1
  375. package/dist/src/worker/wasmError.d.ts +0 -17
  376. package/dist/src/worker/wasmError.d.ts.map +0 -1
  377. package/dist/src/worker/wasmError.js +0 -28
  378. package/dist/src/worker/wasmError.js.map +0 -1
  379. package/dist/src/worker/worker-inline.d.ts +0 -2
  380. package/dist/src/worker/worker-inline.d.ts.map +0 -1
  381. package/dist/src/worker/worker-inline.js +0 -2
  382. package/dist/src/worker/worker-inline.js.map +0 -1
  383. package/dist/src/worker/worker.d.ts +0 -530
  384. package/dist/src/worker/worker.d.ts.map +0 -1
  385. package/dist/src/worker/worker.js +0 -2935
  386. package/dist/src/worker/worker.js.map +0 -1
@@ -1,309 +0,0 @@
1
- /**
2
- * Annotation type definitions.
3
- *
4
- * Uses discriminated union types for type-safe annotation handling.
5
- */
6
- /**
7
- * Coordinate convention used by every annotation geometry field in this file
8
- * (`Rect`, `Point`, `Quad`, and the per-type vertex/path arrays):
9
- *
10
- * - **Origin:** top-left corner of the page's **unrotated MediaBox** — i.e.
11
- * the page in its natural orientation, *before* any `/Rotate` is applied.
12
- * `(0, 0)` is the MediaBox top-left even when the page is displayed
13
- * rotated 90°, 180°, or 270°.
14
- * - **Units:** PDF points (1/72 inch).
15
- * - **Axes:** `+x` to the right, `+y` downward (Y-flipped from PDF's native
16
- * bottom-up `/Rect`; the engine converts on load/save).
17
- * - **Rotation:** the viewer applies `/Rotate` (combined with the user's
18
- * rotation toggle) as a display transform — callers should never
19
- * pre-rotate bounds. A horizontal line at any rotation is still a line
20
- * with `start.y === end.y` in this coordinate space.
21
- * - **CropBox:** ignored. We render the full MediaBox and address overlays
22
- * in MediaBox coords, so annotations stay aligned even on PDFs whose
23
- * CropBox trims the visible area.
24
- *
25
- * The same convention is used by the worker (`getPageAnnotations`),
26
- * `UDocViewer.addPageAnnotation(s)` / `updatePageAnnotation(s)`, and the
27
- * Rust engine's `pdf_save_annotations`.
28
- */
29
- /** Rectangle in unrotated MediaBox coordinates (points, origin top-left). */
30
- export interface Rect {
31
- x: number;
32
- y: number;
33
- width: number;
34
- height: number;
35
- }
36
- /** Point in unrotated MediaBox coordinates (points, origin top-left). */
37
- export interface Point {
38
- x: number;
39
- y: number;
40
- }
41
- /**
42
- * Quadrilateral defined by 4 corner points in unrotated MediaBox coordinates.
43
- * Points are ordered: [bottom-left, bottom-right, top-right, top-left]
44
- * (where "bottom"/"top" refer to the *unrotated* page, not the displayed
45
- * orientation).
46
- */
47
- export interface Quad {
48
- points: [Point, Point, Point, Point];
49
- }
50
- /** RGB color with components in range 0.0-1.0. */
51
- export interface AnnotationColor {
52
- r: number;
53
- g: number;
54
- b: number;
55
- }
56
- /**
57
- * Metadata for markup annotations (author, subject, contents, state).
58
- * Displayed in annotation popups and comment threads.
59
- */
60
- export interface MarkupMetadata {
61
- author?: string;
62
- subject?: string;
63
- contents?: string;
64
- state?: string;
65
- stateModel?: string;
66
- }
67
- /** Base annotation properties shared by all annotation types. */
68
- interface BaseAnnotation {
69
- /** Bounding rectangle in unrotated MediaBox coordinates (see {@link Rect}). */
70
- bounds: Rect;
71
- /** Reply annotations nested under this annotation. */
72
- replies?: Annotation[];
73
- /** Metadata for markup annotations. */
74
- metadata?: MarkupMetadata;
75
- /**
76
- * Unique annotation identifier (PDF NM entry). Stable across edits and
77
- * round-trips through save. Use this as the key when looking up an
78
- * annotation across calls to `getPageAnnotations`.
79
- *
80
- * For annotations created via `UDocViewer.addPageAnnotation` without an
81
- * explicit name, the viewer assigns a UUID before insertion.
82
- */
83
- name?: string;
84
- /**
85
- * Last modification date (PDF M entry), in PDF date format
86
- * (e.g. "D:20260506120000Z"). Updated automatically on save.
87
- */
88
- modificationDate?: string;
89
- /**
90
- * Marks this annotation as ephemeral. Ephemeral annotations:
91
- * - render in the viewer like any other annotation,
92
- * - are NOT written to the PDF when saving (`toBytes` / `download`),
93
- * - are NOT included in print output.
94
- *
95
- * The UI drawing/markup tools never set this flag — it is API-only.
96
- * Use `addPageAnnotation({ ..., ephemeral: true })` to create one and
97
- * `updatePageAnnotation` to flip the flag (e.g. promote an ephemeral
98
- * preview shape into a real annotation that gets saved).
99
- */
100
- ephemeral?: boolean;
101
- }
102
- /** Destination within a document. */
103
- export interface Destination {
104
- pageIndex: number;
105
- display: DestinationDisplay;
106
- }
107
- export type DestinationDisplay = {
108
- type: "xyz";
109
- left?: number;
110
- top?: number;
111
- zoom?: number;
112
- } | {
113
- type: "fit";
114
- } | {
115
- type: "fitH";
116
- top?: number;
117
- } | {
118
- type: "fitV";
119
- left?: number;
120
- } | {
121
- type: "fitR";
122
- left: number;
123
- top: number;
124
- right: number;
125
- bottom: number;
126
- } | {
127
- type: "fitB";
128
- } | {
129
- type: "fitBH";
130
- top?: number;
131
- } | {
132
- type: "fitBV";
133
- left?: number;
134
- };
135
- /** Link action type. */
136
- export type LinkAction = {
137
- actionType: "goTo";
138
- destination: Destination;
139
- } | {
140
- actionType: "uri";
141
- uri: string;
142
- };
143
- /** Link annotation that navigates to a destination or opens a URI. */
144
- export interface LinkAnnotation extends BaseAnnotation {
145
- type: "link";
146
- action: LinkAction;
147
- }
148
- /** Highlight annotation. */
149
- export interface HighlightAnnotation extends BaseAnnotation {
150
- type: "highlight";
151
- quads: Quad[];
152
- color?: AnnotationColor;
153
- opacity?: number;
154
- }
155
- /** Underline annotation. */
156
- export interface UnderlineAnnotation extends BaseAnnotation {
157
- type: "underline";
158
- quads: Quad[];
159
- color?: AnnotationColor;
160
- opacity?: number;
161
- }
162
- /** Strikeout annotation. */
163
- export interface StrikeOutAnnotation extends BaseAnnotation {
164
- type: "strikeOut";
165
- quads: Quad[];
166
- color?: AnnotationColor;
167
- opacity?: number;
168
- }
169
- /** Squiggly underline annotation. */
170
- export interface SquigglyAnnotation extends BaseAnnotation {
171
- type: "squiggly";
172
- quads: Quad[];
173
- color?: AnnotationColor;
174
- opacity?: number;
175
- }
176
- /** Icon type for text (sticky note) annotations. */
177
- export type TextAnnotationIcon = "Comment" | "Key" | "Note" | "Help" | "NewParagraph" | "Paragraph" | "Insert";
178
- /** Text justification. */
179
- export type TextJustification = "left" | "center" | "right";
180
- /** Text (sticky note) annotation. */
181
- export interface TextAnnotation extends BaseAnnotation {
182
- type: "text";
183
- icon?: TextAnnotationIcon;
184
- open?: boolean;
185
- contents?: string;
186
- color?: AnnotationColor;
187
- }
188
- /** Free text (typewriter/text box) annotation. */
189
- export interface FreeTextAnnotation extends BaseAnnotation {
190
- type: "freeText";
191
- contents?: string;
192
- justification?: TextJustification;
193
- defaultAppearance?: string;
194
- color?: AnnotationColor;
195
- borderColor?: AnnotationColor;
196
- calloutLine?: Point[];
197
- }
198
- /** Stamp annotation. */
199
- export interface StampAnnotation extends BaseAnnotation {
200
- type: "stamp";
201
- name?: string;
202
- hasCustomAppearance?: boolean;
203
- color?: AnnotationColor;
204
- }
205
- /** Symbol type for caret annotations. */
206
- export type CaretSymbol = "None" | "P";
207
- /** Caret (text insertion point) annotation. */
208
- export interface CaretAnnotation extends BaseAnnotation {
209
- type: "caret";
210
- symbol?: CaretSymbol;
211
- color?: AnnotationColor;
212
- opacity?: number;
213
- }
214
- /** Line ending style. */
215
- export type LineEnding = "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash";
216
- /** Border style. */
217
- export type BorderStyle = "solid" | "dashed" | "dotted" | "beveled" | "inset" | "underline";
218
- /** Line annotation. */
219
- export interface LineAnnotation extends BaseAnnotation {
220
- type: "line";
221
- start: Point;
222
- end: Point;
223
- startEnding?: LineEnding;
224
- endEnding?: LineEnding;
225
- color?: AnnotationColor;
226
- interiorColor?: AnnotationColor;
227
- borderWidth?: number;
228
- borderStyle?: BorderStyle;
229
- opacity?: number;
230
- }
231
- /** Square/rectangle annotation. */
232
- export interface SquareAnnotation extends BaseAnnotation {
233
- type: "square";
234
- color?: AnnotationColor;
235
- interiorColor?: AnnotationColor;
236
- borderWidth?: number;
237
- borderStyle?: BorderStyle;
238
- opacity?: number;
239
- }
240
- /** Circle/ellipse annotation. */
241
- export interface CircleAnnotation extends BaseAnnotation {
242
- type: "circle";
243
- color?: AnnotationColor;
244
- interiorColor?: AnnotationColor;
245
- borderWidth?: number;
246
- borderStyle?: BorderStyle;
247
- opacity?: number;
248
- }
249
- /** Polygon annotation (closed shape). */
250
- export interface PolygonAnnotation extends BaseAnnotation {
251
- type: "polygon";
252
- vertices: Point[];
253
- color?: AnnotationColor;
254
- interiorColor?: AnnotationColor;
255
- borderWidth?: number;
256
- borderStyle?: BorderStyle;
257
- startEnding?: LineEnding;
258
- endEnding?: LineEnding;
259
- opacity?: number;
260
- }
261
- /** Polyline annotation (open path). */
262
- export interface PolyLineAnnotation extends BaseAnnotation {
263
- type: "polyLine";
264
- vertices: Point[];
265
- color?: AnnotationColor;
266
- interiorColor?: AnnotationColor;
267
- borderWidth?: number;
268
- borderStyle?: BorderStyle;
269
- startEnding?: LineEnding;
270
- endEnding?: LineEnding;
271
- opacity?: number;
272
- }
273
- /** Ink (freehand drawing) annotation. */
274
- export interface InkAnnotation extends BaseAnnotation {
275
- type: "ink";
276
- inkList: Point[][];
277
- color?: AnnotationColor;
278
- borderWidth?: number;
279
- borderStyle?: BorderStyle;
280
- opacity?: number;
281
- }
282
- /** Redact annotation (marks content for removal). */
283
- export interface RedactAnnotation extends BaseAnnotation {
284
- type: "redact";
285
- quads?: Quad[];
286
- interiorColor?: AnnotationColor;
287
- overlayText?: string;
288
- justification?: TextJustification;
289
- repeat?: boolean;
290
- color?: AnnotationColor;
291
- opacity?: number;
292
- }
293
- /** All supported annotation types. */
294
- export type Annotation = LinkAnnotation | HighlightAnnotation | UnderlineAnnotation | StrikeOutAnnotation | SquigglyAnnotation | TextAnnotation | FreeTextAnnotation | StampAnnotation | CaretAnnotation | LineAnnotation | SquareAnnotation | CircleAnnotation | PolygonAnnotation | PolyLineAnnotation | InkAnnotation | RedactAnnotation;
295
- /** Annotation type string. */
296
- export type AnnotationType = Annotation["type"];
297
- /**
298
- * Partial annotation used by `patchPageAnnotation` / `patchPageAnnotations`.
299
- *
300
- * Only the listed fields are updated; everything else (including `type`,
301
- * `name`, and any field not present in the patch) is preserved. `metadata`
302
- * is shallow-merged one level deep, so patching `{ metadata: { contents } }`
303
- * keeps the existing `author` / `subject`. `undefined` values are skipped,
304
- * not treated as "clear this field" — use `updatePageAnnotation` for full
305
- * replacement when you need to clear fields by omission.
306
- */
307
- export type AnnotationPatch = Partial<Omit<Annotation, "type" | "name">>;
308
- export {};
309
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ui/viewer/annotation/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,IAAI;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,KAAK;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACjB,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;CACxC;AAED,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD,iEAAiE;AACjE,UAAU,cAAc;IACpB,+EAA+E;IAC/E,MAAM,EAAE,IAAI,CAAC;IACb,sDAAsD;IACtD,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;;;;;OA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,kBAAkB,GAClB,aAAa,GACb,gBAAgB,CAAC;AAEvB,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Annotation type definitions.
3
- *
4
- * Uses discriminated union types for type-safe annotation handling.
5
- */
6
- export {};
7
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/ui/viewer/annotation/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,75 +0,0 @@
1
- /**
2
- * Shared utilities for annotation rendering.
3
- */
4
- import type { Annotation, AnnotationColor, AnnotationPatch, Point, Rect } from "./types";
5
- /**
6
- * Convert annotation color to CSS rgba() string.
7
- */
8
- export declare function colorToRgba(color: AnnotationColor | undefined, opacity: number, defaultColor?: string): string;
9
- /**
10
- * Convert annotation color to CSS rgb() string.
11
- */
12
- export declare function colorToRgb(color: AnnotationColor | undefined, defaultColor?: string): string;
13
- /**
14
- * Scale a point from page coordinates to screen pixels.
15
- */
16
- export declare function scalePoint(point: Point, scale: number): Point;
17
- /**
18
- * Scale bounds from page coordinates to screen pixels.
19
- */
20
- export declare function scaleBounds(bounds: Rect, scale: number): Rect;
21
- /**
22
- * Apply bounds as inline styles to an element.
23
- */
24
- export declare function applyBoundsStyle(el: HTMLElement, bounds: Rect, scale: number): void;
25
- /**
26
- * Create an SVG element sized to cover the annotation layer.
27
- *
28
- * Hit-testing for these overlays is owned by the package stylesheet: the
29
- * <svg> root gets `pointer-events: none` and each painted child gets
30
- * `pointer-events: visiblePainted`, so empty SVG space passes through to
31
- * text/canvas underneath while painted geometry still fires hover/click.
32
- * The rules live in CSS (not inline here) so host apps can override them
33
- * with a normal selector — no `!important` needed.
34
- */
35
- export declare function createSvgOverlay(): SVGSVGElement;
36
- /**
37
- * Create SVG namespace element helper.
38
- */
39
- export declare function createSvgElement<K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K];
40
- /**
41
- * Check if two bounds are approximately equal (for highlight matching).
42
- */
43
- export declare function boundsMatch(a: Rect, b: Rect, epsilon?: number): boolean;
44
- /** Effective page rotation, in degrees, as applied by Spread's CSS transform. */
45
- export type EffectiveRotation = 0 | 90 | 180 | 270;
46
- /**
47
- * Inverse of the CSS `rotate(rotation deg)` applied to the annotation layer.
48
- *
49
- * Annotation bounds are stored in unrotated MediaBox space; the layer is then
50
- * rotated by the viewer. Pointer events arrive in displayed (rotated) space,
51
- * so deltas/points must be inverse-rotated before being written into the
52
- * annotation model. Operates on screen-frame coordinates (y-down).
53
- */
54
- export declare function invertPageRotation(dx: number, dy: number, rotation: EffectiveRotation): Point;
55
- /**
56
- * Return a new annotation with all geometry scaled to fit newBounds.
57
- * Points are remapped proportionally from the old bounds to the new bounds.
58
- */
59
- export declare function resizeAnnotation(annotation: Annotation, newBounds: Rect): Annotation;
60
- /**
61
- * Return a new annotation with all geometry offset by (dx, dy) in page coordinates.
62
- */
63
- export declare function offsetAnnotation(annotation: Annotation, dx: number, dy: number): Annotation;
64
- /**
65
- * Apply a partial patch to an annotation, returning a new annotation.
66
- *
67
- * - `type` and `name` in the patch are silently ignored (the existing values
68
- * are preserved) so callers can spread an annotation in without surprises.
69
- * - `metadata` is shallow-merged one level so patching one field doesn't
70
- * wipe the others.
71
- * - `undefined` values are skipped — they are not treated as "clear this
72
- * field". Use `updatePageAnnotation` for full replacement semantics.
73
- */
74
- export declare function applyAnnotationPatch(existing: Annotation, patch: AnnotationPatch): Annotation;
75
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/viewer/annotation/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH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CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,GAAG,UAAU,CA6CpF;AAgBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,CAqC3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,GAAG,UAAU,CAc7F"}
@@ -1,250 +0,0 @@
1
- /**
2
- * Convert annotation color to CSS rgba() string.
3
- */
4
- export function colorToRgba(color, opacity, defaultColor = "rgba(255, 255, 0, 0.3)") {
5
- if (!color)
6
- return defaultColor;
7
- const r = Math.round(color.r * 255);
8
- const g = Math.round(color.g * 255);
9
- const b = Math.round(color.b * 255);
10
- return `rgba(${r}, ${g}, ${b}, ${opacity})`;
11
- }
12
- /**
13
- * Convert annotation color to CSS rgb() string.
14
- */
15
- export function colorToRgb(color, defaultColor = "rgb(0, 0, 0)") {
16
- if (!color)
17
- return defaultColor;
18
- const r = Math.round(color.r * 255);
19
- const g = Math.round(color.g * 255);
20
- const b = Math.round(color.b * 255);
21
- return `rgb(${r}, ${g}, ${b})`;
22
- }
23
- /**
24
- * Scale a point from page coordinates to screen pixels.
25
- */
26
- export function scalePoint(point, scale) {
27
- return {
28
- x: point.x * scale,
29
- y: point.y * scale,
30
- };
31
- }
32
- /**
33
- * Scale bounds from page coordinates to screen pixels.
34
- */
35
- export function scaleBounds(bounds, scale) {
36
- return {
37
- x: bounds.x * scale,
38
- y: bounds.y * scale,
39
- width: bounds.width * scale,
40
- height: bounds.height * scale,
41
- };
42
- }
43
- /**
44
- * Apply bounds as inline styles to an element.
45
- */
46
- export function applyBoundsStyle(el, bounds, scale) {
47
- el.style.position = "absolute";
48
- el.style.left = `${bounds.x * scale}px`;
49
- el.style.top = `${bounds.y * scale}px`;
50
- el.style.width = `${bounds.width * scale}px`;
51
- el.style.height = `${bounds.height * scale}px`;
52
- }
53
- /**
54
- * Create an SVG element sized to cover the annotation layer.
55
- *
56
- * Hit-testing for these overlays is owned by the package stylesheet: the
57
- * <svg> root gets `pointer-events: none` and each painted child gets
58
- * `pointer-events: visiblePainted`, so empty SVG space passes through to
59
- * text/canvas underneath while painted geometry still fires hover/click.
60
- * The rules live in CSS (not inline here) so host apps can override them
61
- * with a normal selector — no `!important` needed.
62
- */
63
- export function createSvgOverlay() {
64
- const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
65
- svg.style.position = "absolute";
66
- svg.style.top = "0";
67
- svg.style.left = "0";
68
- svg.style.width = "100%";
69
- svg.style.height = "100%";
70
- svg.style.overflow = "visible";
71
- return svg;
72
- }
73
- /**
74
- * Create SVG namespace element helper.
75
- */
76
- export function createSvgElement(tagName) {
77
- return document.createElementNS("http://www.w3.org/2000/svg", tagName);
78
- }
79
- /**
80
- * Check if two bounds are approximately equal (for highlight matching).
81
- */
82
- export function boundsMatch(a, b, epsilon = 0.1) {
83
- return (Math.abs(a.x - b.x) < epsilon &&
84
- Math.abs(a.y - b.y) < epsilon &&
85
- Math.abs(a.width - b.width) < epsilon &&
86
- Math.abs(a.height - b.height) < epsilon);
87
- }
88
- /**
89
- * Inverse of the CSS `rotate(rotation deg)` applied to the annotation layer.
90
- *
91
- * Annotation bounds are stored in unrotated MediaBox space; the layer is then
92
- * rotated by the viewer. Pointer events arrive in displayed (rotated) space,
93
- * so deltas/points must be inverse-rotated before being written into the
94
- * annotation model. Operates on screen-frame coordinates (y-down).
95
- */
96
- export function invertPageRotation(dx, dy, rotation) {
97
- switch (rotation) {
98
- case 0:
99
- return { x: dx, y: dy };
100
- case 90:
101
- return { x: dy, y: -dx };
102
- case 180:
103
- return { x: -dx, y: -dy };
104
- case 270:
105
- return { x: -dy, y: dx };
106
- }
107
- }
108
- // =============================================================================
109
- // Annotation geometry helpers
110
- // =============================================================================
111
- /** Remap a point from oldBounds coordinate space to newBounds. */
112
- function remapPoint(p, oldBounds, newBounds) {
113
- const sx = oldBounds.width > 0 ? (p.x - oldBounds.x) / oldBounds.width : 0;
114
- const sy = oldBounds.height > 0 ? (p.y - oldBounds.y) / oldBounds.height : 0;
115
- return { x: newBounds.x + sx * newBounds.width, y: newBounds.y + sy * newBounds.height };
116
- }
117
- function remapQuads(quads, oldBounds, newBounds) {
118
- return quads.map((q) => ({
119
- points: q.points.map((p) => remapPoint(p, oldBounds, newBounds)),
120
- }));
121
- }
122
- /**
123
- * Return a new annotation with all geometry scaled to fit newBounds.
124
- * Points are remapped proportionally from the old bounds to the new bounds.
125
- */
126
- export function resizeAnnotation(annotation, newBounds) {
127
- const oldBounds = annotation.bounds;
128
- const base = { bounds: newBounds };
129
- switch (annotation.type) {
130
- case "line":
131
- return {
132
- ...annotation,
133
- ...base,
134
- start: remapPoint(annotation.start, oldBounds, newBounds),
135
- end: remapPoint(annotation.end, oldBounds, newBounds),
136
- };
137
- case "polygon":
138
- case "polyLine":
139
- return {
140
- ...annotation,
141
- ...base,
142
- vertices: annotation.vertices.map((p) => remapPoint(p, oldBounds, newBounds)),
143
- };
144
- case "ink":
145
- return {
146
- ...annotation,
147
- ...base,
148
- inkList: annotation.inkList.map((stroke) => stroke.map((p) => remapPoint(p, oldBounds, newBounds))),
149
- };
150
- case "highlight":
151
- case "underline":
152
- case "strikeOut":
153
- case "squiggly":
154
- return { ...annotation, ...base, quads: remapQuads(annotation.quads, oldBounds, newBounds) };
155
- case "redact":
156
- return {
157
- ...annotation,
158
- ...base,
159
- quads: annotation.quads ? remapQuads(annotation.quads, oldBounds, newBounds) : undefined,
160
- };
161
- case "freeText":
162
- return {
163
- ...annotation,
164
- ...base,
165
- calloutLine: annotation.calloutLine?.map((p) => remapPoint(p, oldBounds, newBounds)),
166
- };
167
- default:
168
- return { ...annotation, ...base };
169
- }
170
- }
171
- function offsetRect(r, dx, dy) {
172
- return { x: r.x + dx, y: r.y + dy, width: r.width, height: r.height };
173
- }
174
- function offsetPoint(p, dx, dy) {
175
- return { x: p.x + dx, y: p.y + dy };
176
- }
177
- function offsetQuads(quads, dx, dy) {
178
- return quads.map((q) => ({
179
- points: q.points.map((p) => offsetPoint(p, dx, dy)),
180
- }));
181
- }
182
- /**
183
- * Return a new annotation with all geometry offset by (dx, dy) in page coordinates.
184
- */
185
- export function offsetAnnotation(annotation, dx, dy) {
186
- const base = { bounds: offsetRect(annotation.bounds, dx, dy) };
187
- switch (annotation.type) {
188
- case "line":
189
- return {
190
- ...annotation,
191
- ...base,
192
- start: offsetPoint(annotation.start, dx, dy),
193
- end: offsetPoint(annotation.end, dx, dy),
194
- };
195
- case "polygon":
196
- case "polyLine":
197
- return { ...annotation, ...base, vertices: annotation.vertices.map((p) => offsetPoint(p, dx, dy)) };
198
- case "ink":
199
- return {
200
- ...annotation,
201
- ...base,
202
- inkList: annotation.inkList.map((stroke) => stroke.map((p) => offsetPoint(p, dx, dy))),
203
- };
204
- case "highlight":
205
- case "underline":
206
- case "strikeOut":
207
- case "squiggly":
208
- return { ...annotation, ...base, quads: offsetQuads(annotation.quads, dx, dy) };
209
- case "redact":
210
- return {
211
- ...annotation,
212
- ...base,
213
- quads: annotation.quads ? offsetQuads(annotation.quads, dx, dy) : undefined,
214
- };
215
- case "freeText":
216
- return { ...annotation, ...base, calloutLine: annotation.calloutLine?.map((p) => offsetPoint(p, dx, dy)) };
217
- default:
218
- // square, circle, text, stamp, caret, link — only bounds
219
- return { ...annotation, ...base };
220
- }
221
- }
222
- /**
223
- * Apply a partial patch to an annotation, returning a new annotation.
224
- *
225
- * - `type` and `name` in the patch are silently ignored (the existing values
226
- * are preserved) so callers can spread an annotation in without surprises.
227
- * - `metadata` is shallow-merged one level so patching one field doesn't
228
- * wipe the others.
229
- * - `undefined` values are skipped — they are not treated as "clear this
230
- * field". Use `updatePageAnnotation` for full replacement semantics.
231
- */
232
- export function applyAnnotationPatch(existing, patch) {
233
- const result = { ...existing };
234
- const patchRecord = patch;
235
- for (const key of Object.keys(patchRecord)) {
236
- if (key === "type" || key === "name")
237
- continue;
238
- const value = patchRecord[key];
239
- if (value === undefined)
240
- continue;
241
- if (key === "metadata" && value && typeof value === "object") {
242
- result.metadata = { ...(existing.metadata ?? {}), ...value };
243
- }
244
- else {
245
- result[key] = value;
246
- }
247
- }
248
- return result;
249
- }
250
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/ui/viewer/annotation/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,UAAU,WAAW,CACvB,KAAkC,EAClC,OAAe,EACf,YAAY,GAAG,wBAAwB;IAEvC,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,OAAO,GAAG,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAkC,EAAE,YAAY,GAAG,cAAc;IACxF,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CA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