@internetarchive/bookreader 5.0.0-111 → 5.0.0-113

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 (35) hide show
  1. package/BookReader/BookReader.css +13 -7
  2. package/BookReader/BookReader.js +43 -1
  3. package/BookReader/BookReader.js.map +1 -1
  4. package/BookReader/ia-bookreader-bundle.js +3 -45
  5. package/BookReader/ia-bookreader-bundle.js.map +1 -1
  6. package/BookReader/plugins/plugin.chapters.js +2 -2
  7. package/BookReader/plugins/plugin.chapters.js.map +1 -1
  8. package/BookReader/plugins/plugin.experiments.js +1 -1
  9. package/BookReader/plugins/plugin.experiments.js.map +1 -1
  10. package/BookReader/plugins/plugin.search.js +1 -1
  11. package/BookReader/plugins/plugin.search.js.map +1 -1
  12. package/BookReader/plugins/plugin.text_selection.js +1 -23
  13. package/BookReader/plugins/plugin.text_selection.js.map +1 -1
  14. package/BookReader/plugins/plugin.translate.js +3 -25
  15. package/BookReader/plugins/plugin.translate.js.map +1 -1
  16. package/BookReader/plugins/plugin.tts.js +1 -1
  17. package/BookReader/plugins/plugin.tts.js.map +1 -1
  18. package/BookReader/plugins/plugin.url.js +1 -2
  19. package/BookReader/plugins/plugin.url.js.map +1 -1
  20. package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
  21. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/BookReader/Navbar/Navbar.js +9 -10
  24. package/src/BookReader/utils/SelectionObserver.js +2 -2
  25. package/src/BookReader.js +5 -4
  26. package/src/css/_BRpages.scss +5 -2
  27. package/src/css/_TextSelection.scss +15 -9
  28. package/src/plugins/plugin.experiments.js +31 -5
  29. package/src/plugins/plugin.text_selection.js +19 -56
  30. package/src/plugins/translate/plugin.translate.js +68 -22
  31. package/src/plugins/tts/utils.js +1 -1
  32. package/src/plugins/url/UrlPlugin.js +2 -15
  33. package/src/plugins/url/plugin.url.js +7 -59
  34. package/src/util/TextSelectionManager.js +834 -137
  35. package/BookReader/plugins/plugin.url.js.LICENSE.txt +0 -1
@@ -533,7 +533,7 @@ svg.BRPageLayer {
533
533
  bottom: 0;
534
534
  }
535
535
 
536
- .BRpageFlipping .BRtextLayer {
536
+ .BRpageFlipping .BRpagecontainer:not(:has(hypothesis-highlight)):not(:has(.BRhighlight)) .BRtextLayer {
537
537
  display: none;
538
538
  }
539
539
 
@@ -2205,11 +2205,6 @@ ia-bookreader .BRtoolbar {
2205
2205
  color: transparent;
2206
2206
  }
2207
2207
 
2208
- .BRtextLayer ::target-text {
2209
- background-color: hsla(45, 80%, 66%, 0.6);
2210
- color: transparent;
2211
- }
2212
-
2213
2208
  .BRtranslateLayer ::selection {
2214
2209
  background: hsla(210, 74%, 62%, 0.4);
2215
2210
  }
@@ -2226,7 +2221,7 @@ ia-bookreader .BRtoolbar {
2226
2221
  content: "-";
2227
2222
  }
2228
2223
 
2229
- .BRsmooth-zooming .BRpagecontainer:not(.BRpagecontainer--hasSelection):not(:has(hypothesis-highlight)) .BRtextLayer, .BRscrolling-active .BRpagecontainer:not(.BRpagecontainer--hasSelection):not(:has(hypothesis-highlight)) .BRtextLayer {
2224
+ .BRsmooth-zooming .BRpagecontainer:not(.BRpagecontainer--hasSelection):not(:has(hypothesis-highlight)):not(:has(.BRhighlight)) .BRtextLayer, .BRscrolling-active .BRpagecontainer:not(.BRpagecontainer--hasSelection):not(:has(hypothesis-highlight)):not(:has(.BRhighlight)) .BRtextLayer {
2230
2225
  display: none;
2231
2226
  }
2232
2227
 
@@ -2346,6 +2341,17 @@ ia-bookreader .BRtoolbar {
2346
2341
  opacity: 1;
2347
2342
  }
2348
2343
 
2344
+ .BRtextLayer .BRhighlight {
2345
+ background-color: yellow;
2346
+ pointer-events: all;
2347
+ color: transparent;
2348
+ }
2349
+
2350
+ .BRtextLayer .BRhighlight--target-text, .BRtextLayer ::target-text {
2351
+ background-color: hsla(45, 80%, 66%, 0.6);
2352
+ color: transparent;
2353
+ }
2354
+
2349
2355
  /**
2350
2356
  * Hide modal-manager that loads item-navigator-modal
2351
2357
  * loading bookmarks related alert messages