@gram-ai/elements 1.16.2 → 1.16.4

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/elements.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as c, Fragment as rt, jsxs as O } from "react/jsx-runtime";
2
2
  import { j as x, s as C, i as xi, a as $s, p as _i, e as wi, f as ki, $ as xs, b as _s, c as ws, d as ks, g as Ss, h as Is, k as Ns, l as Os, m as Cs, n as Ps, o as Es, q as js, r as Ds, t as Us, u as Ts, v as As, w as Rs, x as zs, y as Ls, z as Ms, A as Fs, B as Zs, C as Ws, D as Bs, E as Vs, F as Gs, G as Js, H as Ks, I as Hs, J as qs, K as Xs, L as Ys, M as Qs, N as el, O as tl, P as nl, Q as rl, R as il, S as ol, T as al, U as sl, V as ll, W as cl, X as ul, Y as dl, Z as fl, _ as ml, a0 as gl, a1 as pl, a2 as vl, a3 as hl, a4 as bl, a5 as yl, a6 as $l, a7 as xl, a8 as _l, a9 as wl, aa as kl, ab as Sl, ac as Il, ad as Nl, ae as Ol, af as Cl, ag as Pl, ah as El, ai as jl, aj as Dl, ak as Ul, al as Tl, am as Al, an as Rl, ao as zl, ap as Ll, aq as Ml, ar as Fl, as as Zl, at as Wl, au as Bl, av as Vl, aw as Gl, ax as Jl, ay as Kl, az as Hl, aA as ql, aB as Xl, aC as Yl, aD as Ql, aE as ec, aF as tc, aG as nc, aH as rc, aI as ic, aJ as oc, aK as ac, aL as sc, aM as lc, aN as cc, aO as uc, aP as dc, aQ as Si, aR as fc, aS as Ii, aT as Ni, aU as mc, aV as Oi, aW as Ci, aX as gc, aY as pc, aZ as vc, a_ as hc, a$ as bc, b0 as yc, b1 as $c, b2 as xc, b3 as _c, b4 as wc, b5 as Pi, b6 as Ei, b7 as ji, b8 as Di, b9 as Ui, ba as kc, bb as Sc, bc as Ic, bd as Nc, be as Oc, bf as Cc, bg as Pc, bh as Ec, bi as jc, bj as Dc, bk as Uc, bl as Tc, bm as Ac, bn as kn, bo as Rc, bp as zc, bq as Lc, br as Mc, bs as Sn, bt as It, bu as Fc, bv as In, bw as Zc, bx as Wc, by as Bc, bz as Vc, bA as Gc, bB as Jc, bC as Kc, bD as Hc, bE as qc, bF as Xc, bG as Yc, bH as Qc, bI as eu, bJ as Nn, bK as tu, bL as On, bM as Cn, bN as Nt, bO as nu, bP as ru, bQ as Pn, bR as En, bS as jn, bT as Dn, bU as Un, bV as Tn, bW as iu, bX as ou, bY as au, bZ as An, b_ as su, b$ as Rn, c0 as lu, c1 as zn, c2 as Ln, c3 as cu, c4 as uu, c5 as du, c6 as fu, c7 as Mn, c8 as mu, c9 as gu, ca as pu, cb as Fn, cc as vu, cd as Zn, ce as hu, cf as bu, cg as yu, ch as Wn, ci as $u, cj as xu, ck as _u, cl as wu, cm as ku, cn as Su, co as Iu, cp as Bn, cq as Vn, cr as Gn, cs as Nu, ct as Ou, cu as Cu, cv as Pu, cw as Eu, cx as ju, cy as Du, cz as Jn, cA as Kn, cB as Uu, cC as Hn, cD as Tu, cE as Au, cF as Ru, cG as zu, cH as Lu, cI as Mu, cJ as Fu, cK as qn, cL as Zu, cM as Wu, cN as Bu, cO as Vu, cP as Gu, cQ as Ju, cR as Ku, cS as Hu, cT as Ti, cU as Xn, cV as qu, cW as Xu, cX as Yu, cY as Qu, cZ as ed, c_ as td, c$ as nd, d0 as Ai, d1 as Ri, d2 as rd, d3 as zi, d4 as id, d5 as od, d6 as ad, d7 as sd, d8 as ld, d9 as cd, da as Li, db as Mi, dc as Fi, dd as ud, de as dd, df as fd, dg as md, dh as gd, di as pd, dj as vd, dk as Zi, dl as Wi, dm as Bi, dn as hd, dp as bd, dq as Vi, dr as Gi, ds as Ji, dt as Ki, du as Hi, dv as qi, dw as yd, dx as $d, dy as xd, dz as _d, dA as wd, dB as kd, dC as Sd, dD as Id, dE as Nd, dF as Od, dG as Cd, dH as Pd, dI as Ed, dJ as jd, dK as Dd, dL as Ud, dM as Td, dN as Ad, dO as Rd, dP as zd, dQ as Ld, dR as Md, dS as Fd, dT as Zd, dU as Wd, dV as Bd, dW as Vd, dX as Gd, dY as Jd, dZ as Kd, d_ as Hd, d$ as qd, e0 as Xd, e1 as Yd, e2 as Qd, e3 as ef, e4 as tf, e5 as nf, e6 as rf, e7 as of, e8 as af, e9 as sf, ea as lf, eb as cf, ec as uf, ed as df, ee as ff, ef as mf, eg as gf, eh as pf, ei as vf, ej as hf, ek as bf, el as yf, em as $f, en as xf, eo as _f, ep as wf, eq as kf, er as Sf, es as If, et as Nf, eu as Of, ev as Cf, ew as Pf, ex as Ef, ey as jf, ez as Df, eA as Uf, eB as Tf, eC as Af, eD as Rf, eE as Ur, eF as zf, eG as Xi, eH as Lf, eI as Mf, eJ as Ff, eK as Zf, eL as Wf, eM as Bf, eN as Vf, eO as Gf, eP as Jf, eQ as Kf, eR as Hf, eS as qf, eT as Xf, eU as Yf, eV as Qf, eW as em, eX as tm, eY as nm, eZ as rm, e_ as im, e$ as om, f0 as am, f1 as sm, f2 as lm, f3 as cm, f4 as um, f5 as dm, f6 as fm, f7 as mm, f8 as gm, f9 as pm, fa as vm, fb as hm, fc as bm, fd as ym, fe as $m, ff as xm, fg as _m, fh as wm, fi as km, fj as Sm, fk as Im, fl as Nm, fm as Om, fn as dn, fo as Cm, fp as Pm, fq as Em, fr as jm, fs as Dm, ft as Um, fu as Tm, fv as Am, fw as Rm, fx as zm, fy as Lm, fz as Mm, fA as Fm, fB as Zm, fC as Le, fD as Wm, fE as Bm, fF as Vm, fG as Gm, fH as Jm, fI as Km, fJ as Hm, fK as qm, fL as Xm, fM as Ym, fN as Qm, fO as eg, fP as tg, fQ as ng, fR as rg, fS as ig, fT as og, fU as ag, fV as sg, fW as lg, fX as $t, fY as cg, fZ as ug, f_ as dg, f$ as fg, g0 as mg, g1 as gg, g2 as pg, g3 as vg, g4 as hg, g5 as bg, g6 as yg, g7 as Yi, g8 as Qi, g9 as $g, ga as xg, gb as _g, gc as wg, gd as kg, ge as Sg, gf as Ig, gg as Ng, gh as Og, gi as Cg, gj as eo, gk as Pg, gl as Eg, gm as to, gn as jg } from "./index-CVZt-xeH.js";
3
3
  import { getExternalStoreMessages as fn, unstable_createMessageConverter as Dg, useAssistantApi as no, INTERNAL as ro, useRuntimeAdapters as Ug, useExternalStoreRuntime as Tg, unstable_useCloudThreadListAdapter as Ag, unstable_useRemoteThreadListRuntime as Rg, useAssistantState as ne, makeAssistantTool as zg, AssistantRuntimeProvider as Lg, useScrollLock as Mg, MessagePrimitive as Ie, ComposerPrimitive as ue, AttachmentPrimitive as mn, ThreadPrimitive as ve, ErrorPrimitive as Tr, BranchPickerPrimitive as qe, ActionBarPrimitive as nt } from "@assistant-ui/react";
4
4
  import * as f from "react";
5
- import io, { useRef as he, useCallback as Ot, useState as W, useEffect as Se, useMemo as ye, useSyncExternalStore as qt, useLayoutEffect as Fg, forwardRef as Zg, memo as Yn } from "react";
5
+ import io, { useRef as he, useCallback as Ot, useState as W, useEffect as be, useMemo as $e, useSyncExternalStore as qt, useLayoutEffect as Fg, forwardRef as Zg, memo as Yn } from "react";
6
6
  import { c as T, r as Wg, E as Bg, a as Vg, b as k, u as K, C as Gg, d as De, e as Ge, f as oo } from "./index-SAJg5Cz7.js";
7
7
  import { LazyMotion as At, domAnimation as ao, AnimatePresence as so, MotionConfig as lo, domMax as co } from "motion/react";
8
8
  import * as le from "motion/react-m";
@@ -5617,9 +5617,9 @@ const Xt = (t, r) => !t.parts || t.parts.length === 0 ? [] : t.parts.filter((o)
5617
5617
  })
5618
5618
  }), lh = (t, r, o, i, e) => {
5619
5619
  const n = he(!1), a = no(), s = Ot(() => a.threadListItem.source ? a.threadListItem() : null, [a]), [u, l] = W(!1), d = he(/* @__PURE__ */ new Set()), m = he(() => e);
5620
- return Se(() => {
5620
+ return be(() => {
5621
5621
  m.current = e;
5622
- }), Se(() => {
5622
+ }), be(() => {
5623
5623
  if (!r || n.current)
5624
5624
  return;
5625
5625
  const v = async () => {
@@ -5654,7 +5654,7 @@ const Xt = (t, r) => !t.parts || t.parts.length === 0 ? [] : t.parts.filter((o)
5654
5654
  o,
5655
5655
  t,
5656
5656
  s
5657
- ]), Se(() => t.current.thread.subscribe(async () => {
5657
+ ]), be(() => t.current.thread.subscribe(async () => {
5658
5658
  const { messages: v, isRunning: p } = t.current.thread.getState();
5659
5659
  if (!p)
5660
5660
  for (let h = 0; h < v.length; h++) {
@@ -5675,7 +5675,7 @@ const Xt = (t, r) => !t.parts || t.parts.length === 0 ? [] : t.parts.filter((o)
5675
5675
  const e = Ug(), [n, a] = W({}), s = Object.values(n).some((g) => g?.type === "executing"), u = t.status === "submitted" || t.status === "streaming" || s, l = Zr.useThreadMessages({
5676
5676
  isRunning: u,
5677
5677
  messages: t.messages,
5678
- metadata: ye(() => ({
5678
+ metadata: $e(() => ({
5679
5679
  toolStatuses: n,
5680
5680
  ...t.error && { error: t.error.message }
5681
5681
  }), [n, t.error])
@@ -5889,18 +5889,18 @@ var vh = ph(), ho = (t, r, o) => {
5889
5889
  if (r.has(t))
5890
5890
  throw TypeError("Cannot add the same private member more than once");
5891
5891
  r instanceof WeakSet ? r.add(t) : r.set(t, o);
5892
- }, we = (t, r, o, i) => (ho(t, r, "write to private field"), r.set(t, o), o);
5892
+ }, ke = (t, r, o, i) => (ho(t, r, "write to private field"), r.set(t, o), o);
5893
5893
  function hh(t, r) {
5894
5894
  return r != null ? fh(t, r) : t;
5895
5895
  }
5896
5896
  var Q, xt, _t, Qe, et, tt, Re, gn, pn, bh = class {
5897
5897
  constructor(t = []) {
5898
5898
  se(this, Q, void 0), se(this, xt, "ready"), se(this, _t, void 0), se(this, Qe, /* @__PURE__ */ new Set()), se(this, et, /* @__PURE__ */ new Set()), se(this, tt, /* @__PURE__ */ new Set()), this.pushMessage = (r) => {
5899
- we(this, Q, D(this, Q).concat(r)), D(this, Re).call(this);
5899
+ ke(this, Q, D(this, Q).concat(r)), D(this, Re).call(this);
5900
5900
  }, this.popMessage = () => {
5901
- we(this, Q, D(this, Q).slice(0, -1)), D(this, Re).call(this);
5901
+ ke(this, Q, D(this, Q).slice(0, -1)), D(this, Re).call(this);
5902
5902
  }, this.replaceMessage = (r, o) => {
5903
- we(this, Q, [
5903
+ ke(this, Q, [
5904
5904
  ...D(this, Q).slice(0, r),
5905
5905
  // We deep clone the message here to ensure the new React Compiler (currently in RC) detects deeply nested parts/metadata changes:
5906
5906
  this.snapshot(o),
@@ -5921,25 +5921,25 @@ var Q, xt, _t, Qe, et, tt, Re, gn, pn, bh = class {
5921
5921
  D(this, et).forEach((r) => r());
5922
5922
  }), se(this, pn, () => {
5923
5923
  D(this, tt).forEach((r) => r());
5924
- }), we(this, Q, t);
5924
+ }), ke(this, Q, t);
5925
5925
  }
5926
5926
  get status() {
5927
5927
  return D(this, xt);
5928
5928
  }
5929
5929
  set status(t) {
5930
- we(this, xt, t), D(this, gn).call(this);
5930
+ ke(this, xt, t), D(this, gn).call(this);
5931
5931
  }
5932
5932
  get error() {
5933
5933
  return D(this, _t);
5934
5934
  }
5935
5935
  set error(t) {
5936
- we(this, _t, t), D(this, pn).call(this);
5936
+ ke(this, _t, t), D(this, pn).call(this);
5937
5937
  }
5938
5938
  get messages() {
5939
5939
  return D(this, Q);
5940
5940
  }
5941
5941
  set messages(t) {
5942
- we(this, Q, [...t]), D(this, Re).call(this);
5942
+ ke(this, Q, [...t]), D(this, Re).call(this);
5943
5943
  }
5944
5944
  };
5945
5945
  Q = /* @__PURE__ */ new WeakMap();
@@ -5954,7 +5954,7 @@ pn = /* @__PURE__ */ new WeakMap();
5954
5954
  var ze, Jr = class extends Pg {
5955
5955
  constructor({ messages: r, ...o }) {
5956
5956
  const i = new bh(r);
5957
- super({ ...o, state: i }), se(this, ze, void 0), this["~registerMessagesCallback"] = (e, n) => D(this, ze)["~registerMessagesCallback"](e, n), this["~registerStatusCallback"] = (e) => D(this, ze)["~registerStatusCallback"](e), this["~registerErrorCallback"] = (e) => D(this, ze)["~registerErrorCallback"](e), we(this, ze, i);
5957
+ super({ ...o, state: i }), se(this, ze, void 0), this["~registerMessagesCallback"] = (e, n) => D(this, ze)["~registerMessagesCallback"](e, n), this["~registerStatusCallback"] = (e) => D(this, ze)["~registerStatusCallback"](e), this["~registerErrorCallback"] = (e) => D(this, ze)["~registerErrorCallback"](e), ke(this, ze, i);
5958
5958
  }
5959
5959
  };
5960
5960
  ze = /* @__PURE__ */ new WeakMap();
@@ -5990,7 +5990,7 @@ function yh({
5990
5990
  },
5991
5991
  [i]
5992
5992
  );
5993
- return Se(() => {
5993
+ return be(() => {
5994
5994
  r && i.current.resumeStream();
5995
5995
  }, [r, i]), {
5996
5996
  id: i.current.id,
@@ -6052,9 +6052,9 @@ class vn extends Eg {
6052
6052
  }
6053
6053
  const _h = (t) => {
6054
6054
  const r = he(t);
6055
- return Se(() => {
6055
+ return be(() => {
6056
6056
  r.current = t;
6057
- }), ye(() => new Proxy(r.current, {
6057
+ }), $e(() => new Proxy(r.current, {
6058
6058
  get(i, e) {
6059
6059
  const n = r.current[e];
6060
6060
  return typeof n == "function" ? n.bind(r.current) : n;
@@ -6722,10 +6722,10 @@ const Vb = ["top", "right", "bottom", "left"], Ne = Math.min, X = Math.max, Et =
6722
6722
  function bn(t, r, o) {
6723
6723
  return X(t, Ne(r, o));
6724
6724
  }
6725
- function $e(t, r) {
6725
+ function xe(t, r) {
6726
6726
  return typeof t == "function" ? t(r) : t;
6727
6727
  }
6728
- function xe(t) {
6728
+ function _e(t) {
6729
6729
  return t.split("-")[0];
6730
6730
  }
6731
6731
  function Je(t) {
@@ -6739,7 +6739,7 @@ function or(t) {
6739
6739
  }
6740
6740
  const Kb = /* @__PURE__ */ new Set(["top", "bottom"]);
6741
6741
  function de(t) {
6742
- return Kb.has(xe(t)) ? "y" : "x";
6742
+ return Kb.has(_e(t)) ? "y" : "x";
6743
6743
  }
6744
6744
  function ar(t) {
6745
6745
  return ir(de(t));
@@ -6772,7 +6772,7 @@ function Qb(t, r, o) {
6772
6772
  }
6773
6773
  function ey(t, r, o, i) {
6774
6774
  const e = Je(t);
6775
- let n = Qb(xe(t), o === "start", i);
6775
+ let n = Qb(_e(t), o === "start", i);
6776
6776
  return e && (n = n.map((a) => a + "-" + e), r && (n = n.concat(n.map(yn)))), n;
6777
6777
  }
6778
6778
  function jt(t) {
@@ -6818,7 +6818,7 @@ function ti(t, r, o) {
6818
6818
  reference: i,
6819
6819
  floating: e
6820
6820
  } = t;
6821
- const n = de(r), a = ar(r), s = or(a), u = xe(r), l = n === "y", d = i.x + i.width / 2 - e.width / 2, m = i.y + i.height / 2 - e.height / 2, v = i[s] / 2 - e[s] / 2;
6821
+ const n = de(r), a = ar(r), s = or(a), u = _e(r), l = n === "y", d = i.x + i.width / 2 - e.width / 2, m = i.y + i.height / 2 - e.height / 2, v = i[s] / 2 - e[s] / 2;
6822
6822
  let p;
6823
6823
  switch (u) {
6824
6824
  case "top":
@@ -6938,7 +6938,7 @@ async function it(t, r) {
6938
6938
  elementContext: m = "floating",
6939
6939
  altBoundary: v = !1,
6940
6940
  padding: p = 0
6941
- } = $e(r, t), h = Io(p), b = s[v ? m === "floating" ? "reference" : "floating" : m], y = Dt(await n.getClippingRect({
6941
+ } = xe(r, t), h = Io(p), b = s[v ? m === "floating" ? "reference" : "floating" : m], y = Dt(await n.getClippingRect({
6942
6942
  element: (o = await (n.isElement == null ? void 0 : n.isElement(b))) == null || o ? b : b.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(s.floating)),
6943
6943
  boundary: l,
6944
6944
  rootBoundary: d,
@@ -6982,7 +6982,7 @@ const ry = (t) => ({
6982
6982
  } = r, {
6983
6983
  element: l,
6984
6984
  padding: d = 0
6985
- } = $e(t, r) || {};
6985
+ } = xe(t, r) || {};
6986
6986
  if (l == null)
6987
6987
  return {};
6988
6988
  const m = Io(d), v = {
@@ -7025,10 +7025,10 @@ const ry = (t) => ({
7025
7025
  fallbackAxisSideDirection: h = "none",
7026
7026
  flipAlignment: g = !0,
7027
7027
  ...b
7028
- } = $e(t, r);
7028
+ } = xe(t, r);
7029
7029
  if ((o = n.arrow) != null && o.alignmentOffset)
7030
7030
  return {};
7031
- const y = xe(e), $ = de(s), _ = xe(s) === s, S = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), I = v || (_ || !g ? [jt(s)] : qb(s)), P = h !== "none";
7031
+ const y = _e(e), $ = de(s), _ = _e(s) === s, S = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), I = v || (_ || !g ? [jt(s)] : qb(s)), P = h !== "none";
7032
7032
  !v && P && I.push(...ey(s, g, h, S));
7033
7033
  const N = [s, ...I], j = await it(r, b), R = [];
7034
7034
  let U = ((i = n.flip) == null ? void 0 : i.overflows) || [];
@@ -7107,7 +7107,7 @@ const oy = function(t) {
7107
7107
  } = r, {
7108
7108
  strategy: i = "referenceHidden",
7109
7109
  ...e
7110
- } = $e(t, r);
7110
+ } = xe(t, r);
7111
7111
  switch (i) {
7112
7112
  case "referenceHidden": {
7113
7113
  const n = await it(r, {
@@ -7144,7 +7144,7 @@ async function ay(t, r) {
7144
7144
  placement: o,
7145
7145
  platform: i,
7146
7146
  elements: e
7147
- } = t, n = await (i.isRTL == null ? void 0 : i.isRTL(e.floating)), a = xe(o), s = Je(o), u = de(o) === "y", l = No.has(a) ? -1 : 1, d = n && u ? -1 : 1, m = $e(r, t);
7147
+ } = t, n = await (i.isRTL == null ? void 0 : i.isRTL(e.floating)), a = _e(o), s = Je(o), u = de(o) === "y", l = No.has(a) ? -1 : 1, d = n && u ? -1 : 1, m = xe(r, t);
7148
7148
  let {
7149
7149
  mainAxis: v,
7150
7150
  crossAxis: p,
@@ -7213,10 +7213,10 @@ const sy = function(t) {
7213
7213
  }
7214
7214
  },
7215
7215
  ...u
7216
- } = $e(t, r), l = {
7216
+ } = xe(t, r), l = {
7217
7217
  x: o,
7218
7218
  y: i
7219
- }, d = await it(r, u), m = de(xe(e)), v = ir(m);
7219
+ }, d = await it(r, u), m = de(_e(e)), v = ir(m);
7220
7220
  let p = l[v], h = l[m];
7221
7221
  if (n) {
7222
7222
  const b = v === "y" ? "top" : "left", y = v === "y" ? "bottom" : "right", $ = p + d[b], _ = p - d[y];
@@ -7258,12 +7258,12 @@ const sy = function(t) {
7258
7258
  offset: s = 0,
7259
7259
  mainAxis: u = !0,
7260
7260
  crossAxis: l = !0
7261
- } = $e(t, r), d = {
7261
+ } = xe(t, r), d = {
7262
7262
  x: o,
7263
7263
  y: i
7264
7264
  }, m = de(e), v = ir(m);
7265
7265
  let p = d[v], h = d[m];
7266
- const g = $e(s, r), b = typeof g == "number" ? {
7266
+ const g = xe(s, r), b = typeof g == "number" ? {
7267
7267
  mainAxis: g,
7268
7268
  crossAxis: 0
7269
7269
  } : {
@@ -7277,7 +7277,7 @@ const sy = function(t) {
7277
7277
  }
7278
7278
  if (l) {
7279
7279
  var y, $;
7280
- const _ = v === "y" ? "width" : "height", S = No.has(xe(e)), I = n.reference[m] - n.floating[_] + (S && ((y = a.offset) == null ? void 0 : y[m]) || 0) + (S ? 0 : b.crossAxis), P = n.reference[m] + n.reference[_] + (S ? 0 : (($ = a.offset) == null ? void 0 : $[m]) || 0) - (S ? b.crossAxis : 0);
7280
+ const _ = v === "y" ? "width" : "height", S = No.has(_e(e)), I = n.reference[m] - n.floating[_] + (S && ((y = a.offset) == null ? void 0 : y[m]) || 0) + (S ? 0 : b.crossAxis), P = n.reference[m] + n.reference[_] + (S ? 0 : (($ = a.offset) == null ? void 0 : $[m]) || 0) - (S ? b.crossAxis : 0);
7281
7281
  h < I ? h = I : h > P && (h = P);
7282
7282
  }
7283
7283
  return {
@@ -7301,7 +7301,7 @@ const sy = function(t) {
7301
7301
  apply: u = () => {
7302
7302
  },
7303
7303
  ...l
7304
- } = $e(t, r), d = await it(r, l), m = xe(e), v = Je(e), p = de(e) === "y", {
7304
+ } = xe(t, r), d = await it(r, l), m = _e(e), v = Je(e), p = de(e) === "y", {
7305
7305
  width: h,
7306
7306
  height: g
7307
7307
  } = n.floating;
@@ -8260,11 +8260,11 @@ Zt.displayName = u$;
8260
8260
  function d$(t, r) {
8261
8261
  return f.useReducer((o, i) => r[o][i] ?? o, t);
8262
8262
  }
8263
- var _e = (t) => {
8263
+ var we = (t) => {
8264
8264
  const { present: r, children: o } = t, i = f$(r), e = typeof o == "function" ? o({ present: i.isPresent }) : f.Children.only(o), n = H(i.ref, m$(e));
8265
8265
  return typeof o == "function" || i.isPresent ? f.cloneElement(e, { ref: n }) : null;
8266
8266
  };
8267
- _e.displayName = "Presence";
8267
+ we.displayName = "Presence";
8268
8268
  function f$(t) {
8269
8269
  const [r, o] = f.useState(), i = f.useRef(null), e = f.useRef(t), n = f.useRef("none"), a = t ? "mounted" : "unmounted", [s, u] = d$(a, {
8270
8270
  mounted: {
@@ -8512,13 +8512,13 @@ var pr = "TooltipPortal", [w$, k$] = Bt(pr, {
8512
8512
  forceMount: void 0
8513
8513
  }), ta = (t) => {
8514
8514
  const { __scopeTooltip: r, forceMount: o, children: i, container: e } = t, n = ut(pr, r);
8515
- return /* @__PURE__ */ c(w$, { scope: r, forceMount: o, children: /* @__PURE__ */ c(_e, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: i }) }) });
8515
+ return /* @__PURE__ */ c(w$, { scope: r, forceMount: o, children: /* @__PURE__ */ c(we, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: i }) }) });
8516
8516
  };
8517
8517
  ta.displayName = pr;
8518
8518
  var Be = "TooltipContent", na = f.forwardRef(
8519
8519
  (t, r) => {
8520
8520
  const o = k$(Be, t.__scopeTooltip), { forceMount: i = o.forceMount, side: e = "top", ...n } = t, a = ut(Be, t.__scopeTooltip);
8521
- return /* @__PURE__ */ c(_e, { present: i || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(ra, { side: e, ...n, ref: r }) : /* @__PURE__ */ c(S$, { side: e, ...n, ref: r }) });
8521
+ return /* @__PURE__ */ c(we, { present: i || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(ra, { side: e, ...n, ref: r }) : /* @__PURE__ */ c(S$, { side: e, ...n, ref: r }) });
8522
8522
  }
8523
8523
  ), S$ = f.forwardRef((t, r) => {
8524
8524
  const o = ut(Be, t.__scopeTooltip), i = gr(Be, t.__scopeTooltip), e = f.useRef(null), n = H(r, e), [a, s] = f.useState(null), { trigger: u, onClose: l } = o, d = e.current, { onPointerInTransitChange: m } = i, v = f.useCallback(() => {
@@ -8736,13 +8736,13 @@ function br({
8736
8736
  "data-slot": "tooltip-content",
8737
8737
  sideOffset: r,
8738
8738
  className: k(
8739
- "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
8739
+ "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-20 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
8740
8740
  t
8741
8741
  ),
8742
8742
  ...i,
8743
8743
  children: [
8744
8744
  o,
8745
- /* @__PURE__ */ c(M$, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]" })
8745
+ /* @__PURE__ */ c(M$, { className: "bg-foreground fill-foreground z-20 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]" })
8746
8746
  ]
8747
8747
  }
8748
8748
  ) });
@@ -8775,7 +8775,7 @@ const te = Zg(
8775
8775
  );
8776
8776
  te.displayName = "TooltipIconButton";
8777
8777
  function F$(t) {
8778
- return ye(() => t.reduce((r, o) => (r?.[o.language] && !o.overrideExisting || (r = {
8778
+ return $e(() => t.reduce((r, o) => (r?.[o.language] && !o.overrideExisting || (r = {
8779
8779
  ...r,
8780
8780
  [o.language]: {
8781
8781
  CodeHeader: o.Header ?? (() => null),
@@ -9017,7 +9017,7 @@ const K$ = ({
9017
9017
  }) => {
9018
9018
  const n = ne(({ message: v }) => v).parts.filter((v) => v.type === "tool-call"), a = n.findIndex(
9019
9019
  (v) => v.toolName === t
9020
- ), s = ye(() => r.type === "complete" ? /* @__PURE__ */ c(st, { className: "size-4 text-emerald-500" }) : r.type === "incomplete" ? /* @__PURE__ */ c(Gg, { className: "size-4 text-rose-500" }) : /* @__PURE__ */ c(er, { className: "text-muted-foreground size-4 animate-spin" }), [r]), u = De(), [l, d] = W(!1), m = (v) => {
9020
+ ), s = $e(() => r.type === "complete" ? /* @__PURE__ */ c(st, { className: "size-4 text-emerald-500" }) : r.type === "incomplete" ? /* @__PURE__ */ c(Gg, { className: "size-4 text-rose-500" }) : /* @__PURE__ */ c(er, { className: "text-muted-foreground size-4 animate-spin" }), [r]), u = De(), [l, d] = W(!1), m = (v) => {
9021
9021
  v.stopPropagation(), d(!l);
9022
9022
  };
9023
9023
  return /* @__PURE__ */ O(
@@ -9212,7 +9212,7 @@ function ca({
9212
9212
  className: o
9213
9213
  }) {
9214
9214
  const [i, e] = W(null);
9215
- return Se(() => {
9215
+ return be(() => {
9216
9216
  r && Yg(t, {
9217
9217
  lang: r,
9218
9218
  theme: "github-dark-default",
@@ -9314,7 +9314,7 @@ fa.displayName = da;
9314
9314
  var $r = "CollapsibleContent", ma = f.forwardRef(
9315
9315
  (t, r) => {
9316
9316
  const { forceMount: o, ...i } = t, e = yr($r, t.__scopeCollapsible);
9317
- return /* @__PURE__ */ c(_e, { present: o || e.open, children: ({ present: n }) => /* @__PURE__ */ c(nx, { ...i, ref: r, present: n }) });
9317
+ return /* @__PURE__ */ c(we, { present: o || e.open, children: ({ present: n }) => /* @__PURE__ */ c(nx, { ...i, ref: r, present: n }) });
9318
9318
  }
9319
9319
  );
9320
9320
  ma.displayName = $r;
@@ -9540,15 +9540,15 @@ var rn = "focusScope.autoFocusOnMount", on = "focusScope.autoFocusOnUnmount", ui
9540
9540
  let g = function(_) {
9541
9541
  if (p.paused || !s) return;
9542
9542
  const S = _.target;
9543
- s.contains(S) ? m.current = S : ke(m.current, { select: !0 });
9543
+ s.contains(S) ? m.current = S : Se(m.current, { select: !0 });
9544
9544
  }, b = function(_) {
9545
9545
  if (p.paused || !s) return;
9546
9546
  const S = _.relatedTarget;
9547
- S !== null && (s.contains(S) || ke(m.current, { select: !0 }));
9547
+ S !== null && (s.contains(S) || Se(m.current, { select: !0 }));
9548
9548
  }, y = function(_) {
9549
9549
  if (document.activeElement === document.body)
9550
9550
  for (const I of _)
9551
- I.removedNodes.length > 0 && ke(s);
9551
+ I.removedNodes.length > 0 && Se(s);
9552
9552
  };
9553
9553
  document.addEventListener("focusin", g), document.addEventListener("focusout", b);
9554
9554
  const $ = new MutationObserver(y);
@@ -9562,12 +9562,12 @@ var rn = "focusScope.autoFocusOnMount", on = "focusScope.autoFocusOnUnmount", ui
9562
9562
  const g = document.activeElement;
9563
9563
  if (!s.contains(g)) {
9564
9564
  const y = new CustomEvent(rn, ui);
9565
- s.addEventListener(rn, l), s.dispatchEvent(y), y.defaultPrevented || (fx(hx(ya(s)), { select: !0 }), document.activeElement === g && ke(s));
9565
+ s.addEventListener(rn, l), s.dispatchEvent(y), y.defaultPrevented || (fx(hx(ya(s)), { select: !0 }), document.activeElement === g && Se(s));
9566
9566
  }
9567
9567
  return () => {
9568
9568
  s.removeEventListener(rn, l), setTimeout(() => {
9569
9569
  const y = new CustomEvent(on, ui);
9570
- s.addEventListener(on, d), s.dispatchEvent(y), y.defaultPrevented || ke(g ?? document.body, { select: !0 }), s.removeEventListener(on, d), fi.remove(p);
9570
+ s.addEventListener(on, d), s.dispatchEvent(y), y.defaultPrevented || Se(g ?? document.body, { select: !0 }), s.removeEventListener(on, d), fi.remove(p);
9571
9571
  }, 0);
9572
9572
  };
9573
9573
  }
@@ -9578,7 +9578,7 @@ var rn = "focusScope.autoFocusOnMount", on = "focusScope.autoFocusOnUnmount", ui
9578
9578
  const b = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, y = document.activeElement;
9579
9579
  if (b && y) {
9580
9580
  const $ = g.currentTarget, [_, S] = mx($);
9581
- _ && S ? !g.shiftKey && y === S ? (g.preventDefault(), o && ke(_, { select: !0 })) : g.shiftKey && y === _ && (g.preventDefault(), o && ke(S, { select: !0 })) : y === $ && g.preventDefault();
9581
+ _ && S ? !g.shiftKey && y === S ? (g.preventDefault(), o && Se(_, { select: !0 })) : g.shiftKey && y === _ && (g.preventDefault(), o && Se(S, { select: !0 })) : y === $ && g.preventDefault();
9582
9582
  }
9583
9583
  },
9584
9584
  [o, i, p.paused]
@@ -9589,7 +9589,7 @@ _r.displayName = dx;
9589
9589
  function fx(t, { select: r = !1 } = {}) {
9590
9590
  const o = document.activeElement;
9591
9591
  for (const i of t)
9592
- if (ke(i, { select: r }), document.activeElement !== o) return;
9592
+ if (Se(i, { select: r }), document.activeElement !== o) return;
9593
9593
  }
9594
9594
  function mx(t) {
9595
9595
  const r = ya(t), o = di(r, t), i = di(r.reverse(), t);
@@ -9621,7 +9621,7 @@ function gx(t, { upTo: r }) {
9621
9621
  function px(t) {
9622
9622
  return t instanceof HTMLInputElement && "select" in t;
9623
9623
  }
9624
- function ke(t, { select: r = !1 } = {}) {
9624
+ function Se(t, { select: r = !1 } = {}) {
9625
9625
  if (t && t.focus) {
9626
9626
  const o = document.activeElement;
9627
9627
  t.focus({ preventScroll: !0 }), t !== o && px(t) && r && t.select();
@@ -10235,13 +10235,13 @@ var kr = "DialogPortal", [i_, Ua] = Pa(kr, {
10235
10235
  forceMount: void 0
10236
10236
  }), Ta = (t) => {
10237
10237
  const { __scopeDialog: r, forceMount: o, children: i, container: e } = t, n = oe(kr, r);
10238
- return /* @__PURE__ */ c(i_, { scope: r, forceMount: o, children: f.Children.map(i, (a) => /* @__PURE__ */ c(_e, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: a }) })) });
10238
+ return /* @__PURE__ */ c(i_, { scope: r, forceMount: o, children: f.Children.map(i, (a) => /* @__PURE__ */ c(we, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: a }) })) });
10239
10239
  };
10240
10240
  Ta.displayName = kr;
10241
10241
  var Tt = "DialogOverlay", Aa = f.forwardRef(
10242
10242
  (t, r) => {
10243
10243
  const o = Ua(Tt, t.__scopeDialog), { forceMount: i = o.forceMount, ...e } = t, n = oe(Tt, t.__scopeDialog);
10244
- return n.modal ? /* @__PURE__ */ c(_e, { present: i || n.open, children: /* @__PURE__ */ c(a_, { ...e, ref: r }) }) : null;
10244
+ return n.modal ? /* @__PURE__ */ c(we, { present: i || n.open, children: /* @__PURE__ */ c(a_, { ...e, ref: r }) }) : null;
10245
10245
  }
10246
10246
  );
10247
10247
  Aa.displayName = Tt;
@@ -10265,7 +10265,7 @@ var o_ = /* @__PURE__ */ rr("DialogOverlay.RemoveScroll"), a_ = f.forwardRef(
10265
10265
  ), je = "DialogContent", Ra = f.forwardRef(
10266
10266
  (t, r) => {
10267
10267
  const o = Ua(je, t.__scopeDialog), { forceMount: i = o.forceMount, ...e } = t, n = oe(je, t.__scopeDialog);
10268
- return /* @__PURE__ */ c(_e, { present: i || n.open, children: n.modal ? /* @__PURE__ */ c(s_, { ...e, ref: r }) : /* @__PURE__ */ c(l_, { ...e, ref: r }) });
10268
+ return /* @__PURE__ */ c(we, { present: i || n.open, children: n.modal ? /* @__PURE__ */ c(s_, { ...e, ref: r }) : /* @__PURE__ */ c(l_, { ...e, ref: r }) });
10269
10269
  }
10270
10270
  );
10271
10271
  Ra.displayName = je;
@@ -10674,7 +10674,7 @@ function L_({
10674
10674
  }
10675
10675
  const M_ = (t) => {
10676
10676
  const [r, o] = W(void 0);
10677
- return Se(() => {
10677
+ return be(() => {
10678
10678
  if (!t) {
10679
10679
  o(void 0);
10680
10680
  return;
@@ -10799,7 +10799,7 @@ const M_ = (t) => {
10799
10799
  te,
10800
10800
  {
10801
10801
  tooltip: "Add Attachment",
10802
- side: "bottom",
10802
+ side: "top",
10803
10803
  variant: "ghost",
10804
10804
  size: "icon",
10805
10805
  align: "start",
@@ -10809,7 +10809,7 @@ const M_ = (t) => {
10809
10809
  }
10810
10810
  ) }), Cr = () => {
10811
10811
  const { config: t } = K(), r = t.theme ?? {};
10812
- return ye(() => {
10812
+ return $e(() => {
10813
10813
  const { colorScheme: o = "light" } = r;
10814
10814
  return {
10815
10815
  className: o === "dark" || o === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : void 0
@@ -10880,13 +10880,13 @@ var Pr = "PopoverPortal", [q_, X_] = Qa(Pr, {
10880
10880
  forceMount: void 0
10881
10881
  }), is = (t) => {
10882
10882
  const { __scopePopover: r, forceMount: o, children: i, container: e } = t, n = Ce(Pr, r);
10883
- return /* @__PURE__ */ c(q_, { scope: r, forceMount: o, children: /* @__PURE__ */ c(_e, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: i }) }) });
10883
+ return /* @__PURE__ */ c(q_, { scope: r, forceMount: o, children: /* @__PURE__ */ c(we, { present: o || n.open, children: /* @__PURE__ */ c(Zt, { asChild: !0, container: e, children: i }) }) });
10884
10884
  };
10885
10885
  is.displayName = Pr;
10886
10886
  var Ve = "PopoverContent", os = f.forwardRef(
10887
10887
  (t, r) => {
10888
10888
  const o = X_(Ve, t.__scopePopover), { forceMount: i = o.forceMount, ...e } = t, n = Ce(Ve, t.__scopePopover);
10889
- return /* @__PURE__ */ c(_e, { present: i || n.open, children: n.modal ? /* @__PURE__ */ c(Q_, { ...e, ref: r }) : /* @__PURE__ */ c(ew, { ...e, ref: r }) });
10889
+ return /* @__PURE__ */ c(we, { present: i || n.open, children: n.modal ? /* @__PURE__ */ c(Q_, { ...e, ref: r }) : /* @__PURE__ */ c(ew, { ...e, ref: r }) });
10890
10890
  }
10891
10891
  );
10892
10892
  os.displayName = Ve;
@@ -11048,19 +11048,19 @@ function uw({
11048
11048
  align: r,
11049
11049
  sideOffset: o,
11050
11050
  className: k(
11051
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
11051
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-20 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
11052
11052
  t
11053
11053
  ),
11054
11054
  ...i
11055
11055
  }
11056
11056
  ) });
11057
11057
  }
11058
- const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11058
+ const ye = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11059
11059
  const r = Ge(), o = ne(({ message: m }) => m).parts, i = o.filter((m) => m.type === "tool-call"), e = i.some(
11060
11060
  (m) => m.status?.type === "running"
11061
- ), n = ye(() => e ? /* @__PURE__ */ c(er, { className: "text-muted-foreground size-4 animate-spin" }) : /* @__PURE__ */ c(st, { className: "size-4 text-green-500" }), [e]), { config: a } = K(), [s, u] = W(
11061
+ ), n = $e(() => e ? /* @__PURE__ */ c(er, { className: "text-muted-foreground size-4 animate-spin" }) : /* @__PURE__ */ c(st, { className: "size-4 text-green-500" }), [e]), { config: a } = K(), [s, u] = W(
11062
11062
  a.tools?.expandToolGroupsByDefault ?? !1
11063
- ), l = De(), d = ye(() => {
11063
+ ), l = De(), d = $e(() => {
11064
11064
  const m = o.filter((v) => v.type === "tool-call");
11065
11065
  return m.length === 0 ? "No tools called" : m.length === 1 ? `Calling ${la(m[0].toolName)}...` : e ? `Calling ${m.length} tools...` : `Executed ${m.length} tools`;
11066
11066
  }, [o, e]);
@@ -11115,7 +11115,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11115
11115
  initial: { height: 0, opacity: 0, y: -10 },
11116
11116
  animate: { height: "auto", opacity: 1, y: 0 },
11117
11117
  exit: { height: 0, opacity: 0, y: -10 },
11118
- transition: { duration: 0.3, ease: be },
11118
+ transition: { duration: 0.3, ease: ye },
11119
11119
  style: { overflow: "hidden" },
11120
11120
  children: t
11121
11121
  }
@@ -11207,7 +11207,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11207
11207
  initial: { opacity: 0, y: 10 },
11208
11208
  animate: { opacity: 1, y: 0 },
11209
11209
  exit: { opacity: 0, y: 10 },
11210
- transition: { duration: 0.25, ease: be },
11210
+ transition: { duration: 0.25, ease: ye },
11211
11211
  className: k(
11212
11212
  "aui-thread-welcome-message-motion-1 font-semibold",
11213
11213
  r("text-title")
@@ -11221,7 +11221,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11221
11221
  initial: { opacity: 0, y: 10 },
11222
11222
  animate: { opacity: 1, y: 0 },
11223
11223
  exit: { opacity: 0, y: 10 },
11224
- transition: { duration: 0.25, delay: 0.05, ease: be },
11224
+ transition: { duration: 0.25, delay: 0.05, ease: ye },
11225
11225
  className: k(
11226
11226
  "aui-thread-welcome-message-motion-2 text-muted-foreground/65",
11227
11227
  r("text-subtitle")
@@ -11258,7 +11258,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11258
11258
  transition: {
11259
11259
  duration: 0.25,
11260
11260
  delay: 0.03 * a,
11261
- ease: be
11261
+ ease: ye
11262
11262
  },
11263
11263
  className: k(
11264
11264
  "aui-thread-welcome-suggestion-display",
@@ -11333,12 +11333,14 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11333
11333
  );
11334
11334
  }, vw = () => {
11335
11335
  const { model: t, setModel: r } = K(), [o, i] = W(!1), [e, n] = W(!1), a = he(null), s = he(0), u = he(!1);
11336
- return Se(() => {
11336
+ return be(() => {
11337
11337
  o && !u.current && requestAnimationFrame(() => {
11338
11338
  const d = a.current;
11339
11339
  d && d.scrollHeight > 0 && (d.scrollTop = s.current);
11340
11340
  }), u.current = o;
11341
- }, [o]), /* @__PURE__ */ c(aa, { children: /* @__PURE__ */ O(vr, { open: e, onOpenChange: n, children: [
11341
+ }, [o]), be(() => {
11342
+ o && n(!1);
11343
+ }, [o]), /* @__PURE__ */ c(aa, { children: /* @__PURE__ */ O(vr, { open: e && !o, onOpenChange: n, children: [
11342
11344
  /* @__PURE__ */ O(lw, { open: o, onOpenChange: i, children: [
11343
11345
  /* @__PURE__ */ c(hr, { asChild: !0, children: /* @__PURE__ */ c(cw, { asChild: !0, children: /* @__PURE__ */ c(
11344
11346
  me,
@@ -11348,7 +11350,6 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11348
11350
  "data-state": o ? "open" : "closed",
11349
11351
  className: "aui-composer-model-picker data-[state=open]:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 flex w-fit items-center gap-2 rounded-full px-2.5 py-1 text-xs font-semibold",
11350
11352
  "aria-label": "Model Settings",
11351
- onPointerUp: (d) => d.stopPropagation(),
11352
11353
  children: /* @__PURE__ */ c(ob, { className: "aui-attachment-add-icon size-5 stroke-[1.5px]" })
11353
11354
  }
11354
11355
  ) }) }),
@@ -11551,17 +11552,17 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11551
11552
  }, Sw = {
11552
11553
  layout: {
11553
11554
  duration: 0.25,
11554
- ease: be
11555
+ ease: ye
11555
11556
  }
11556
11557
  }, Iw = () => {
11557
- const { config: t } = K(), r = Cr(), o = Ge(), i = De(), [e, n] = W(t.modal?.defaultOpen ?? !1), { expandable: a, isExpanded: s, setIsExpanded: u } = us(), l = t.modal?.title, d = t.modal?.icon, m = t.modal?.position ?? "bottom-right", v = Nw(m), p = ye(
11558
+ const { config: t } = K(), r = Cr(), o = Ge(), i = De(), [e, n] = W(t.modal?.defaultOpen ?? !1), { expandable: a, isExpanded: s, setIsExpanded: u } = us(), l = t.modal?.title, d = t.modal?.icon, m = t.modal?.position ?? "bottom-right", v = Nw(m), p = $e(
11558
11559
  () => t.modal?.dimensions?.default ?? {
11559
11560
  width: "500px",
11560
11561
  height: "600px",
11561
11562
  maxHeight: "95vh"
11562
11563
  },
11563
11564
  [t.modal?.dimensions?.default]
11564
- ), h = ye(
11565
+ ), h = $e(
11565
11566
  () => t.modal?.dimensions?.expanded ?? {
11566
11567
  width: "70vw",
11567
11568
  height: "90vh"
@@ -11574,7 +11575,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11574
11575
  "div",
11575
11576
  {
11576
11577
  className: k(
11577
- "aui-root aui-modal-anchor fixed z-[9999]",
11578
+ "aui-root aui-modal-anchor fixed z-10",
11578
11579
  v,
11579
11580
  r.className,
11580
11581
  o("lg"),
@@ -11611,7 +11612,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11611
11612
  transition: {
11612
11613
  duration: 0.2,
11613
11614
  delay: 0.1,
11614
- ease: be
11615
+ ease: ye
11615
11616
  },
11616
11617
  children: [
11617
11618
  /* @__PURE__ */ c("div", { className: k("flex min-w-0 items-center"), children: /* @__PURE__ */ O(
@@ -11683,7 +11684,7 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11683
11684
  transition: {
11684
11685
  duration: 0.2,
11685
11686
  delay: 0.05,
11686
- ease: be
11687
+ ease: ye
11687
11688
  },
11688
11689
  children: /* @__PURE__ */ c(Er, {})
11689
11690
  }
@@ -11710,7 +11711,8 @@ const be = [0.23, 1, 0.32, 1], dw = ({ children: t }) => {
11710
11711
  initial: { opacity: 0, scale: 0.8 },
11711
11712
  animate: { opacity: 1, scale: 1 },
11712
11713
  exit: { opacity: 0, scale: 0.8 },
11713
- transition: { duration: 0.2, ease: be },
11714
+ transition: { duration: 0.2, ease: ye },
11715
+ className: "flex size-full items-center justify-center",
11714
11716
  children: d ? d("closed") : /* @__PURE__ */ c(Vh, { className: "size-6" })
11715
11717
  }
11716
11718
  )
@@ -11749,7 +11751,7 @@ const Ow = () => {
11749
11751
  width: n ? e?.expanded?.width ?? "800px" : e?.default?.width ?? "400px",
11750
11752
  height: n ? e?.expanded?.height ?? "100%" : e?.default?.height ?? "100vh"
11751
11753
  },
11752
- transition: { duration: 0.3, ease: be },
11754
+ transition: { duration: 0.3, ease: ye },
11753
11755
  className: k(
11754
11756
  "aui-root aui-sidecar bg-popover text-popover-foreground fixed top-0 right-0 border-l",
11755
11757
  r.className
package/dist/index.d.ts CHANGED
@@ -3,5 +3,5 @@ export { useElements as useGramElements } from './hooks/useElements';
3
3
  export { Chat } from './components/Chat';
4
4
  export { defineFrontendTool } from './lib/tools';
5
5
  export type { FrontendTool } from './lib/tools';
6
- export type { ElementsConfig, ComposerConfig, AttachmentsConfig, ModalConfig, SidecarConfig, ToolsConfig, ModelConfig, ThemeConfig, WelcomeConfig, Suggestion, Model, ModalTriggerPosition, ColorScheme, Radius, Density, Variant, Dimensions, Dimension, } from './types';
6
+ export type { ElementsProviderProps, ElementsConfig, ComposerConfig, AttachmentsConfig, ModalConfig, SidecarConfig, ToolsConfig, ModelConfig, ThemeConfig, WelcomeConfig, Suggestion, Model, ModalTriggerPosition, ColorScheme, Radius, Density, Variant, Dimensions, Dimension, ComponentOverrides, } from './types';
7
7
  export type { Plugin } from './types/plugins';