bstp-agent-widget 0.2.67 → 0.2.68

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.
@@ -29075,20 +29075,17 @@ function UF({ ui: e }) {
29075
29075
  if (e === null ? t.style.removeProperty("--agent-widget-panel-width") : t.style.setProperty("--agent-widget-panel-width", `${e}px`), typeof window > "u") return;
29076
29076
  if (e === null) {
29077
29077
  if (P.current) {
29078
- let { element: e, inlinePaddingBefore: t } = P.current;
29079
- e.style.paddingRight = t, P.current = null;
29078
+ let { element: e, inlinePaddingBefore: t, inlineWidthBefore: n } = P.current;
29079
+ e.style.paddingRight = t, e.style.width = n, P.current = null;
29080
29080
  }
29081
29081
  return;
29082
29082
  }
29083
29083
  let n = P.current?.element ?? null;
29084
- if ((!n || !document.contains(n)) && (n = F(), P.current = null), !n) return;
29085
- P.current ||= {
29084
+ (!n || !document.contains(n)) && (n = F(), P.current = null), n && (P.current ||= {
29086
29085
  element: n,
29087
- basePadding: window.getComputedStyle(n).paddingRight || "0px",
29088
- inlinePaddingBefore: n.style.paddingRight
29089
- };
29090
- let { basePadding: r } = P.current;
29091
- n.style.paddingRight = r === "0px" ? `${e}px` : `calc(${r} + ${e}px)`;
29086
+ inlinePaddingBefore: n.style.paddingRight,
29087
+ inlineWidthBefore: n.style.width
29088
+ }, n.style.paddingRight = "", n.style.width = `max(0px, calc(100vw - ${e}px))`);
29092
29089
  }, [F]), te = v(!1), I = () => {
29093
29090
  D && A(), j(), g(d);
29094
29091
  }, L = () => {