@alan-ai/alan-sdk-web 1.8.68 → 1.8.69

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/alan_lib.js CHANGED
@@ -93511,13 +93511,21 @@ code.hljs {
93511
93511
  width = width;
93512
93512
  const iframeEls = document.querySelectorAll("#" + iframeId);
93513
93513
  iframeEls.forEach((iframeEl) => {
93514
- if (withSvg) {
93515
- const responseWrapper = iframeEl.closest(".alan-btn__chat-response, .chat-bubble_message");
93516
- if (responseWrapper) {
93514
+ const responseWrapper = iframeEl.closest(".alan-btn__chat-response, .chat-bubble_message");
93515
+ if (responseWrapper) {
93516
+ if (withSvg) {
93517
93517
  responseWrapper.classList.add("with-svg");
93518
+ } else {
93519
+ if (height < 650) {
93520
+ iframeEl.style.width = width + "px";
93521
+ } else {
93522
+ if (responseWrapper.clientWidth <= width) {
93523
+ iframeEl.style.width = width + "px";
93524
+ } else {
93525
+ iframeEl.style.width = "100%";
93526
+ }
93527
+ }
93518
93528
  }
93519
- } else {
93520
- iframeEl.style.width = width + "px";
93521
93529
  }
93522
93530
  iframeEl.style.height = (+height > maxIFrameHeight ? maxIFrameHeight : height) + "px";
93523
93531
  });
@@ -93786,7 +93794,7 @@ code.hljs {
93786
93794
  // alan_btn/alan_btn.ts
93787
93795
  var import_lodash2 = __toESM(require_lodash());
93788
93796
  (function(ns) {
93789
- uiState.lib.version = "alan-version.1.8.68".replace("alan-version.", "");
93797
+ uiState.lib.version = "alan-version.1.8.69".replace("alan-version.", "");
93790
93798
  if (window.alanBtn) {
93791
93799
  console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
93792
93800
  }