@d-i-t-a/reader 2.3.6 → 2.3.8

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.
package/dist/esm/index.js CHANGED
@@ -51075,6 +51075,7 @@ var TextHighlighter = class {
51075
51075
  window.addEventListener("resize", this.toolboxPlacement.bind(this));
51076
51076
  }
51077
51077
  doc.addEventListener("selectionchange", this.toolboxPlacement.bind(this));
51078
+ doc.addEventListener("selectionchange", this.toolboxShowDelayed.bind(this));
51078
51079
  el.addEventListener("mousedown", this.toolboxHide.bind(this));
51079
51080
  el.addEventListener("touchstart", this.toolboxHide.bind(this));
51080
51081
  if (this.isAndroid()) {
@@ -56119,9 +56120,6 @@ var SearchModule = class {
56119
56120
  self2.currentChapterSearchResult = [];
56120
56121
  self2.currentSearchHighlights = [];
56121
56122
  var localSearchResultChapter = [];
56122
- if (this.navigator.rights.enableContentProtection) {
56123
- this.navigator.contentProtectionModule?.deactivate();
56124
- }
56125
56123
  await this.searchAndPaintChapter(searchVal, index2, async (result) => {
56126
56124
  localSearchResultChapter = result;
56127
56125
  goToResultPage(1);
@@ -56209,6 +56207,9 @@ var SearchModule = class {
56209
56207
  }
56210
56208
  }
56211
56209
  async searchAndPaintChapter(term, index2 = 0, callback) {
56210
+ if (this.navigator.rights.enableContentProtection) {
56211
+ this.navigator.contentProtectionModule?.deactivate();
56212
+ }
56212
56213
  const linkHref = this.publication.getAbsoluteHref(this.publication.readingOrder[this.navigator.currentResource() ?? 0].Href);
56213
56214
  let tocItem = this.publication.getTOCItem(linkHref);
56214
56215
  if (tocItem === null) {
@@ -56288,6 +56289,9 @@ var SearchModule = class {
56288
56289
  this.bookSearchResult = [];
56289
56290
  reset();
56290
56291
  await this.searchAndPaintChapter(term, 0, async () => {
56292
+ if (this.navigator.rights.enableContentProtection) {
56293
+ this.navigator.contentProtectionModule?.recalculate(200);
56294
+ }
56291
56295
  });
56292
56296
  if (current) {
56293
56297
  await this.searchBook(term);
@@ -56325,6 +56329,9 @@ var SearchModule = class {
56325
56329
  this.navigator.navigate(position);
56326
56330
  setTimeout(() => {
56327
56331
  this.searchAndPaintChapter(item.textMatch, filteredIndex, async () => {
56332
+ if (this.navigator.rights.enableContentProtection) {
56333
+ this.navigator.contentProtectionModule?.recalculate(200);
56334
+ }
56328
56335
  });
56329
56336
  }, 300);
56330
56337
  }
@@ -56356,6 +56363,9 @@ var SearchModule = class {
56356
56363
  this.navigator.navigate(position);
56357
56364
  setTimeout(() => {
56358
56365
  this.searchAndPaintChapter(item.textMatch, filteredIndex, async () => {
56366
+ if (this.navigator.rights.enableContentProtection) {
56367
+ this.navigator.contentProtectionModule?.recalculate(200);
56368
+ }
56359
56369
  });
56360
56370
  }, 300);
56361
56371
  }