@internetarchive/bookreader 5.0.0-18

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 (428) hide show
  1. package/.eslintrc.js +58 -0
  2. package/.gitattributes +2 -0
  3. package/.github/ISSUE_TEMPLATE/bug.md +32 -0
  4. package/.github/ISSUE_TEMPLATE/feature-request.md +30 -0
  5. package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +15 -0
  6. package/.github/dependabot.yml +8 -0
  7. package/.github/workflows/node.js.yml +37 -0
  8. package/.github/workflows/npm-publish.yml +47 -0
  9. package/.testcaferc.json +5 -0
  10. package/BookReader/BookReader.css +2983 -0
  11. package/BookReader/BookReader.js +3 -0
  12. package/BookReader/BookReader.js.LICENSE.txt +117 -0
  13. package/BookReader/BookReader.js.map +1 -0
  14. package/BookReader/bookreader-component-bundle.js +1436 -0
  15. package/BookReader/bookreader-component-bundle.js.LICENSE.txt +27 -0
  16. package/BookReader/bookreader-component-bundle.js.map +1 -0
  17. package/BookReader/icons/1up.svg +1 -0
  18. package/BookReader/icons/2up.svg +1 -0
  19. package/BookReader/icons/advance.svg +3 -0
  20. package/BookReader/icons/chevron-right.svg +1 -0
  21. package/BookReader/icons/close-circle-dark.svg +1 -0
  22. package/BookReader/icons/close-circle.svg +1 -0
  23. package/BookReader/icons/fullscreen.svg +1 -0
  24. package/BookReader/icons/fullscreen_exit.svg +1 -0
  25. package/BookReader/icons/hamburger.svg +1 -0
  26. package/BookReader/icons/left-arrow.svg +1 -0
  27. package/BookReader/icons/magnify-minus.svg +1 -0
  28. package/BookReader/icons/magnify-plus.svg +1 -0
  29. package/BookReader/icons/magnify.svg +1 -0
  30. package/BookReader/icons/pause.svg +1 -0
  31. package/BookReader/icons/play.svg +1 -0
  32. package/BookReader/icons/playback-speed.svg +1 -0
  33. package/BookReader/icons/read-aloud.svg +1 -0
  34. package/BookReader/icons/review.svg +3 -0
  35. package/BookReader/icons/thumbnails.svg +1 -0
  36. package/BookReader/icons/volume-full.svg +1 -0
  37. package/BookReader/images/BRicons.png +0 -0
  38. package/BookReader/images/BRicons.svg +5 -0
  39. package/BookReader/images/BRicons_ia.png +0 -0
  40. package/BookReader/images/back_pages.png +0 -0
  41. package/BookReader/images/book_bottom_icon.png +0 -0
  42. package/BookReader/images/book_down_icon.png +0 -0
  43. package/BookReader/images/book_left_icon.png +0 -0
  44. package/BookReader/images/book_leftmost_icon.png +0 -0
  45. package/BookReader/images/book_right_icon.png +0 -0
  46. package/BookReader/images/book_rightmost_icon.png +0 -0
  47. package/BookReader/images/book_top_icon.png +0 -0
  48. package/BookReader/images/book_up_icon.png +0 -0
  49. package/BookReader/images/books_graphic.svg +1 -0
  50. package/BookReader/images/booksplit.png +0 -0
  51. package/BookReader/images/control_pause_icon.png +0 -0
  52. package/BookReader/images/control_play_icon.png +0 -0
  53. package/BookReader/images/embed_icon.png +0 -0
  54. package/BookReader/images/icon-home-ia.png +0 -0
  55. package/BookReader/images/icon_OL-logo-xs.png +0 -0
  56. package/BookReader/images/icon_alert-xs.png +0 -0
  57. package/BookReader/images/icon_book.svg +1 -0
  58. package/BookReader/images/icon_bookmark.svg +1 -0
  59. package/BookReader/images/icon_close-pop.png +0 -0
  60. package/BookReader/images/icon_download.png +0 -0
  61. package/BookReader/images/icon_gear.svg +1 -0
  62. package/BookReader/images/icon_hamburger.svg +1 -0
  63. package/BookReader/images/icon_home.png +0 -0
  64. package/BookReader/images/icon_home.svg +1 -0
  65. package/BookReader/images/icon_home_ia.png +0 -0
  66. package/BookReader/images/icon_indicator.png +0 -0
  67. package/BookReader/images/icon_info.svg +1 -0
  68. package/BookReader/images/icon_one_page.svg +1 -0
  69. package/BookReader/images/icon_pause.svg +1 -0
  70. package/BookReader/images/icon_play.svg +1 -0
  71. package/BookReader/images/icon_playback-rate.svg +1 -0
  72. package/BookReader/images/icon_return.png +0 -0
  73. package/BookReader/images/icon_search_button.svg +1 -0
  74. package/BookReader/images/icon_share.svg +1 -0
  75. package/BookReader/images/icon_skip-ahead.svg +1 -0
  76. package/BookReader/images/icon_skip-back.svg +2 -0
  77. package/BookReader/images/icon_speaker.svg +1 -0
  78. package/BookReader/images/icon_speaker_open.svg +1 -0
  79. package/BookReader/images/icon_thumbnails.svg +1 -0
  80. package/BookReader/images/icon_toc.svg +1 -0
  81. package/BookReader/images/icon_two_pages.svg +1 -0
  82. package/BookReader/images/icon_zoomer.png +0 -0
  83. package/BookReader/images/loading.gif +0 -0
  84. package/BookReader/images/logo_icon.png +0 -0
  85. package/BookReader/images/marker_chap-off.png +0 -0
  86. package/BookReader/images/marker_chap-off.svg +1 -0
  87. package/BookReader/images/marker_chap-off_ia.png +0 -0
  88. package/BookReader/images/marker_chap-on.png +0 -0
  89. package/BookReader/images/marker_chap-on.svg +1 -0
  90. package/BookReader/images/marker_srch-on.svg +1 -0
  91. package/BookReader/images/marker_srchchap-off.png +0 -0
  92. package/BookReader/images/marker_srchchap-on.png +0 -0
  93. package/BookReader/images/nav_control-dn.png +0 -0
  94. package/BookReader/images/nav_control-dn_ia.png +0 -0
  95. package/BookReader/images/nav_control-up.png +0 -0
  96. package/BookReader/images/nav_control-up_ia.png +0 -0
  97. package/BookReader/images/nav_control.png +0 -0
  98. package/BookReader/images/one_page_mode_icon.png +0 -0
  99. package/BookReader/images/paper-badge.png +0 -0
  100. package/BookReader/images/print_icon.png +0 -0
  101. package/BookReader/images/progressbar.gif +0 -0
  102. package/BookReader/images/right_edges.png +0 -0
  103. package/BookReader/images/slider.png +0 -0
  104. package/BookReader/images/slider_ia.png +0 -0
  105. package/BookReader/images/thumbnail_mode_icon.png +0 -0
  106. package/BookReader/images/transparent.png +0 -0
  107. package/BookReader/images/two_page_mode_icon.png +0 -0
  108. package/BookReader/images/zoom_in_icon.png +0 -0
  109. package/BookReader/images/zoom_out_icon.png +0 -0
  110. package/BookReader/jquery-1.10.1.js +2 -0
  111. package/BookReader/jquery-1.10.1.js.LICENSE.txt +24 -0
  112. package/BookReader/plugins/plugin.archive_analytics.js +2 -0
  113. package/BookReader/plugins/plugin.archive_analytics.js.map +1 -0
  114. package/BookReader/plugins/plugin.autoplay.js +2 -0
  115. package/BookReader/plugins/plugin.autoplay.js.map +1 -0
  116. package/BookReader/plugins/plugin.chapters.js +2 -0
  117. package/BookReader/plugins/plugin.chapters.js.map +1 -0
  118. package/BookReader/plugins/plugin.iframe.js +2 -0
  119. package/BookReader/plugins/plugin.iframe.js.map +1 -0
  120. package/BookReader/plugins/plugin.mobile_nav.js +2 -0
  121. package/BookReader/plugins/plugin.mobile_nav.js.map +1 -0
  122. package/BookReader/plugins/plugin.resume.js +2 -0
  123. package/BookReader/plugins/plugin.resume.js.map +1 -0
  124. package/BookReader/plugins/plugin.search.js +2 -0
  125. package/BookReader/plugins/plugin.search.js.map +1 -0
  126. package/BookReader/plugins/plugin.text_selection.js +2 -0
  127. package/BookReader/plugins/plugin.text_selection.js.map +1 -0
  128. package/BookReader/plugins/plugin.tts.js +3 -0
  129. package/BookReader/plugins/plugin.tts.js.LICENSE.txt +27 -0
  130. package/BookReader/plugins/plugin.tts.js.map +1 -0
  131. package/BookReader/plugins/plugin.url.js +2 -0
  132. package/BookReader/plugins/plugin.url.js.map +1 -0
  133. package/BookReader/plugins/plugin.vendor-fullscreen.js +2 -0
  134. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -0
  135. package/BookReaderDemo/BookReaderDemo.css +41 -0
  136. package/BookReaderDemo/BookReaderJSAdvanced.js +115 -0
  137. package/BookReaderDemo/BookReaderJSAutoplay.js +56 -0
  138. package/BookReaderDemo/BookReaderJSSimple.js +55 -0
  139. package/BookReaderDemo/IIIFBookReader.js +207 -0
  140. package/BookReaderDemo/assets/v5/Bookreader-logo-cool-grad.svg +1 -0
  141. package/BookReaderDemo/assets/v5/Bookreader-logo-flat.svg +1 -0
  142. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-cool-grad.png +0 -0
  143. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-flat.png +0 -0
  144. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.png +0 -0
  145. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.svg +1 -0
  146. package/BookReaderDemo/assets/v5/Bookreader-logo-warm.svg +1 -0
  147. package/BookReaderDemo/assets/v5/bookreader-logo-renders@1x.png +0 -0
  148. package/BookReaderDemo/assets/v5/bookreader-logo-renders@2x.png +0 -0
  149. package/BookReaderDemo/assets/v5/bookreader-v5-screenshot.png +0 -0
  150. package/BookReaderDemo/bookreader-template-bundle.js +7178 -0
  151. package/BookReaderDemo/demo-advanced.html +32 -0
  152. package/BookReaderDemo/demo-autoplay.html +38 -0
  153. package/BookReaderDemo/demo-embed-iframe-src.html +84 -0
  154. package/BookReaderDemo/demo-embed.html +26 -0
  155. package/BookReaderDemo/demo-fullscreen-mobile.html +36 -0
  156. package/BookReaderDemo/demo-fullscreen.html +33 -0
  157. package/BookReaderDemo/demo-iiif.html +34 -0
  158. package/BookReaderDemo/demo-iiif.js +26 -0
  159. package/BookReaderDemo/demo-internetarchive.html +74 -0
  160. package/BookReaderDemo/demo-multiple.html +43 -0
  161. package/BookReaderDemo/demo-preview-pages.html +1092 -0
  162. package/BookReaderDemo/demo-simple.html +34 -0
  163. package/BookReaderDemo/demo-vendor-fullscreen.html +36 -0
  164. package/BookReaderDemo/immersion-1up.html +64 -0
  165. package/BookReaderDemo/immersion-mode.html +35 -0
  166. package/BookReaderDemo/toggle_controls.html +53 -0
  167. package/BookReaderDemo/view_mode.html +39 -0
  168. package/BookReaderDemo/viewmode-cycle.html +41 -0
  169. package/CHANGELOG.md +540 -0
  170. package/CONTRIBUTING.md +7 -0
  171. package/LICENSE +661 -0
  172. package/README.md +205 -0
  173. package/babel.config.js +18 -0
  174. package/codecov.yml +17 -0
  175. package/index.html +31 -0
  176. package/jsconfig.json +14 -0
  177. package/karma.conf.js +23 -0
  178. package/package.json +129 -0
  179. package/screenshot.png +0 -0
  180. package/scripts/postversion.js +10 -0
  181. package/scripts/preversion.js +14 -0
  182. package/scripts/version.js +26 -0
  183. package/src/BookNavigator/BookModel.js +14 -0
  184. package/src/BookNavigator/BookNavigator.js +468 -0
  185. package/src/BookNavigator/assets/book-loader.js +27 -0
  186. package/src/BookNavigator/assets/bookmark-colors.js +15 -0
  187. package/src/BookNavigator/assets/button-base.js +61 -0
  188. package/src/BookNavigator/assets/icon_checkmark.js +6 -0
  189. package/src/BookNavigator/assets/icon_close.js +3 -0
  190. package/src/BookNavigator/assets/icon_sort_asc.js +5 -0
  191. package/src/BookNavigator/assets/icon_sort_desc.js +5 -0
  192. package/src/BookNavigator/assets/icon_sort_neutral.js +5 -0
  193. package/src/BookNavigator/assets/icon_volumes.js +11 -0
  194. package/src/BookNavigator/bookmarks/bookmark-button.js +64 -0
  195. package/src/BookNavigator/bookmarks/bookmark-edit.js +215 -0
  196. package/src/BookNavigator/bookmarks/bookmarks-list.js +285 -0
  197. package/src/BookNavigator/bookmarks/bookmarks-loginCTA.js +28 -0
  198. package/src/BookNavigator/bookmarks/bookmarks-provider.js +53 -0
  199. package/src/BookNavigator/bookmarks/ia-bookmarks.js +500 -0
  200. package/src/BookNavigator/br-fullscreen-mgr.js +83 -0
  201. package/src/BookNavigator/delete-modal-actions.js +49 -0
  202. package/src/BookNavigator/downloads/downloads-provider.js +76 -0
  203. package/src/BookNavigator/downloads/downloads.js +138 -0
  204. package/src/BookNavigator/search/a-search-result.js +55 -0
  205. package/src/BookNavigator/search/search-provider.js +180 -0
  206. package/src/BookNavigator/search/search-results.js +360 -0
  207. package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +93 -0
  208. package/src/BookNavigator/visual-adjustments/visual-adjustments.js +280 -0
  209. package/src/BookNavigator/volumes/volumes-provider.js +83 -0
  210. package/src/BookNavigator/volumes/volumes.js +178 -0
  211. package/src/BookReader/BookModel.js +518 -0
  212. package/src/BookReader/DebugConsole.js +54 -0
  213. package/src/BookReader/ImageCache.js +116 -0
  214. package/src/BookReader/Mode1Up.js +90 -0
  215. package/src/BookReader/Mode1UpLit.js +434 -0
  216. package/src/BookReader/Mode2Up.js +1372 -0
  217. package/src/BookReader/ModeSmoothZoom.js +177 -0
  218. package/src/BookReader/ModeThumb.js +336 -0
  219. package/src/BookReader/Navbar/Navbar.js +339 -0
  220. package/src/BookReader/PageContainer.js +120 -0
  221. package/src/BookReader/ReduceSet.js +26 -0
  222. package/src/BookReader/Toolbar/Toolbar.js +384 -0
  223. package/src/BookReader/events.js +20 -0
  224. package/src/BookReader/options.js +320 -0
  225. package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
  226. package/src/BookReader/utils/classes.js +36 -0
  227. package/src/BookReader/utils.js +240 -0
  228. package/src/BookReader.js +2546 -0
  229. package/src/BookReaderComponent/BookReaderComponent.js +112 -0
  230. package/src/ItemNavigator/ItemNavigator.js +376 -0
  231. package/src/ItemNavigator/providers/sharing.js +33 -0
  232. package/src/assets/icons/1up.svg +12 -0
  233. package/src/assets/icons/2up.svg +15 -0
  234. package/src/assets/icons/advance.svg +26 -0
  235. package/src/assets/icons/chevron-right.svg +1 -0
  236. package/src/assets/icons/close-circle-dark.svg +1 -0
  237. package/src/assets/icons/close-circle.svg +1 -0
  238. package/src/assets/icons/fullscreen.svg +17 -0
  239. package/src/assets/icons/fullscreen_exit.svg +17 -0
  240. package/src/assets/icons/hamburger.svg +15 -0
  241. package/src/assets/icons/left-arrow.svg +12 -0
  242. package/src/assets/icons/magnify-minus.svg +16 -0
  243. package/src/assets/icons/magnify-plus.svg +17 -0
  244. package/src/assets/icons/magnify.svg +15 -0
  245. package/src/assets/icons/pause.svg +23 -0
  246. package/src/assets/icons/play.svg +22 -0
  247. package/src/assets/icons/playback-speed.svg +34 -0
  248. package/src/assets/icons/read-aloud.svg +22 -0
  249. package/src/assets/icons/review.svg +22 -0
  250. package/src/assets/icons/thumbnails.svg +17 -0
  251. package/src/assets/icons/volume-full.svg +22 -0
  252. package/src/assets/images/BRicons.png +0 -0
  253. package/src/assets/images/BRicons.svg +94 -0
  254. package/src/assets/images/BRicons_ia.png +0 -0
  255. package/src/assets/images/back_pages.png +0 -0
  256. package/src/assets/images/book_bottom_icon.png +0 -0
  257. package/src/assets/images/book_down_icon.png +0 -0
  258. package/src/assets/images/book_left_icon.png +0 -0
  259. package/src/assets/images/book_leftmost_icon.png +0 -0
  260. package/src/assets/images/book_right_icon.png +0 -0
  261. package/src/assets/images/book_rightmost_icon.png +0 -0
  262. package/src/assets/images/book_top_icon.png +0 -0
  263. package/src/assets/images/book_up_icon.png +0 -0
  264. package/src/assets/images/books_graphic.svg +177 -0
  265. package/src/assets/images/booksplit.png +0 -0
  266. package/src/assets/images/control_pause_icon.png +0 -0
  267. package/src/assets/images/control_play_icon.png +0 -0
  268. package/src/assets/images/embed_icon.png +0 -0
  269. package/src/assets/images/icon-home-ia.png +0 -0
  270. package/src/assets/images/icon_OL-logo-xs.png +0 -0
  271. package/src/assets/images/icon_alert-xs.png +0 -0
  272. package/src/assets/images/icon_book.svg +12 -0
  273. package/src/assets/images/icon_bookmark.svg +12 -0
  274. package/src/assets/images/icon_close-pop.png +0 -0
  275. package/src/assets/images/icon_download.png +0 -0
  276. package/src/assets/images/icon_gear.svg +14 -0
  277. package/src/assets/images/icon_hamburger.svg +20 -0
  278. package/src/assets/images/icon_home.png +0 -0
  279. package/src/assets/images/icon_home.svg +21 -0
  280. package/src/assets/images/icon_home_ia.png +0 -0
  281. package/src/assets/images/icon_indicator.png +0 -0
  282. package/src/assets/images/icon_info.svg +11 -0
  283. package/src/assets/images/icon_one_page.svg +8 -0
  284. package/src/assets/images/icon_pause.svg +1 -0
  285. package/src/assets/images/icon_play.svg +1 -0
  286. package/src/assets/images/icon_playback-rate.svg +15 -0
  287. package/src/assets/images/icon_return.png +0 -0
  288. package/src/assets/images/icon_search_button.svg +8 -0
  289. package/src/assets/images/icon_share.svg +9 -0
  290. package/src/assets/images/icon_skip-ahead.svg +6 -0
  291. package/src/assets/images/icon_skip-back.svg +13 -0
  292. package/src/assets/images/icon_speaker.svg +18 -0
  293. package/src/assets/images/icon_speaker_open.svg +10 -0
  294. package/src/assets/images/icon_thumbnails.svg +12 -0
  295. package/src/assets/images/icon_toc.svg +5 -0
  296. package/src/assets/images/icon_two_pages.svg +9 -0
  297. package/src/assets/images/icon_zoomer.png +0 -0
  298. package/src/assets/images/loading.gif +0 -0
  299. package/src/assets/images/logo_icon.png +0 -0
  300. package/src/assets/images/marker_chap-off.png +0 -0
  301. package/src/assets/images/marker_chap-off.svg +11 -0
  302. package/src/assets/images/marker_chap-off_ia.png +0 -0
  303. package/src/assets/images/marker_chap-on.png +0 -0
  304. package/src/assets/images/marker_chap-on.svg +11 -0
  305. package/src/assets/images/marker_srch-on.svg +11 -0
  306. package/src/assets/images/marker_srchchap-off.png +0 -0
  307. package/src/assets/images/marker_srchchap-on.png +0 -0
  308. package/src/assets/images/nav_control-dn.png +0 -0
  309. package/src/assets/images/nav_control-dn_ia.png +0 -0
  310. package/src/assets/images/nav_control-up.png +0 -0
  311. package/src/assets/images/nav_control-up_ia.png +0 -0
  312. package/src/assets/images/nav_control.png +0 -0
  313. package/src/assets/images/one_page_mode_icon.png +0 -0
  314. package/src/assets/images/paper-badge.png +0 -0
  315. package/src/assets/images/print_icon.png +0 -0
  316. package/src/assets/images/progressbar.gif +0 -0
  317. package/src/assets/images/right_edges.png +0 -0
  318. package/src/assets/images/slider.png +0 -0
  319. package/src/assets/images/slider_ia.png +0 -0
  320. package/src/assets/images/thumbnail_mode_icon.png +0 -0
  321. package/src/assets/images/transparent.png +0 -0
  322. package/src/assets/images/two_page_mode_icon.png +0 -0
  323. package/src/assets/images/zoom_in_icon.png +0 -0
  324. package/src/assets/images/zoom_out_icon.png +0 -0
  325. package/src/css/BookReader.scss +89 -0
  326. package/src/css/_BRBookmarks.scss +29 -0
  327. package/src/css/_BRComponent.scss +13 -0
  328. package/src/css/_BRfloat.scss +197 -0
  329. package/src/css/_BRicon.scss +48 -0
  330. package/src/css/_BRmain.scss +251 -0
  331. package/src/css/_BRnav.scss +382 -0
  332. package/src/css/_BRpages.scss +139 -0
  333. package/src/css/_BRsearch.scss +226 -0
  334. package/src/css/_BRtoolbar.scss +84 -0
  335. package/src/css/_BRvendor.scss +5 -0
  336. package/src/css/_MobileNav.scss +194 -0
  337. package/src/css/_TextSelection.scss +32 -0
  338. package/src/css/_colorbox.scss +52 -0
  339. package/src/css/_controls.scss +244 -0
  340. package/src/css/_icons.scss +121 -0
  341. package/src/dragscrollable-br.js +261 -0
  342. package/src/jquery-wrapper.js +4 -0
  343. package/src/plugins/plugin.archive_analytics.js +86 -0
  344. package/src/plugins/plugin.autoplay.js +129 -0
  345. package/src/plugins/plugin.chapters.js +251 -0
  346. package/src/plugins/plugin.iframe.js +48 -0
  347. package/src/plugins/plugin.mobile_nav.js +287 -0
  348. package/src/plugins/plugin.resume.js +68 -0
  349. package/src/plugins/plugin.text_selection.js +291 -0
  350. package/src/plugins/plugin.url.js +198 -0
  351. package/src/plugins/plugin.vendor-fullscreen.js +247 -0
  352. package/src/plugins/search/plugin.search.js +439 -0
  353. package/src/plugins/search/view.js +440 -0
  354. package/src/plugins/tts/AbstractTTSEngine.js +242 -0
  355. package/src/plugins/tts/FestivalTTSEngine.js +169 -0
  356. package/src/plugins/tts/PageChunk.js +107 -0
  357. package/src/plugins/tts/PageChunkIterator.js +163 -0
  358. package/src/plugins/tts/WebTTSEngine.js +352 -0
  359. package/src/plugins/tts/plugin.tts.js +335 -0
  360. package/src/plugins/tts/tooltip_dict.js +15 -0
  361. package/src/plugins/tts/utils.js +91 -0
  362. package/src/util/browserSniffing.js +30 -0
  363. package/src/util/debouncer.js +26 -0
  364. package/src/util/docCookies.js +67 -0
  365. package/src/util/strings.js +34 -0
  366. package/tests/BookReader/BookModel.test.js +312 -0
  367. package/tests/BookReader/BookReaderPublicFunctions.test.js +164 -0
  368. package/tests/BookReader/DebugConsole.test.js +25 -0
  369. package/tests/BookReader/ImageCache.test.js +150 -0
  370. package/tests/BookReader/Mode1UpLit.test.js +87 -0
  371. package/tests/BookReader/Mode2Up.test.js +245 -0
  372. package/tests/BookReader/ModeSmoothZoom.test.js +149 -0
  373. package/tests/BookReader/Navbar/Navbar.test.js +169 -0
  374. package/tests/BookReader/PageContainer.test.js +187 -0
  375. package/tests/BookReader/ReduceSet.test.js +38 -0
  376. package/tests/BookReader/Toolbar/Toolbar.test.js +26 -0
  377. package/tests/BookReader/utils/HTMLDimensionsCacher.test.js +59 -0
  378. package/tests/BookReader/utils/classes.test.js +88 -0
  379. package/tests/BookReader/utils.test.js +136 -0
  380. package/tests/BookReader.options.test.js +39 -0
  381. package/tests/BookReader.test.js +301 -0
  382. package/tests/e2e/README.md +75 -0
  383. package/tests/e2e/autoplay.test.js +13 -0
  384. package/tests/e2e/base.test.js +35 -0
  385. package/tests/e2e/helpers/base.js +263 -0
  386. package/tests/e2e/helpers/debug.js +13 -0
  387. package/tests/e2e/helpers/desktopSearch.js +72 -0
  388. package/tests/e2e/helpers/mobileSearch.js +85 -0
  389. package/tests/e2e/helpers/mockSearch.js +93 -0
  390. package/tests/e2e/helpers/rightToLeft.js +29 -0
  391. package/tests/e2e/ia-production/ia-prod-base.js +17 -0
  392. package/tests/e2e/models/BookReader.js +11 -0
  393. package/tests/e2e/models/Navigation.js +56 -0
  394. package/tests/e2e/rightToLeft.test.js +20 -0
  395. package/tests/e2e/viewmode.test.js +37 -0
  396. package/tests/karma/BookNavigator/book-navigator.test.js +180 -0
  397. package/tests/karma/BookNavigator/bookmarks/bookmark-edit.test.js +133 -0
  398. package/tests/karma/BookNavigator/bookmarks/bookmarks-list.test.js +222 -0
  399. package/tests/karma/BookNavigator/downloads/downloads-provider.test.js +64 -0
  400. package/tests/karma/BookNavigator/downloads/downloads.test.js +54 -0
  401. package/tests/karma/BookNavigator/search/search-provider.test.js +23 -0
  402. package/tests/karma/BookNavigator/search/search-results.test.js +240 -0
  403. package/tests/karma/BookNavigator/sharing/sharing-provider.test.js +40 -0
  404. package/tests/karma/BookNavigator/visual-adjustments.test.js +201 -0
  405. package/tests/karma/BookNavigator/volumes/volumes-provider.test.js +160 -0
  406. package/tests/karma/BookNavigator/volumes/volumes.test.js +98 -0
  407. package/tests/plugins/plugin.archive_analytics.test.js +23 -0
  408. package/tests/plugins/plugin.autoplay.test.js +52 -0
  409. package/tests/plugins/plugin.chapters.test.js +130 -0
  410. package/tests/plugins/plugin.iframe.test.js +42 -0
  411. package/tests/plugins/plugin.mobile_nav.test.js +66 -0
  412. package/tests/plugins/plugin.resume.test.js +98 -0
  413. package/tests/plugins/plugin.text_selection.test.js +193 -0
  414. package/tests/plugins/plugin.url.test.js +129 -0
  415. package/tests/plugins/plugin.vendor-fullscreen.test.js +65 -0
  416. package/tests/plugins/search/plugin.search.test.js +173 -0
  417. package/tests/plugins/search/plugin.search.view.test.js +106 -0
  418. package/tests/plugins/tts/AbstractTTSEngine.test.js +153 -0
  419. package/tests/plugins/tts/FestivalTTSEngine.test.js +59 -0
  420. package/tests/plugins/tts/PageChunk.test.js +57 -0
  421. package/tests/plugins/tts/PageChunkIterator.test.js +179 -0
  422. package/tests/plugins/tts/WebTTSEngine.test.js +126 -0
  423. package/tests/plugins/tts/utils.test.js +133 -0
  424. package/tests/util/browserSniffing.test.js +56 -0
  425. package/tests/util/docCookies.test.js +15 -0
  426. package/tests/util/strings.test.js +63 -0
  427. package/tests/utils.js +80 -0
  428. package/webpack.config.js +85 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,540 @@
1
+ # 5.0.0-18
2
+ - Dev: Update a number of dependencies @cdrini
3
+ - Dev: Added eslint-plugin-no-jquery @soham4abc
4
+ - Feature: Add continuous pinch zooming for touch screens and trackpads! @cdrini
5
+ - This is a _big_ change to the codebase. It involved rewriting 1 up mode in LitElement. This means that BookReader now need webcomponents to function.
6
+ - Breaking changes (unlikely to be used by anyone):
7
+ - Most Mode1Up Bookreader global functions removed (unlikely to be used): `drawLeafsOnePage`, `onePageGetAutofitWidth`, `onePageGetAutofitHeight`, `onePageGetPageTop`, `onePageCalculateReductionFactors`, `centerX1up`, `centerY1up`
8
+ - Some Mode2Up cleanups: Removed `setClickHandler2UP`, `setMouseHandlers2UP`
9
+ - [Web components](https://caniuse.com/custom-elementsv1) now must be supported
10
+ - Reduction factors options no longer applies to 1up
11
+
12
+ # 5.0.0-17
13
+ - Fix: focus in a textarea disables keyboard shortcuts @cdrini
14
+
15
+ # 5.0.0-16
16
+ - Dev: remove unused menu toggle plugin @iisa
17
+ - Fix: Book nav loader safari update @iisa
18
+
19
+ # 5.0.0-15
20
+ - Fix: Typing -/+ in search box no longer zooms @cdrini
21
+ - Dev: Add script for updating dev deps @cdrini
22
+ - Refactor/Fix: Convert search/TTS highlights to use SVG layer @cdrini
23
+ - Fix TTS highlights not positioned correctly in Mode1Up
24
+ - Breaking changes (unlikely these are used by anyone):
25
+ - Remove public method `BookReader.prototype.keyboardNavigationIsDisabled`
26
+ - Remove public method `BookReader.util.sleep`
27
+ - Remove public method `BookReader.prototype.updateSearchHilites1UP`
28
+ - Remove public method `BookReader.prototype.updateSearchHilites2UP`
29
+ - Remove public attribute `BookReader.prototype.ttsHilites`
30
+
31
+ # 5.0.0-14
32
+ - Fix: Url search param `q=` updates dynamically @nsharma123
33
+ - Fix: Downloads menu text updates @dualcnhq
34
+ - Fix: Volumes updates - icons, labelling, open menu onload @iisa
35
+
36
+ # 5.0.0-13
37
+ - Enhancement: Add neutral state for sorting volumes @dualcnhq
38
+ - Enhancement: Update subfiles/volumes title sorting logic by filename -> title_asc -> title_desc order then back to filename @dualcnhq
39
+ - Fix: Volume item index count display @dualcnhq
40
+
41
+
42
+ # 5.0.0-12
43
+ - Fix: new side panel: sortable multiple volumes @dualcnhq @iisa
44
+ - Fix: sharing side panel can share subfile/volume @iisa
45
+
46
+ # 5.0.0-11
47
+ - Fix: standardize button style for download panel @nsharma123
48
+ # 5.0.0-10
49
+ - Fix: Make 1up default to full width (up to real world size) @cdrini
50
+ - Fix: Remove "page" from toolbar @cdrini
51
+ - Dev: Update menu slider @iisa
52
+ - Dev: Add semi-colons eslint rule @iisa
53
+
54
+ # 5.0.0-9
55
+ - Fix: search-inside results check for page's index via `leafNum` @nsharma123
56
+ # 5.0.0-8
57
+ - Fix: cancel search fix naming var @iisa
58
+
59
+ # 5.0.0-7
60
+ - Fix: cancel search @iisa
61
+ - Dev: remove dead css @cdrini
62
+ - Dev: GHA node_modules caching @cdrini
63
+ # 5.0.0-6
64
+ - Fix: Fullscreen toggle sets/unsets animating flag @iisa
65
+ # 5.0.0-5
66
+ - Fix: Book Nav: resize only when bookreader is not animating @iisa
67
+ - Fix: Web components register themselves at EOF @iisa
68
+ - Dev: update dependencies with dependabot @drini
69
+ # 5.0.0-4
70
+ - Dev: update bookmarks login archive_analytics @iisa @dualcnhq
71
+
72
+ # 5.0.0-3
73
+ - Fix: bookmarks panel has login CTA @dualcnhq @iisa
74
+
75
+ # 5.0.0-2
76
+ - Dev: update testing dependencies @cdrini
77
+ - Dev: update dev-flow dependencies @cdrini
78
+ - Dev: reorganize core BR files @cdrini
79
+ - Dev: update build files @cdrini
80
+ - Fix: update needed imports for older iOS versions @cdrini
81
+ - Fix: `<ia-bookreader>` does not use full browser width to fit into container @iisa
82
+ - Fix: updates to `<book-navigator>` to upgrade archive.org's liner notes display to v5 @iisa
83
+
84
+ # 5.0.0-1
85
+ - Actually delete the files mentioned in previous release @cdrini
86
+ - Dev: Organize BookNavigator files @iisa
87
+ - Fix: Search results not in correct place in Mode1Up @cdrini
88
+
89
+ # 5.0.0-0
90
+ First beta release of v5! Lots of breaking changes:
91
+ - Files deleted from `BookReader/` . These are all no longer needed, or bundled in other BookReader JS files
92
+ - jquery.bt.min.js
93
+ - plugin.theme.js - including methods:
94
+ - BookReader.prototype.themes
95
+ - BookReader.prototype.updateTheme
96
+ - BookReader.prototype.default_theme
97
+ - BookReader.prototype.theme
98
+ - option enableThemesPlugin
99
+ - excanvas.compiled.js
100
+ - plugin.print.js - including methods:
101
+ - BookReader.prototype.printPage
102
+ - BookReader.prototype.getPrintURI
103
+ - BookReader.prototype.getPageFile
104
+ - jquery.browser.min.js
105
+ - soundmanager/*
106
+ - jquery.ui.touch-punch.min.js
107
+ - mmenu/*
108
+ - jquery-ui-1.12.0.min.js
109
+ - BookReader now also requires web components; more documentation on how to use will be coming in the next beta versions.
110
+ - BookNavigator is a web component wrapper around core BookReader
111
+ - Add Karma for testing web components
112
+ - Switch to npm module type to allow importing of web components
113
+ - Use submenu web components for search, book info, and other
114
+ - New Bookmark managing submenu
115
+ - Bug fixes
116
+ - BookReader/ build files directory is now completely disposable
117
+
118
+ # 4.40.2
119
+ -Fix: page container has `data-side` attr @iisa
120
+
121
+ # 4.40.1
122
+ - Fix: Support /search/TERM in url @nsharma123
123
+ - Dev: Fix reference to deprecated pruneUnused @cdrini
124
+
125
+ # 4.40.0
126
+ - Dev: Separate ModeThumb into separate file @cdrini
127
+ - Feature: Progressive loading of higher resolution images @cdrini
128
+ - Potentially breaking change: `data-(side|leaf|reduce|row)` no longer set
129
+ - Potentially breaking change: mode class no longer set on page container
130
+ - A number of deprecated methods converted to no-ops with `console.warn`
131
+ - Feature: pow2 reduce by default @cdrini
132
+ - New option: `reduceSet: 'pow2' | 'integer' = 'pow2'` limits reduce variables sent to getURI to be powers of 2
133
+ - Dev: Add esbuild to `npm run serve-dev` @iisa
134
+ - Fix: BookNavigator loaded after JSIAInit @cdrini
135
+
136
+ # 4.39.3
137
+ - Hotfix: Fix iOS 8 erroring since 4.39.0 @cdrini
138
+
139
+ # 4.39.2
140
+ - Dev: update Readme @Himanshunitrr
141
+ - Dev: in-file typo fixes @cclauss
142
+ - Fix: v5 booknav refresh @iisa @dualcnhq
143
+ # 4.39.1
144
+ - Dev: update Readme @Himanshunitrr
145
+ - Fix: v5 bookmarks menu update @iisa @dualcnhq
146
+ # 4.39.0
147
+ - Feature: Mode1Up DPI awareness @cdrini
148
+ - Introduces two new optional options: `ppi` and `PageData.ppi`
149
+ - Potentially breaking change: zooming in Mode1Up will now zoom at different intervals
150
+
151
+ # 4.38.0
152
+ Dev: update dependencies @cdrini
153
+ Dev: replace travis badge with GHA badge @cdrini
154
+ Feature: Thumbnail/Gallery view reusing best scaled images @iisa
155
+ Fix: simplify ImageCache dictionary @iisa
156
+
157
+ # 4.37.0
158
+ Fix: new ImageCache that keeps track of requested images & their scale factor @iisa
159
+ Fix: 2up mode's use of ImageCache @iisa
160
+ # 4.36.0
161
+ Fix: More image caching - 2up, some sharing with thumbnail draw @iisa
162
+
163
+ # 4.35.1
164
+ Fix: 2up, `baseLeafCss` - use function to find "top" value @iisa
165
+ # 4.35.0
166
+ Fix: show text selection layer if word count is less than 2,500 @cdrini
167
+ Fix: 2up, only resize spread if current image is better than next size @iisa
168
+ # 4.34.0
169
+ Fix: exist fullscreen will change to 2up if 2up is available @iisa
170
+ # 4.33.0
171
+ Fix: use optional `srcSet` in 1up mode @iisa
172
+ # 4.32.0
173
+ Fix: slim down prefetch group @iisa
174
+ Fix: TTS caches xml @cdrini
175
+ # 4.31.0
176
+ Dev: demo cleanup with @cdrini
177
+ Fix: 2up - pass reduction factors when creating image urls @iisa
178
+ # 4.30.0
179
+ Fix: all view modes on desktop & view mode toggl on mobile are now default. @nsharma123
180
+
181
+ # 4.28.0
182
+ Fix: adding alt tags to images @nsharma123
183
+ # 4.27.0
184
+ Fix: update init function to use new flag `autoResize` @iisa
185
+ Fix: images - `useSrcSet` flag to determine when we fill `srcSet` attribute @iisa
186
+ # 4.26.1
187
+ Patch: Text selection layer does not get made in thumbnail view @dualcnhq
188
+ # 4.26.0
189
+ Dev: move to Github actions @cdrini
190
+ Dev: version bumps @dependabot
191
+ Fix: Text selection layer gets created for first page, does not get created for last page @dualcnhq
192
+
193
+ # 4.25.0
194
+ Fix: Helper changes for stream redirection to read hash fragment params from URL @nsharma123
195
+
196
+ # 4.24.0
197
+ Fix: Bookreader layout when initialized in "ReadAloud" mode @nsharma123
198
+
199
+ # 4.23.0
200
+ Fix: first search result click now updates url @nsharma123
201
+
202
+ # 4.22.0
203
+ Fix: update non-asserted page labelling next to nav scrubber @iisa
204
+
205
+ # 4.21.0
206
+ - Fix: Search Plugin Updates (#556) @iisa
207
+ - always display search results markers
208
+ - update search results nav tap targets & style
209
+ - Search Results Nav - extend click events
210
+ - add new click event to help toggle side menu
211
+ - add new test file for Search view
212
+ - Dev: move search plugin test files to their own directory (#556) @iisa
213
+
214
+ # 4.20.1
215
+ - Fix: Handle empty dejavu.xml files in text selection plugin @iisa
216
+
217
+ # 4.20.0
218
+ - Dev: Update 9 dependencies (including webpack, sass, @babel/*) @dependabot-preview + @cdrini
219
+ - Dev: Move dragscroll code into src @cdrini
220
+ - Dev: Make webpack treat jquery as an external dependency @cdrini
221
+ - Fix: Samsung Internet not loading BR on IA @cdrini
222
+
223
+ # 4.19.0
224
+ - Fix: `<br>` rendered in search panel @ArunTeltia
225
+ - Fix: TTS speed dropdown has white text on white in Chrome @participator
226
+ - Dev: Replace dependency copies with npm packages (jquery, jquery-ui, mmenu, colorbox, touch-punch, jquery.browser) @cdrini
227
+ - Fix: Use serif font for advance/review icons @Eilima
228
+ - Fix: Table of contents has black text on black background @xhalin01
229
+ - Dev: Delete empty files (BookReaderEmbed.css, mmenu/demo.css) @cdrini
230
+ - Dev: Move images into src directory and compress SVG files @cdrini
231
+ - Fix: TTS toolbar should not be in tab order when invisible @shaneriley @cdrini
232
+ - Fix: Text selection not working in demos @cdrini
233
+ - Fix: Text selection throwing error on page with index=-1 @cdrini
234
+
235
+ # 4.18.7
236
+ Fix: update fullscreen toggle methods to fire behaviors in an expected way @iisa
237
+
238
+ # 4.18.6
239
+ - Fix: use fullscreen toggle flow when starting fullscreen (#499) @iisa
240
+
241
+ # 4.18.5
242
+ - Fix: Waits to resize until first result flipped to (#498) @shaneriley
243
+
244
+ # 4.18.4
245
+ - Fix: Adds data attribute to 2up page containers for side designation @shaneriley
246
+ - Fix: Apdate interstitial modal to fixed with & clean up messaging @iisa
247
+
248
+ # 4.18.3
249
+ - Fix: Enrich context to search emitted events @iisa
250
+ - Fix: Hides directional buttons and shows viewmode buttons on mobile viewports @shaneriley
251
+
252
+ # 4.18.2
253
+ - Fix: Search plugin fixes (#491) @shaneriley
254
+
255
+ # 4.18.1
256
+ - Fix: Skips subsequent creation of search views when setup called 1+n times @shaneriley
257
+
258
+ # 4.18.0
259
+ - Dev: Add eslint for `space-after-keywords`, `space-before-blocks`, `only-multiline` @Yashs911
260
+ - Dev: Update eslint, sinon, @types/jest, testcafe, sass, webpack @dependabot-preview + @cdrini
261
+ - Dev: Add 3 more files to eslint @Yashs911
262
+ - Feature: New options for text selection plugin: single page DJVU XML url @cdrini
263
+
264
+ # 4.17.0
265
+ - Fix: text selection on Safari @cdrini
266
+ - Feature: Search results navigation bar @shaneriley
267
+
268
+ # 4.16.0
269
+ - Dev: Emit custom event to trigger @iisa
270
+ - Feature: Text selection plugin @Pyrojet99
271
+ - Fix: Wrong openlibrary URL @cdrini
272
+ - Dev: update sinon, jest, concurrently, testcafe, eslint, @types/jest, webpack-cli, @babel/core, @babel/preset-env, node-fetch @dependabot-preview + @cdrini
273
+ - Fix: Flaky TestCafe tests (#436) @cdrini
274
+ - Fix: Search plugin fixes (#443) @shaneriley
275
+ - Dev: Upgrade to Webpack 5 @cdrini
276
+ - Fix: Polyfill CustomEvent constructor @cdrini
277
+ - Fix: HTML escaping to prevent XSS (#434) @nsharma123
278
+
279
+ # 4.15.0
280
+ - Dev: update lodash dependency @dependabot-preview + @cdrini
281
+ - Dev: Moves /BookReaderDemo/index.html to /index.html (#394) @anirbansaha782
282
+ - Fix: Prevents page flipping to last page if navigating to previous page from a book's cover (#419) @iisa
283
+ - Feature: Splits search plugin controller and view, updates mobile menu styles (#420) @shaneriley
284
+ - Dev: Updates to e2e testing navigation model & base tests (#421) @iisa
285
+
286
+ # 4.14.3
287
+ - Fix: Zoom buttons missing on mobile + other chrome fixes (#416) @shaneriley
288
+
289
+ # 4.14.2
290
+ - Dev: Make npm package public (#414) @cdrini
291
+
292
+ # 4.14.1
293
+ - Dev: Automate npm publishing on github release (#409, #412) @cdrini
294
+
295
+ # 4.14.0
296
+ - Dev: Simplify webpack file (#373) @cdrini
297
+ - Feature: One page/Two page/Thumbnail view now one button toggler (#375) @shaneriley
298
+ - Fix: Advanced page demo broken (#383) @Pyrojet99
299
+ - Fix: Pages randomly flipping on /stream endpoint (#386) @Pyrojet99
300
+ - Feature: Display high quality images on high resolution displays (#378) @Pyrojet99
301
+ - Dev: Add eslint for newline at end of file (#396) @JanviMahajan14
302
+ - Dev: update a bunch of dependencies @dependabot-preview + @cdrini
303
+ - Dev: Speed up Travis (a bit) by making it run testcafe concurrently (#407) @cdrini
304
+ - Feature: New chrome for BookReader! (#381) @shaneriley
305
+
306
+ # 4.13.1
307
+ - Fix: Toc entries not showing page number on desktop (#369) @cdrini
308
+
309
+ # 4.13.0
310
+ - Fix: BookReader.unbind not actually unbinding (#360) @shaneriley
311
+ - Dev: New demo with configurable IA id: `demo-internetarchive.html?ocaid=foo` (#356) @Pyrojet99
312
+ - Dev: Add E2E tests for right-to-left books (#350) @Pyrojet99
313
+ - Dev: Update core-js, webpack, \@types/jest, regenerator-runtime @dependabot-preview + @cdrini
314
+ - Fix: Remembers page for multi-book items on IA (#359) @mc2
315
+ - Feature: Table of contents panel in mobile view (#351) @Pyrojet99
316
+
317
+ # 4.12.0
318
+ - Fix: Test command for Windows users @cdrini
319
+ - Dev: Autoplay e2e test @pyrojet99
320
+ - Dev: Enable eslint for tests @Kartik1397
321
+ - Dev: Mobile search e2e test @pyrojet99
322
+ - Fix: Extra querystring after hash @kristopolous
323
+ - Dev: Update websocket-extensions, sinon, testcafe @cdrini
324
+ - Feature: Visual adjustments checkboxes on mobile @pyrojet99
325
+
326
+ # 4.11.1
327
+ - Fix: search urls now redirect to query parameter `q=foo` @mc2
328
+
329
+ # 4.11.0
330
+ - Dev: Add E2E tests for searching on desktop @Pyrojet99
331
+ - Fix: Search result not highlighted when landing on page with matches @iisa
332
+ - Dev: Remove console logs from jest tests @NayamAmarshe
333
+ - Dev: Add eslint for space-infix-ops @JanviMahajan14
334
+ - Fix: Bugs in search results in preview books @iisa
335
+ - Fix: `startFullscreen` option only working for mode2up @shaneriley
336
+ - Fix: Prefetch viewable pages in preview books for smoother flipping @cdrini
337
+ - Dev: Add dependabot for JS dependencies @cdrini
338
+ - Dev: Update codecov, iso-language-codes @dependabot-preview + @cdrini
339
+
340
+ # 4.10.0
341
+ - Fix: BR shouldn't change URL until the user interacts with the page @mc2
342
+ - Feature: Add `startFullscreen` option to launch in fullscreen @shaneriley
343
+ - Feature (beta): Preview pages can be swapped out with search pin clicking @cdrini
344
+
345
+ # 4.9.0
346
+ - Fix: -/+ buttons not zooming in Chrome @ishank-dev
347
+ - Add chapters demo to e2e tests @ishank-dev
348
+ - Make Travis testcafe runs less flaky @shaneriley
349
+ - Pin npm version dependencies for consistent builds @cdrini
350
+ - Standardize HTML structure for pages across view modes @shaneriley
351
+ - WARNING: Some of the html elements/classes have changed. Potentially breaking change.
352
+ - Feature (beta): Preview pages. Specifying `viewable: false` on pages causes them to render a preview image placeholder. @cdrini
353
+ - Remove deprecated QUnit tests @Pyrojet99
354
+ - Remove console.logs in test output @NayamAmarshe
355
+
356
+ # 4.8.0
357
+ - Adds customizable layout controls @shaneriley
358
+
359
+ # 4.7.1
360
+ - Add new parameters to analytics @bfalling
361
+
362
+ # 4.7.0
363
+ Big change: All of BookReader core is now compiled to es5, and a large number of
364
+ chunks have been re-written in es6. Care has been taken to ensure no public APIs
365
+ have changed, but note this was a big change.
366
+
367
+ - Extract large chunks of BookReader.js into separate files, into es6; @cdrini
368
+ - Increase jest coverage 47% → 58%; @cdrini
369
+ - Increase testcafe coverage; @iisa @shaneriley
370
+
371
+ # 4.6.0
372
+ Big change: all the plugins are now written in es6, and compiled to es5. There should
373
+ be no observable changes, but note this was a big change.
374
+
375
+ - Fix: UI on archive.org not consistent with demos due to CSS conflicts; @rchrd2
376
+ - Convert all plugins to es6 + webpack; @cdrini @iisa @nsharma123
377
+ - Increase jest coverage 39% → 47%; @cdrini @iisa @nsharma123
378
+ - Increase testcafe coverage; @iisa
379
+ - Add testcafe to travis; @cdrini
380
+ - Add more/enforce more lint rules; @cdrini
381
+ - Make demo pages more in sync with Internet Archive pages; @mc2
382
+ - Add `npm run serve-dev` for auto-watching + auto-refreshing dev server; @cdrini
383
+
384
+ # 4.5.1
385
+ - Fix: Click-to-flip now works in 2up mode zoomed in
386
+ - Fix: Image panning sometimes not working
387
+ - Fix #144: Hamburger icon only clickable on lines
388
+ - Add TestCafe support
389
+
390
+ # 4.5.0
391
+ - ReadAloud now supports jumping backwards
392
+ - Pressing -/= (or -/+ on numpad) zooms out/in
393
+ - FIX #179: ReadAloud now ignores hyphens between lines
394
+
395
+ # 4.4.2
396
+ - more robust menu toggle plugin, working well with zoom & panning around in zoom
397
+ - more tests
398
+
399
+ # 4.4.1
400
+ - Remove accidental es6 syntax in BookReader.js (breaking IE11)
401
+
402
+ # 4.4.0
403
+ - New ReadAloud controls + engine. Uses browser's SpeechSynthesis API instead of server-side test-to-speech
404
+
405
+ # 4.3.2
406
+ - menu toggle plugin, now applies to in-page & fullscreen views + early escapes when navbar isn't present
407
+
408
+ # 4.3.0
409
+ - New plugin, `fullscreen_menu_toggle`, allowing center-tap to hide UI
410
+ - TTS Plugin logs analytics events (if enabled)
411
+ - ES6 compilation step no longer performed on client; build files are included in repo so clients have no build step
412
+
413
+ # 4.2.5
414
+ - Large refactor of plugin.tts.js
415
+ - ES6 compliation step
416
+ - Known bug: Clicking on page while TTS is playing won't stop the playback
417
+
418
+ # 4.2.4
419
+ - Skips initialization of vendor fullscreen plugin when on a mobile device
420
+
421
+ # 4.2.3
422
+ - Creates vendor native fullscreen plugin and example use page
423
+
424
+ # 4.2.2
425
+ - Adds options for flipSpeed and flipDelay, the latter used for autoplay
426
+
427
+ # 4.2.1
428
+ - Fix rapid reload bug from thumbnail view
429
+
430
+ # 4.2.0
431
+ - Add eslint
432
+ - Fix issue analytics plugin
433
+ - Make the page display more extendable by splitting it into two functions
434
+
435
+ # 4.1.0
436
+ - Change BookReader.js function comments to JSDoc
437
+ - Move autoplay feature into an optional plugin
438
+ - Change the format of the current page string in the navbar. eg "1 / 100 (Cover)"
439
+ - Add BookReader.prototype.updateFirstIndex and use instead of setting this.firstIndex directly
440
+ - Simplify BookReader.prototype.init
441
+
442
+ # 4.0.1
443
+ - Add options.navBarTitle, which gets shown to the left of the scrubber.
444
+ - Fix issue where there was a 1px border on cover leafEdge
445
+
446
+ # 4.0.0
447
+ V4 was driven by updating BookReader to work inline on the archive.org details page. This required code refactoring (eg: changing ids to classes), and also updating the design so it integrates well within the details page theatre section.
448
+
449
+ - BookReader selectors made relative to BookReader. This means it shouldn't interfere with parent page, and also more than one BookReader instance can be on the page.
450
+ - CSS converted to SASS and refactored.
451
+ - New design with full-screen support.
452
+ - URL plugin is extended to support replaceState, and also configure which params are reflected into the URL fragment.
453
+ - In transition: JavaScript code is formatted with 2 spaces instead of 4
454
+
455
+ # 3.2.1
456
+ - Fix so initParams normalizes params.page to params.index, to prevent complexity of priority of page versus index.
457
+
458
+ # 3.2.0
459
+ On Archive.org, we needed a way to pass in a default start page for books. These changes make that easier.
460
+
461
+ - Update the way bookreader inits from various params contexts
462
+ - Add `defaults` to the init options
463
+ - Update so that mode is only reflected on URL if user has made a change.
464
+ - Update to handle both params.index and params.page when provided in defaults. Separate page parsing into separate method.
465
+
466
+ # 3.1.0
467
+ - Add new IFrame plugin to enable two-way communication between a BookReader inside an `<iframe>` and its parent window.
468
+ - Move the `paramsFromCurrent`, `paramsFromFragment`, and `fragmentFromParams` methods back into BookReader core and out of the URL Plugin. This change should be backwards-compatible with previous versions.
469
+ - Fire a new event, `fragmentChange`, on BookReader when the reader’s state changes.
470
+
471
+ # 3.0.8
472
+ - Add additional tracking event when view changes
473
+
474
+ # 3.0.7
475
+ - Fix: Assign options.titleLeaf to this.titleLeaf
476
+
477
+ # 3.0.6
478
+ - Another fix for plugin.search.js. The path GET param should not have a trailing slash.
479
+
480
+ # 3.0.5
481
+ - Hotfix for plugin.search.js. Fixes issue where search results were not rendered on page flip.
482
+
483
+ # 3.0.4
484
+ - Hotfix for plugin.search.js. Fixes fulltext search for some books on Archive.org
485
+
486
+ # 3.0.3
487
+ - Add more options: showToolbar, showLogo
488
+ - Add this.options field, which stores the options last used in setup call
489
+ - Improve `_getDataFlattened` to have simple cache breaker
490
+ - Fix: don't show search UI if this.enableSearch is false
491
+ - Fix: add missing 'defaults' option to search plugin
492
+ - Move constants out of instance, and into class (eg BookReader.constMode1up)
493
+
494
+ # 3.0.2
495
+ In the process of upgrading IA, to use the new BookReader API, more changes/fixes were made.
496
+
497
+ - Separate default options into BookReader.defaultOptions. This allows clients which use Internet Archive's JSIA endpoint (see demo-ia-plato.html) to have a hook into changing options. Also update plugins, to extend defaultOptions instead of modifying options in setup functions.
498
+ - Add BookReader.version, which helps IA support older versions in the JSIA endpoint (eg https://archive.org/bookreader/BookReaderJSLocate.php?id=theworksofplato01platiala&subPrefix=theworksofplato01platiala).
499
+ - Bring some IA-specific code into plugin.chapters.js
500
+ - Add more options that were previously missed (protected, olHost, subPrefix, bookPath, zip, imageFormat, bookId). These are mostly for plugins. If you intend on using any of the plugins, you can see the full config options there.
501
+
502
+ # 3.0.1
503
+ - Fix issue setting info and share dialogs
504
+
505
+ # 3.0.0 Major Release
506
+
507
+ Version 3.0.0 is an effort to make BookReader more modular, extensible, and easier to use.
508
+
509
+ Changes include:
510
+
511
+ - Make BookReader easier to use, by adding `options` to the constructor, and adding new `options.data` option. The old way of overriding properties should still work, but it is deprecated. With `options.data`, all BookReader needs is the image URLs and dimensions. To have dynamic image URLs (eg for scaling), omit the URL from `options.data`, and include `options.getPageURI`.
512
+ - Factor out extra features into plugins. See `plugins` directory. Example plugins include:
513
+ - plugins.chapters.js - render chapter markers
514
+ - plugins.search.js - add search ui, and callbacks
515
+ - plugins.tts.js - add tts (read aloud) ui, sound library, and callbacks
516
+ - plugins.url.js - automatically updates the browser url
517
+ - plugins.resume.js - uses cookies to remember the current page
518
+ - plugins.mobile_nav.js - adds responsive mobile nav to BookReader
519
+ Note that there is minor overhead added when loading multiple script tags. If this is a concern, a build step, can be used to concatenate the files into a single JS file.
520
+ - Clean up code: Remove a lot of commented-out code. Remove some unused methods.
521
+ - Change some, but not all, CSS ids to classes.
522
+ - DEPRECATED: Use options to configure BookReader. It is now deprecated to change properties directly.
523
+ - DEPRECATED: CSS ids are being removed, (eg #BookReader is now .BookReader), with the goal to entirely use classes instead. This is in progress, but it is considered deprecated to use the ids directly. We would like to remove all ids for the next major release.
524
+ - BREAKING: If features that are now in plugins were used, the plugin's JS file will need to be included as well. Note, we would also like to separate the CSS into a separate file for the next major release.
525
+
526
+ # 2.1.0
527
+ - Add auto mode to 1up autosize (in addition to height and width)
528
+ - Remove the old responsiveAutofit (which is not needed anymore)
529
+
530
+ # 2.0.2
531
+ - Fix regex issue when searching
532
+ - Make the search api endpoint configurable
533
+
534
+ # 2.0.1
535
+ - Add package.json and CHANGELOG
536
+ - Remove more IA-specific code
537
+
538
+ # 2.0.0
539
+ - Major release
540
+ - Many changes from updated Archive.org bookreader brought back to this open source project.
@@ -0,0 +1,7 @@
1
+ # Contributing
2
+
3
+ - Please try to follow the code style within the file (spacing/comments/etc).
4
+ - Please only submit merge requests for features that would be useful for the general use
5
+ - Please try to avoid adding new libraries
6
+ - If the PR is a bug fix, include a link to a jsbin/codepen if possible
7
+ - Please test the changes in desktop, mobile, and embed modes, and also on many different devices/browsers.