@docmentis/udoc-viewer 0.7.20 → 0.8.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 (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
@@ -0,0 +1,441 @@
1
+ # API Comparison
2
+
3
+ Every export of the legacy `@docmentis/udoc-viewer` 0.7.20, beside what the new
4
+ `@docmentis/udoc-viewer` offers in its place.
5
+
6
+ - **Legacy** — `docmentis-udoc-viewer` at `17b22f4`, read from its built
7
+ declarations (`packages/udoc-viewer/dist/src/*.d.ts`), one row per exported
8
+ member.
9
+ - **New** — this repo's `UDocViewer` ([index.ts](src/index.ts)), on udoc-ui's
10
+ `UDocBase` ([base.ts](../udoc-ui/src/base.ts)).
11
+
12
+ When a commit closes a gap or changes a counterpart, it updates the row. Where a
13
+ status takes more than a few words, a note under the table says the rest.
14
+
15
+ | Status | Meaning for an embedder |
16
+ | ----------------- | -------------------------------------------------------------- |
17
+ | same | unchanged: name, signature and meaning |
18
+ | renamed | the same thing under another name |
19
+ | different shape | a counterpart exists; the call or its values change |
20
+ | not built | the viewer has the UI slot or a placeholder, nothing behind it |
21
+ | not in the viewer | no counterpart |
22
+ | dropped | no counterpart, by decision: none is planned |
23
+
24
+ ## Construction — `UDocClient`
25
+
26
+ | Legacy | New | Status |
27
+ | ---------------------------------- | ---------------------------------------- | ------------------------------------------ |
28
+ | `UDocClient.create(options?)` | `UDocViewer.create(container, options?)` | different shape: one call, no client |
29
+ | `static version` | `UDocViewer.version` | renamed: on the viewer |
30
+ | `get license(): LicenseInfo` | — | dropped |
31
+ | `hasFeature(feature)` | — | dropped |
32
+ | `registerFonts(fonts)` | `registerFonts(fonts)` | different shape: bytes or a `UrlFont` |
33
+ | `enableGoogleFonts()` | `enableGoogleFonts` option | different shape: an option, default `true` |
34
+ | `createViewer(options?)` | `UDocViewer.create(container, options?)` | different shape |
35
+ | `compose(compositions)` | — | dropped |
36
+ | `splitByOutline(source, options?)` | — | dropped |
37
+ | `extractImages(source, options?)` | — | dropped |
38
+ | `extractFonts(source)` | — | dropped |
39
+ | `parseFontInfo(data)` | — | dropped |
40
+ | `compress(source)` | — | dropped |
41
+ | `decompress(source)` | — | dropped |
42
+ | `destroy()` | `destroy()` (on the viewer) | different shape: no client to destroy |
43
+ | `getWorkerClient()` | — | dropped |
44
+ | `getRenderCacheStats()` | — | dropped |
45
+ | `getWasmMemoryBytes()` | — | dropped |
46
+ | `onOOM(callback)` | — | dropped |
47
+ | `assetUrl(file, baseUrl, version)` | — | dropped |
48
+
49
+ - `version` — there is no client; the viewer carries it.
50
+ - `registerFonts` — each font is a file's bytes, which name their own family
51
+ and faces, or a `UrlFont` (see `FontEntry`); it reaches documents opened
52
+ after the call, not the one already open.
53
+
54
+ ### `ClientOptions`
55
+
56
+ | Legacy | New | Status |
57
+ | -------------------- | ------------------- | ------------------------------------- |
58
+ | `license` | `license` | same |
59
+ | `baseUrl` | `wasm.baseUrl` | different shape: under `wasm` |
60
+ | `locale` | `locale` | same |
61
+ | `__experimentalGpu` | — | dropped |
62
+ | `googleFonts` | `enableGoogleFonts` | renamed |
63
+ | `fonts` | `fonts` | different shape: bytes or a `UrlFont` |
64
+ | `disableTelemetry` | `disableTelemetry` | same: honored only with a license |
65
+ | `disableUpdateCheck` | — | dropped: no update check |
66
+
67
+ - `baseUrl` — a directory laid out as `@docmentis/udoc-wasm`'s `dist/`. `wasm` also
68
+ takes `cdnUrl`, by default jsDelivr's copy of the engine the viewer was built
69
+ against.
70
+ - `locale` — a BCP 47 tag such as `"zh-CN"`, the browser's by default. The
71
+ viewer ships legacy's eleven languages; a tag with no pack of its own reads
72
+ the one in its language and script (`zh-HK` Traditional Chinese, `pt-PT`
73
+ Brazilian Portuguese), then English. `translations` supplies any other
74
+ language.
75
+
76
+ ## `ViewerOptions`
77
+
78
+ | Legacy | New | Status |
79
+ | ---------------------------------- | ---------------------------------- | -------------------------------------------------- |
80
+ | `container` | `create`'s `container` | different shape: an element, no selector |
81
+ | `scrollMode` | `scrollMode` | same |
82
+ | `layoutMode` | `layoutMode` | different shape: camelCase; PDF and Word only |
83
+ | `zoomMode` | `fit` | different shape: a `Fit` (see `ZoomMode`) |
84
+ | `zoom` | `zoom` | same: under `fit` mode `"none"` |
85
+ | `zoomSteps` | `zoomSteps` | same |
86
+ | `pageSpacing` | `pageGap.horizontal` | different shape: points, not pixels |
87
+ | `spreadSpacing` | `pageGap.vertical` | different shape: points, not pixels |
88
+ | `navigationScrollAlignment` | `navigationScrollAlignment` | same |
89
+ | `searchScrollAlignment` | `searchScrollAlignment` | same |
90
+ | `thumbnailWidth` | — | dropped: thumbnails fill the resizable panel |
91
+ | `activePanel` | `activePanel` | same |
92
+ | `dpi` | `dpi` | same: CSS px per physical inch, default `96` |
93
+ | `enablePerformanceCounter` | — | dropped |
94
+ | `onPerformanceLog` | — | dropped |
95
+ | `hideAttribution` | `hideAttribution` | same: honored only with a license |
96
+ | `hideLoadingOverlay` | `showLoadingOverlay` | different shape: inverse, default `true`; licensed |
97
+ | `hideToolbar` | `showToolbar` | different shape: inverse, default `true` |
98
+ | `hideFloatingToolbar` | — | dropped |
99
+ | `disableFullscreen` | `showFullscreenButton` | different shape: inverse, default `true` |
100
+ | `disableLeftPanel` | `showLeftPanel` | different shape: inverse, default `true` |
101
+ | `disableRightPanel` | `showRightPanel` | different shape: inverse, default `true` |
102
+ | `disableThumbnails` | `showThumbnailPanel` | different shape: inverse, default `true` |
103
+ | `disableOutline` | `showOutlinePanel` | different shape: inverse, default `true` |
104
+ | `disableBookmarks` | — | not in the viewer |
105
+ | `disableLayers` | `showLayersPanel` | different shape: inverse, default `true` |
106
+ | `disableAttachments` | — | not in the viewer yet: the panel isn't built |
107
+ | `disableFonts` | — | not in the viewer |
108
+ | `disableSearch` | `showSearchPanel` | different shape: inverse, default `true` |
109
+ | `disableComments` | `showCommentsPanel` | different shape: inverse, default `true` |
110
+ | `theme` | `theme` | same |
111
+ | `disableThemeSwitching` | `showThemeButton` | different shape: inverse, default `true` |
112
+ | `disableTextSelection` | — | dropped |
113
+ | `disableDownload` | `showDownloadButton` | different shape: inverse, default `true` |
114
+ | `disablePrint` | `showPrintButton` | different shape: inverse, default `true` |
115
+ | `pageRotation` | `pageRotation` | same: PDF and Word only |
116
+ | `spacingMode` | — | not in the viewer: `pageGap` sets the sizes |
117
+ | `minZoom` | `minZoom` | same: default `0.02` (legacy `0.1`) |
118
+ | `maxZoom` | `maxZoom` | same: default `16` (legacy `5`) |
119
+ | `disableViewTools` | — | dropped |
120
+ | `disableAnnotateTools` | — | dropped |
121
+ | `__experimentalDisableMarkupTools` | — | dropped |
122
+ | `enableTransitions` | — | dropped |
123
+ | `enableAnimations` | — | dropped |
124
+ | `locale` | `locale` | same: one option on `create` |
125
+ | `translations` | `translations` | different shape: the viewer's own keys |
126
+ | `customPageOverlay` | `setOverlay(id, source, options?)` | different shape: many, set after `create` |
127
+
128
+ - `locale`, `translations` — see `ClientOptions`. `translations` is a
129
+ `Partial<Messages>`: legacy's keys where the viewer shows the same string
130
+ (`toolbar.search`, `zoom.fitWidth`, `password.title`), its own elsewhere.
131
+
132
+ ## `UDocViewer`
133
+
134
+ ### Lifecycle and document
135
+
136
+ | Legacy | New | Status |
137
+ | ------------------------------ | ------------------------------- | ------------------------------------------------- |
138
+ | `constructor(workerClient, …)` | — | not in the viewer: `create` builds one |
139
+ | `load(source, options?)` | `open(source, options?)` | different shape: renamed; `format` a `FileFormat` |
140
+ | `close()` | `close()` | same |
141
+ | `destroy()` | `destroy()` | same |
142
+ | `get isLoaded` | `docType !== null` | different shape |
143
+ | `needsPassword()` | — | dropped |
144
+ | `authenticate(password)` | `open`'s `password` | different shape: given at open |
145
+ | `get pageCount` | `pageCount` | different shape: the pages composed so far |
146
+ | `get metadata` | — | dropped |
147
+ | `get performanceCounter` | — | dropped |
148
+ | `getDocumentId()` | — | dropped |
149
+ | `initializeFromDocId(docId)` | — | dropped |
150
+ | `toBytes()` | `saveToBytes(format, strategy)` | different shape: names format and strategy |
151
+ | `download(filename?)` | `download(filename?)` | same: saves as edited, in its source format |
152
+ | `print(options?)` | `print(options?)` | different shape: takes a `PrintOptions` |
153
+
154
+ - `load` — the source is a URL, which the viewer fetches, a `Blob` (legacy's
155
+ `File` is one), or bytes; `options` holds `format`, `filename` and
156
+ `password`, the format a `FileFormat`, with images named by codec.
157
+ - `pageCount` — it grows until the compose completes.
158
+
159
+ ### Reads
160
+
161
+ | Legacy | New | Status |
162
+ | ------------------------------------ | ---------------------------- | --------------------------------- |
163
+ | `getOutline()` | — | dropped |
164
+ | `getFontUsage()` | — | dropped |
165
+ | `getPageInfo(page)` | — | dropped |
166
+ | `getLayoutPage(page)` | — | dropped |
167
+ | `getPageText(page)` | — | dropped |
168
+ | `renderPage(page, options?)` | `renderPage(page, options?)` | different shape: an `ImageBitmap` |
169
+ | `renderThumbnail(page, options?)` | — | dropped |
170
+ | `renderRegion(page, rect, options?)` | — | dropped |
171
+
172
+ - `renderPage` — `options` holds only `scale`, default `1` (72 DPI); the image
173
+ is always an `ImageBitmap`, where legacy also gave `ImageData`, a `Blob` or a
174
+ data URL.
175
+
176
+ ### Annotations
177
+
178
+ Legacy's calls, call for call — a page by its 0-based index, an annotation by
179
+ its `name` (`/NM`), which a save writes and a reopen reads back — over the
180
+ engine's own `Annotation` in place of legacy's
181
+ ([page-annotations.ts](../udoc-ui/src/app/page-annotations.ts)). Every
182
+ write needs the session's `annotation` feature, which the license or, with
183
+ none, the permit grants
184
+ (the engine's Wasm Licensing design).
185
+
186
+ | Legacy | New | Status |
187
+ | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------ |
188
+ | `getPageAnnotations(page)` | `getPageAnnotations(page)` | different shape: the engine's `Annotation` |
189
+ | `addPageAnnotation(page, annotation)` | `addPageAnnotation(page, annotation)` | different shape: the engine's `Annotation` |
190
+ | `addPageAnnotations(page, annotations)` | `addPageAnnotations(page, annotations)` | different shape: the engine's `Annotation` |
191
+ | `updatePageAnnotation(page, name, annotation)` | `updatePageAnnotation(page, name, annotation)` | different shape: the engine's `Annotation` |
192
+ | `updatePageAnnotations(page, updates)` | `updatePageAnnotations(page, updates)` | different shape: the engine's `Annotation` |
193
+ | `patchPageAnnotation(page, name, patch)` | `patchPageAnnotation(page, name, patch)` | different shape: the engine's `Annotation` |
194
+ | `patchPageAnnotations(page, patches)` | `patchPageAnnotations(page, patches)` | different shape: the engine's `Annotation` |
195
+ | `removePageAnnotation(page, name)` | `removePageAnnotation(page, name)` | different shape: the engine's `Annotation` |
196
+
197
+ - `Annotation` — the model's, as `udoc.d.ts` declares it: `rect` (`x0`, `y0`,
198
+ `x1`, `y1`) for `bounds`; the subtype a key of `kind`, its entries under it
199
+ (`kind.highlight.quadPoints`, the quads in the file's order); the markup
200
+ entries (`author`, `subject`, `opacity`, …) under `kind.*.markup`; `contents`
201
+ on the annotation; a colour as `{ components, colorSpace }`. Every subtype a
202
+ PDF holds, popups and widgets too. A reply is an annotation of its own,
203
+ naming the one it answers in its markup's `inReplyTo`, not nested in a
204
+ `replies`.
205
+ - A read carries no appearance (`null`); one written without one has it
206
+ generated, but a stamp updated without one keeps its picture while its icon
207
+ and colour stay as they were.
208
+ - `patchPageAnnotation` merges an object field all the way down, where
209
+ legacy's merged `metadata` one level; `id` and `name` stay the annotation's.
210
+ - `addPageAnnotation` assigns an `id` and, as legacy, a UUID `name` where
211
+ they're missing, and leaves the selection as it was.
212
+ - `removePageAnnotation` removes what answers the annotation — its replies,
213
+ state notes and group members — and its popup with it.
214
+ - `ephemeral: true` — shown, never saved or printed, as legacy's.
215
+
216
+ ### Navigation
217
+
218
+ | Legacy | New | Status |
219
+ | ---------------------------------------- | ---------------------------------------- | ------------------------------------------------------ |
220
+ | `get currentPage` | `currentPage` | different shape: a 0-based index |
221
+ | `goToPage(page)` | `goToPage(page)` | different shape: a 0-based index |
222
+ | `goToDestination(destination, options?)` | `goToDestination(destination, options?)` | different shape: the engine's `Destination`; a promise |
223
+ | `nextPage()` | `goToNextPage()` | different shape: renamed; a spread in spread scrolling |
224
+ | `previousPage()` | `goToPrevPage()` | different shape: renamed; a spread in spread scrolling |
225
+
226
+ ### Zoom and view
227
+
228
+ | Legacy | New | Status |
229
+ | ----------------------------------------- | ----------------------------------------- | --------------------------------------------- |
230
+ | `get zoom` | `zoom` | same |
231
+ | `get zoomMode` | `fit` | different shape: a `Fit` |
232
+ | `zoomIn()` | `zoomIn()` | same |
233
+ | `zoomOut()` | `zoomOut()` | same |
234
+ | `setZoom(zoom)` | `setZoom(zoom)` | same: drops the fit |
235
+ | `setZoomMode(mode)` | `setFit(fit)` | different shape: a `Fit` |
236
+ | `setMinZoom(zoom)` | `setMinZoom(zoom)` | same |
237
+ | `setMaxZoom(zoom)` | `setMaxZoom(zoom)` | same |
238
+ | `get viewMode` / `getViewMode()` | — | not in the viewer: a sheet is always a grid |
239
+ | `setViewMode(mode)` | — | not in the viewer |
240
+ | `get scrollMode` | `scrollMode` | same |
241
+ | `setScrollMode(mode)` | `setScrollMode(mode)` | same |
242
+ | `get layoutMode` | `layoutMode` | different shape: camelCase; PDF and Word only |
243
+ | `setLayoutMode(mode)` | `setLayoutMode(mode)` | different shape: camelCase; PDF and Word only |
244
+ | `get pageRotation` | `pageRotation` | same: PDF and Word only |
245
+ | `setPageRotation(rotation)` | `setPageRotation(rotation)` | same: PDF and Word only |
246
+ | `get spacingMode` | `pageGap` | different shape: the gaps' sizes |
247
+ | `setSpacingMode(mode)` | `setPageGap(gap)` | different shape: the gaps' sizes |
248
+ | `get navigationScrollAlignment` | `navigationScrollAlignment` | same |
249
+ | `setNavigationScrollAlignment(alignment)` | `setNavigationScrollAlignment(alignment)` | same |
250
+ | `get searchScrollAlignment` | `searchScrollAlignment` | same |
251
+ | `setSearchScrollAlignment(alignment)` | `setSearchScrollAlignment(alignment)` | same |
252
+
253
+ - `setZoomMode` — every later document opens by the fit too; `null` restores
254
+ each doc type's own.
255
+ - `viewMode` — `paged` or `continuous`.
256
+ - `spacingMode` — `pageGap` sets each gap's size in document points, not which
257
+ gaps show; `null` restores the built-in gaps.
258
+
259
+ ### Chrome
260
+
261
+ | Legacy | New | Status |
262
+ | ------------------------------------ | --------------------------- | ---------------------------------- |
263
+ | `get isFullscreen` | `isFullscreen` | same |
264
+ | `setFullscreen(fullscreen)` | `setFullscreen(fullscreen)` | different shape: returns a promise |
265
+ | `setFullscreenEnabled(enabled)` | — | dropped |
266
+ | `setToolbarVisible(visible)` | — | dropped |
267
+ | `setFloatingToolbarVisible(visible)` | — | dropped |
268
+ | `setDownloadEnabled(enabled)` | — | dropped |
269
+ | `setPrintEnabled(enabled)` | — | dropped |
270
+ | `get theme` | `theme` | same |
271
+ | `setTheme(theme)` | `setTheme(theme)` | same |
272
+ | `setThemeSwitchingEnabled(enabled)` | — | dropped |
273
+ | `setTextSelectionEnabled(enabled)` | — | dropped |
274
+ | `get activeTool` | — | dropped |
275
+ | `setActiveTool(tool)` | — | dropped |
276
+
277
+ - `setFullscreen` — the browser enters fullscreen only in answer to a user
278
+ gesture; the promise rejects when it refuses, where legacy failed silently.
279
+
280
+ ### Panels
281
+
282
+ | Legacy | New | Status |
283
+ | --------------------------------------------------- | ------------------ | --------------------- |
284
+ | `setLeftPanelEnabled(enabled)` | — | not in the viewer |
285
+ | `setRightPanelEnabled(enabled)` | — | not in the viewer |
286
+ | `setPanelEnabled(panel, enabled)` | — | not in the viewer |
287
+ | `openPanel(panel)` | `openPanel(panel)` | same |
288
+ | `closePanel()` | `closePanel()` | same |
289
+ | panels `thumbnail`, `outline`, `layers`, `comments` | the same tabs | same |
290
+ | panels `bookmarks`, `fonts` | — | not in the viewer |
291
+ | panel `attachments` | — | not in the viewer yet |
292
+ | panel `search` | the same tab | same |
293
+
294
+ ### Search
295
+
296
+ | Legacy | New | Status |
297
+ | --------------------------------------- | --------------------------------------- | ------------------------------------------ |
298
+ | `search(query, options?)` | `search(query, options?)` | different shape: a `scope` for `pageRange` |
299
+ | `searchNext(options?)` | `searchNext(options?)` | same |
300
+ | `searchPrev(options?)` | `searchPrev(options?)` | same |
301
+ | `clearSearch()` | `clearSearch()` | same |
302
+ | `get searchMatches` | `get searchMatches` | different shape: `SearchMatch` changed |
303
+ | `get searchActiveIndex` | `get searchActiveIndex` | same |
304
+ | `setSearchActiveIndex(index, options?)` | `setSearchActiveIndex(index, options?)` | same |
305
+ | — | `searchMatchSelection(match)` | new: the selection over a match's text |
306
+
307
+ - `search` — the `scope` is the doc type's pages, slides or sheet; the call
308
+ resolves with the matches.
309
+ - `searchMatchSelection` — its selection is for `setSelection`.
310
+
311
+ ### Events
312
+
313
+ | Legacy | New | Status |
314
+ | --------------------- | --------------------- | --------------------------------------------------- |
315
+ | `on(event, handler)` | `on(event, handler)` | same: the event names differ |
316
+ | `off(event, handler)` | `off(event, handler)` | same: the event names differ |
317
+ | `document:loading` | `document:loading` | same |
318
+ | `document:load` | `open` resolving | different shape |
319
+ | `document:close` | — | dropped |
320
+ | `download` | `document:downloaded` | renamed |
321
+ | `print` | `document:printed` | renamed |
322
+ | `error` | `open` rejecting | different shape: with the `UDocError` |
323
+ | `page:change` | `currentPage:changed` | renamed: its pages are 0-based indices |
324
+ | `viewport:change` | `viewport:changed` | renamed |
325
+ | `panel:change` | `panel:changed` | renamed |
326
+ | `ui:visibilityChange` | — | dropped |
327
+ | `font:usageChange` | — | dropped |
328
+ | `search:change` | `search:changed` | renamed |
329
+ | `annotation:add` | `annotation:inserted` | different shape: renamed; the engine's `Annotation` |
330
+ | `annotation:update` | `annotation:updated` | different shape: renamed; the engine's `Annotation` |
331
+ | `annotation:remove` | `annotation:removed` | different shape: renamed; the engine's `Annotation` |
332
+ | `annotation:select` | `annotation:selected` | different shape: renamed; the engine's `Annotation` |
333
+ | `annotation:hover` | `annotation:hovered` | different shape: renamed; the engine's `Annotation` |
334
+ | `annotation:click` | `annotation:clicked` | different shape: renamed; the engine's `Annotation` |
335
+
336
+ - Every event's name ends in `ed` or `ing`.
337
+ - `document:printed` — fires once the pages are handed to the browser's print
338
+ dialog, so not for a print cancelled while its pages render.
339
+ - `annotation:inserted` / `updated` / `removed` — fire for every change to the
340
+ document's annotations, an undo's, a redo's and a collaborator's too, one
341
+ event per annotation, a reply's included.
342
+
343
+ ## Exported types
344
+
345
+ | Legacy | New | Status |
346
+ | --------------------------------------- | ---------------------------------- | -------------------------------------------------- |
347
+ | `ClientOptions`, `ViewerOptions` | `UDocViewerOptions` | different shape: the option tables |
348
+ | `ThemeMode` | `ThemeMode` | same |
349
+ | `ViewMode` | — | not in the viewer |
350
+ | `DocumentFormat` | `FileFormat` | different shape: `tsv` and `psv`, images per codec |
351
+ | `LoadOptions`, `LoadProgress` | `OpenOptions`, the event's payload | different shape |
352
+ | `ScrollMode` | `ScrollMode` | same |
353
+ | `LayoutMode` | `LayoutMode` | different shape: camelCase values |
354
+ | `ZoomMode` | `Fit`, `FitMode` | different shape |
355
+ | `SpacingMode` | `PageGap` | different shape: the gaps' sizes |
356
+ | `ScrollAlignment` | `ScrollAlignment` | same |
357
+ | `PageRotation` | — | not in the viewer: no exported type |
358
+ | `PanelTab` | `PanelTab` | different shape: no `bookmarks` or `fonts` |
359
+ | `LeftPanelTab`, `RightPanelTab` | — | not in the viewer: no exported type |
360
+ | `ActiveTool`, `ToolKind`, `SubTool` | — | not in the viewer: no exported type |
361
+ | `AnnotateSubTool`, `MarkupSubTool` | — | not in the viewer: no exported type |
362
+ | `Annotation` | `Annotation` | different shape: the engine's model |
363
+ | `SearchMatch` | `SearchMatch` | different shape |
364
+ | `Destination` | `Destination` | different shape: the engine's |
365
+ | `OutlineItem` | — | dropped |
366
+ | `DestinationDisplay` | `DestinationView` | different shape: the engine's, per PDF view |
367
+ | `RenderOptions`, `RenderedPage` | `RenderPageOptions` | different shape: an `ImageBitmap` |
368
+ | `DocumentMetadata` | — | dropped |
369
+ | `ViewerEventMap` | `UDocEvents` | renamed: the events differ |
370
+ | `UIComponent` | — | not in the viewer |
371
+ | `PrintDialogResult`, `PrintPageRange` | `PrintOptions` | different shape: a page list |
372
+ | `PrintQuality` | `PrintQuality` | same |
373
+ | `TranslationKeys`, `I18n`, `createI18n` | `Messages`, `I18n`, `createI18n` | different shape: the viewer's own keys |
374
+ | `DocumentSource`, `Pick` | — | dropped |
375
+ | `Composition`, `ComposePick` | — | dropped |
376
+ | `LicenseInfo`, `LicenseResult` | — | dropped |
377
+ | `FontEntry` | `UrlFont`, `FontDescriptor` | different shape |
378
+ | `FontInfo` | — | dropped |
379
+ | `FontSource` | — | not in the viewer |
380
+ | `ResolvedFontInfo`, `FontUsageEntry` | — | dropped |
381
+ | `CustomPageOverlayRenderer` | `OverlaySource`, `OverlayOptions` | different shape |
382
+ | `PageInfo` | — | dropped |
383
+ | `WorkerRequest`, `WorkerResponse` | — | dropped |
384
+ | `RenderCacheStats`, `RenderCacheBucket` | — | dropped |
385
+ | `IPerformanceCounter`, `Performance*` | — | dropped |
386
+
387
+ - `UDocViewerOptions` — the same type as udoc-ui's `UDocOptions`.
388
+ - `ZoomMode` — `fit-spread-width`, `fit-spread-height`, `fit-spread` and
389
+ `custom` are the `FitMode`s `width`, `height`, `both` and `none`;
390
+ `fit-spread-width-max` is `width` with a `zoomCap` of `1`.
391
+ - `SpacingMode` — `PageGap` holds the gaps' sizes, not which gaps show.
392
+ - `SearchMatch` — `page`, `plane`, page-local `quads` and `context`; `location`
393
+ in place of `charOffset`.
394
+ - `PrintPageRange` — `PrintOptions` lists the pages, as 0-based indices.
395
+ - `FontEntry` — its `typeface`, `bold` and `italic` are a `UrlFont`'s
396
+ `descriptor`, a `FontDescriptor` of `family`, `bold` and `italic`; `url` is
397
+ the same, and an optional `scripts` narrows which text asks for it.
398
+ - `CustomPageOverlayRenderer` — the overlay types also include `OverlayFrame`
399
+ and `OverlayItem`.
400
+ - `Performance*` — `PerformanceEventType`, `PerformanceEventContext`,
401
+ `PerformanceLogEntry`, `PerformanceLogCallback`, `PerformanceEventStats` and
402
+ `PerformanceCounterSummary`.
403
+
404
+ ## Only in the new viewer
405
+
406
+ What the new viewer offers that the legacy one has no row for.
407
+
408
+ | New | What it is |
409
+ | -------------------------------------------------- | ------------------------------------------------------------------- |
410
+ | `openRemote(url)` | a document a udoc server keeps, parts fetched on demand |
411
+ | `openLocal(id)` | a document shared by the instances in one page |
412
+ | `UDocViewer.startLocalCollaborationService` | as above: the service that shares it |
413
+ | `saveToPackage(version?)` | the document as a `.udoc` package |
414
+ | `requestRemoteCopy(strategy)` | a save the server holding the document makes |
415
+ | `requestRemoteCheckpoint()` | as above |
416
+ | `execute(command)`, `undo()`, `redo()` | editing |
417
+ | `mintId()` | editing |
418
+ | `selection()`, `setSelection(selection)` | id-addressed selection |
419
+ | `selectObjects(page, ids)` | id-addressed selection |
420
+ | `selectedObjectIds()`, `clearSelection()` | id-addressed selection |
421
+ | `snapshot()`, `versionVector()` | CRDT sync with a peer |
422
+ | `patchSince(peer)`, `merge(data)` | CRDT sync with a peer |
423
+ | `opaquePartsSince(peer)`, `mergeOpaqueParts(data)` | CRDT sync with a peer |
424
+ | `presence()`, `mergePresence(data)` | CRDT sync with a peer |
425
+ | `setUserInfo(name)`, `leaveCollaboration()` | collaboration |
426
+ | `joinRemoteCollaboration(url, name)` | collaboration |
427
+ | `joinLocalCollaboration(id, name)` | collaboration |
428
+ | `docType`, `sourceFormat` | the open document's type, and the format it saves to |
429
+ | `setViewControlsPlacement(placement)` | where page nav and zoom dock |
430
+ | option `viewControlsPlacement` | the starting chrome |
431
+ | option `onLinkClick` | opens the URL of a clicked link or outline item |
432
+ | option `googleFontFamilies` | the Google font families offered, in place of `GOOGLE_FONT_CATALOG` |
433
+ | option `showDeveloperButton` | the menu's Developer item: performance counter, repaint area |
434
+ | `setDpi(dpi)`, `dpi` | the screen's CSS px per inch, calibrated while the viewer runs |
435
+ | `activePanel` | the open side panel, which `panel:changed` reports |
436
+ | `removeOverlay(id)` | drop an overlay, the built-ins included |
437
+ | event `document:edited` | |
438
+ | event `selection:changed` | |
439
+ | events `collaboration:*` | `joined`, `interrupted`, `failed`, `left` |
440
+ | form filling, audio and video playback | UI with no legacy counterpart |
441
+ | Annotate tools: note, text box, stamp, cloud | UI with no legacy counterpart |