@cloudflare/ai-search-snippet 0.0.34 → 0.0.36

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.
@@ -2528,7 +2528,7 @@ a.search-result-item:focus-visible {
2528
2528
  border-radius: 2px;
2529
2529
  font-weight: var(--search-snippet-font-weight-medium);
2530
2530
  }
2531
- `, A = "search-bar-snippet", Q = 10, ee = 100;
2531
+ `, A = "search-bar-snippet", Q = 10, ee = 50;
2532
2532
  class te extends HTMLElement {
2533
2533
  constructor() {
2534
2534
  super();
@@ -3267,7 +3267,7 @@ a.modal-result-item:focus-visible {
3267
3267
  .modal-container.open {
3268
3268
  animation: modal-slide-in var(--search-snippet-transition) ease-out;
3269
3269
  }
3270
- `, T = "search-modal-snippet", ie = 10, re = 100;
3270
+ `, T = "search-modal-snippet", ie = 10, re = 50;
3271
3271
  class ae extends HTMLElement {
3272
3272
  constructor() {
3273
3273
  super();
@@ -3638,13 +3638,14 @@ ${se}`;
3638
3638
  overflow: document.body.style.overflow,
3639
3639
  position: document.body.style.position,
3640
3640
  top: document.body.style.top,
3641
- width: document.body.style.width
3642
- }, this.savedHtmlOverflow = document.documentElement.style.overflow, document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.width = "100%";
3641
+ width: document.body.style.width,
3642
+ scrollbarGutter: document.body.style.scrollbarGutter
3643
+ }, this.savedHtmlOverflow = document.documentElement.style.overflow, document.body.style.scrollbarGutter = "stable", document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.width = "100%";
3643
3644
  }
3644
3645
  unlockBodyScroll() {
3645
3646
  if (!this.savedBodyStyles) return;
3646
3647
  const e = Math.abs(Number.parseInt(document.body.style.top || "0", 10));
3647
- document.documentElement.style.overflow = this.savedHtmlOverflow || "", document.body.style.overflow = this.savedBodyStyles.overflow, document.body.style.position = this.savedBodyStyles.position, document.body.style.top = this.savedBodyStyles.top, document.body.style.width = this.savedBodyStyles.width, window.scrollTo(0, e), this.savedBodyStyles = null, this.savedHtmlOverflow = null;
3648
+ document.documentElement.style.overflow = this.savedHtmlOverflow || "", document.body.style.overflow = this.savedBodyStyles.overflow, document.body.style.position = this.savedBodyStyles.position, document.body.style.top = this.savedBodyStyles.top, document.body.style.width = this.savedBodyStyles.width, document.body.style.scrollbarGutter = this.savedBodyStyles.scrollbarGutter || "", window.scrollTo(0, e), this.savedBodyStyles = null, this.savedHtmlOverflow = null;
3648
3649
  }
3649
3650
  cleanup() {
3650
3651
  this.clearLoadingInterval(), this.currentSearchController && (this.currentSearchController.abort(), this.currentSearchController = null), this.handleGlobalKeydown && (document.removeEventListener("keydown", this.handleGlobalKeydown), this.handleGlobalKeydown = null), this.inputElement && (this.handleInputChange && this.inputElement.removeEventListener("input", this.handleInputChange), this.handleInputKeydown && this.inputElement.removeEventListener("keydown", this.handleInputKeydown)), this.backdrop && this.handleBackdropClick && this.backdrop.removeEventListener("click", this.handleBackdropClick), this.handleInputChange = null, this.handleInputKeydown = null, this.handleBackdropClick = null, this.client && this.client.cancelAllRequests();