@pi-outpost/embed 0.63.1 → 0.63.2

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.
@@ -1,4 +1,4 @@
1
- import { A as e, F as t, H as n, I as r, L as i, M as a, N as o, P as s, R as c, S as l, U as u, V as d, W as f, a as p, d as m, f as h, g, h as _, i as v, j as y, l as b, m as x, o as S, p as ee, r as C, s as te, t as w, u as T, x as ne, z as re } from "./conversationHistory-xEFHYA2a.js";
1
+ import { A as e, F as t, H as n, I as r, L as i, M as a, N as o, P as s, R as c, S as l, U as u, V as d, W as f, a as p, d as m, f as h, g, h as _, i as v, j as y, l as b, m as x, o as S, p as ee, r as C, s as te, t as w, u as T, x as ne, z as re } from "./conversationHistory-b2MaM5i_.js";
2
2
  import { g as ie, n as E, t as D } from "./lib-CSMo4o20.js";
3
3
  import { a as O, c as k, i as ae, n as A, o as oe, r as j, s as M, t as se } from "./workspacePath-j4IUi8yY.js";
4
4
  import { t as N } from "./download-C9gupL_X.js";
@@ -8836,30 +8836,32 @@ function Uo({ filters: e, onFilterChange: t }) {
8836
8836
  });
8837
8837
  }
8838
8838
  function Wo({ statuses: e, bar: t }) {
8839
- let n = Object.entries(e).filter(([, e]) => S(e).trim() !== ""), r = n.map(([e, t]) => `${e}\u0000${t}`).join(""), [i, a] = H(!1), o = V(null), s = V(null), [c, l] = H(!1), u = $n(() => l(!1));
8839
+ let n = Object.entries(e).filter(([, e]) => S(e).trim() !== ""), r = n.map(([e, t]) => `${e}\u0000${t}`).join(""), i = n.map(([e]) => e).join(""), [a, o] = H(!1), s = V(null), c = V(null), [l, u] = H(!1), d = V(l);
8840
+ d.current = l;
8841
+ let f = $n(() => u(!1));
8840
8842
  if (ge(() => {
8841
- o.current = null, a(!1), l(!1);
8842
- }, [r]), ge(() => {
8843
+ d.current && i !== "" || (s.current = null, o(!1), u(!1));
8844
+ }, [i]), ge(() => {
8843
8845
  let e = t;
8844
8846
  if (e === null) return;
8845
8847
  let n = () => {
8846
- if (o.current !== null) {
8847
- e.clientWidth > o.current + 64 && (o.current = null, a(!1), l(!1));
8848
+ if (s.current !== null) {
8849
+ e.clientWidth > s.current + 64 && (s.current = null, o(!1), u(!1));
8848
8850
  return;
8849
8851
  }
8850
- let t = Array.from(s.current?.querySelectorAll("[data-status-text]") ?? []).some((e) => e.scrollWidth > e.clientWidth + 1), n = e.firstElementChild?.getBoundingClientRect(), r = n && n.height > 0 && Array.from(e.children).some((e) => e.getBoundingClientRect().top >= n.bottom);
8851
- (t || r || e.scrollWidth > e.clientWidth + 1) && (o.current = e.clientWidth, a(!0));
8852
+ let t = Array.from(c.current?.querySelectorAll("[data-status-text]") ?? []).some((e) => e.scrollWidth > e.clientWidth + 1), n = e.firstElementChild?.getBoundingClientRect(), r = n && n.height > 0 && Array.from(e.children).some((e) => e.getBoundingClientRect().top >= n.bottom);
8853
+ (t || r || e.scrollWidth > e.clientWidth + 1) && (s.current = e.clientWidth, o(!0));
8852
8854
  };
8853
8855
  if (n(), typeof ResizeObserver > "u") return;
8854
8856
  let r = new ResizeObserver(n);
8855
8857
  return r.observe(e), () => r.disconnect();
8856
8858
  }, [
8857
8859
  t,
8858
- i,
8860
+ a,
8859
8861
  r
8860
8862
  ]), n.length === 0) return null;
8861
- if (!i) return /* @__PURE__ */ W("div", {
8862
- ref: s,
8863
+ if (!a) return /* @__PURE__ */ W("div", {
8864
+ ref: c,
8863
8865
  className: "flex shrink-0 items-center gap-1.5",
8864
8866
  children: n.map(([e, t]) => /* @__PURE__ */ W("span", {
8865
8867
  title: S(t),
@@ -8871,21 +8873,21 @@ function Wo({ statuses: e, bar: t }) {
8871
8873
  })
8872
8874
  }, e))
8873
8875
  });
8874
- let d = `${n.length} ${n.length === 1 ? "status" : "statuses"}`;
8876
+ let p = `${n.length} ${n.length === 1 ? "status" : "statuses"}`;
8875
8877
  return /* @__PURE__ */ G("div", {
8876
- ref: u,
8878
+ ref: f,
8877
8879
  className: "relative shrink-0",
8878
8880
  onKeyDown: (e) => {
8879
- e.key === "Escape" && c && (e.stopPropagation(), l(!1));
8881
+ e.key === "Escape" && l && (e.stopPropagation(), u(!1));
8880
8882
  },
8881
8883
  children: [/* @__PURE__ */ G("button", {
8882
8884
  type: "button",
8883
- onClick: () => l(!c),
8884
- "aria-expanded": c,
8885
+ onClick: () => u(!l),
8886
+ "aria-expanded": l,
8885
8887
  title: n.map(([, e]) => S(e)).join("\n"),
8886
8888
  className: `${wa} border-zinc-200 text-zinc-500 hover:border-zinc-400 hover:text-zinc-700 dark:border-zinc-800 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:text-zinc-200`,
8887
- children: [d, " ▾"]
8888
- }), c && /* @__PURE__ */ W("ul", {
8889
+ children: [p, " ▾"]
8890
+ }), l && /* @__PURE__ */ W("ul", {
8889
8891
  "aria-label": "Extension statuses",
8890
8892
  ref: Ea,
8891
8893
  className: "absolute left-0 top-full z-20 mt-1 w-max max-w-[min(24rem,calc(100vw-1rem))] rounded-md border border-zinc-200 bg-white py-1 shadow-lg dark:border-zinc-700 dark:bg-zinc-900",
@@ -24908,7 +24910,7 @@ var $g = F(function({ serverUrl: t = "", rootElement: n, initialTheme: i, token:
24908
24910
  ]), Di = L(async () => {
24909
24911
  Ti(null), Ci("preparing…");
24910
24912
  try {
24911
- let { exportConversation: e } = await import("./conversationExport-BHXWfKKh.js");
24913
+ let { exportConversation: e } = await import("./conversationExport-ntj0VA7O.js");
24912
24914
  await e({
24913
24915
  items: f.items,
24914
24916
  olderItems: f.olderHistory?.remaining ?? 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-outpost/embed",
3
- "version": "0.63.1",
3
+ "version": "0.63.2",
4
4
  "type": "module",
5
5
  "description": "Mount pi-outpost as a Shadow-DOM-isolated widget inside another web app.",
6
6
  "license": "MIT",