bstp-agent-widget 0.2.46 → 0.2.47

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.
@@ -15691,12 +15691,12 @@ var ub = ({ ...e }) => {
15691
15691
  };
15692
15692
  ub.Body = cb, ub.Footer = lb;
15693
15693
  var db = {
15694
- root: "_root_n2lga_1",
15695
- inner: "_inner_n2lga_6",
15696
- content: "_content_n2lga_12",
15697
- header: "_header_n2lga_22",
15698
- body: "_body_n2lga_32",
15699
- title: "_title_n2lga_37"
15694
+ root: "_root_nppjj_1",
15695
+ inner: "_inner_nppjj_6",
15696
+ content: "_content_nppjj_12",
15697
+ header: "_header_nppjj_19",
15698
+ body: "_body_nppjj_29",
15699
+ title: "_title_nppjj_34"
15700
15700
  };
15701
15701
  //#endregion
15702
15702
  //#region node_modules/marked/lib/marked.esm.js
@@ -23747,8 +23747,8 @@ function YO({ ...e }) {
23747
23747
  }
23748
23748
  //#endregion
23749
23749
  //#region src/components/AgentChat/AgentChatDrawer.tsx
23750
- function XO({ opened: e, onClose: t, zIndex: n, withinPortal: r, withOverlay: i = !0, messages: a, composerText: o, onComposerTextChange: s, isLoading: c, error: l, canSend: u, onSubmit: d, isListening: p, isVoiceSupported: m, onToggleVoice: h, drawerTitle: g, runtimeInfo: _, scrollViewportRef: v, drawerDraggable: y, drawerResizableWidth: b, drawerResizableHeight: x, drawerBaseWidth: S = 420, topOffset: C = 0 }) {
23751
- let D = Math.max(280, S + b.offset);
23750
+ function XO({ opened: e, onClose: t, zIndex: n, withinPortal: r, withOverlay: i = !0, messages: a, composerText: o, onComposerTextChange: s, isLoading: c, error: l, canSend: u, onSubmit: d, isListening: p, isVoiceSupported: m, onToggleVoice: h, drawerTitle: g, runtimeInfo: _, scrollViewportRef: v, drawerDraggable: y, drawerResizableWidth: b, drawerResizableHeight: x, drawerBaseWidth: S = 420, topOffset: C = 0, drawerRightOffset: D = 0, drawerBorderRadius: O = 0, drawerShadow: k = !1 }) {
23751
+ let A = Math.max(280, S + b.offset);
23752
23752
  return f(() => {
23753
23753
  if (typeof document > "u") return;
23754
23754
  let t = document.documentElement;
@@ -23756,13 +23756,13 @@ function XO({ opened: e, onClose: t, zIndex: n, withinPortal: r, withOverlay: i
23756
23756
  t.style.setProperty("--agent-widget-drawer-width", "0px");
23757
23757
  return;
23758
23758
  }
23759
- return t.style.setProperty("--agent-widget-drawer-width", `${D}px`), () => {
23759
+ return t.style.setProperty("--agent-widget-drawer-width", `${A}px`), () => {
23760
23760
  t.style.setProperty("--agent-widget-drawer-width", "0px");
23761
23761
  };
23762
- }, [e, D]), /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E(ub, {
23762
+ }, [e, A]), /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E(ub, {
23763
23763
  opened: e,
23764
23764
  onClose: t,
23765
- size: D,
23765
+ size: A,
23766
23766
  zIndex: n,
23767
23767
  withinPortal: r,
23768
23768
  overlayProps: i ? {
@@ -23784,7 +23784,10 @@ function XO({ opened: e, onClose: t, zIndex: n, withinPortal: r, withOverlay: i
23784
23784
  },
23785
23785
  styles: { content: {
23786
23786
  marginTop: C,
23787
- height: `calc(100vh - ${C}px)`
23787
+ marginRight: D,
23788
+ height: `calc(100dvh - ${C}px)`,
23789
+ borderRadius: O,
23790
+ boxShadow: k ? "0 16px 40px rgba(15, 23, 42, 0.24)" : "none"
23788
23791
  } },
23789
23792
  title: /* @__PURE__ */ T(Y, { children: /* @__PURE__ */ E(kl, {
23790
23793
  gap: "xs",
@@ -29120,59 +29123,62 @@ var XF = 1e4, ZF = {
29120
29123
  };
29121
29124
  function QF({ ui: e }) {
29122
29125
  YF();
29123
- let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? XF, a = e?.withinPortal ?? !0, o = e?.withOverlay ?? !0, s = e?.drawerWidth ?? 420, c = e?.topOffset ?? 0, l = {
29126
+ let [t, { open: n, close: r }] = mt(!1), i = e?.zIndex ?? XF, a = e?.withinPortal ?? !0, o = e?.withOverlay ?? !0, s = e?.drawerWidth ?? 420, c = e?.topOffset ?? 0, l = e?.drawerRightOffset ?? 0, u = e?.drawerBorderRadius ?? 0, d = e?.drawerShadow ?? !1, f = {
29124
29127
  bottom: e?.fabBottomOffset ?? ZF.bottom,
29125
29128
  right: e?.fabRightOffset ?? ZF.right
29126
- }, { messages: u, composerText: d, setComposerText: f, isLoading: p, error: m, sendMessage: h, sendInitialMessage: g, canSend: v } = zF(), { runtimeInfo: y, refreshRuntimeInfo: b } = BF(), x = ek({ skipSelector: "button, input, textarea, [role=\"button\"]" }), S = VF({ axis: "y" }), C = VF({
29129
+ }, { messages: p, composerText: m, setComposerText: h, isLoading: g, error: v, sendMessage: y, sendInitialMessage: b, canSend: x } = zF(), { runtimeInfo: S, refreshRuntimeInfo: C } = BF(), D = ek({ skipSelector: "button, input, textarea, [role=\"button\"]" }), O = VF({ axis: "y" }), k = VF({
29127
29130
  axis: "x",
29128
29131
  direction: -1
29129
- }), D = UF([u.length, p]), { isListening: O, isSupported: k, startListening: A, stopListening: j, reset: M } = WF({
29132
+ }), A = UF([p.length, g]), { isListening: j, isSupported: M, startListening: N, stopListening: P, reset: F } = WF({
29130
29133
  lang: GF(),
29131
29134
  continuous: !0,
29132
29135
  pauseOnSubmit: !0,
29133
- onTextChange: f
29134
- }), N = _(() => /* @__PURE__ */ T(Xd, {
29136
+ onTextChange: h
29137
+ }), ee = _(() => /* @__PURE__ */ T(Xd, {
29135
29138
  fw: 800,
29136
29139
  children: "Agent Chat"
29137
- }), []), P = async () => {
29138
- n(), await b(), await g();
29140
+ }), []), te = async () => {
29141
+ n(), await C(), await b();
29139
29142
  };
29140
29143
  return /* @__PURE__ */ E(w, { children: [!t && /* @__PURE__ */ T(nk, {
29141
- onClick: () => void P(),
29144
+ onClick: () => void te(),
29142
29145
  zIndex: i,
29143
- position: l,
29146
+ position: f,
29144
29147
  color: e?.accentColor,
29145
29148
  label: e?.fabButtonLabel
29146
29149
  }), /* @__PURE__ */ T(XO, {
29147
29150
  opened: t,
29148
29151
  onClose: () => {
29149
- O && j(), r();
29152
+ j && P(), r();
29150
29153
  },
29151
29154
  zIndex: i,
29152
29155
  withinPortal: a,
29153
29156
  withOverlay: o,
29154
29157
  topOffset: c,
29155
29158
  drawerBaseWidth: s,
29156
- messages: u,
29157
- composerText: d,
29158
- onComposerTextChange: f,
29159
- isLoading: p,
29160
- error: m,
29161
- canSend: v,
29159
+ drawerRightOffset: l,
29160
+ drawerBorderRadius: u,
29161
+ drawerShadow: d,
29162
+ messages: p,
29163
+ composerText: m,
29164
+ onComposerTextChange: h,
29165
+ isLoading: g,
29166
+ error: v,
29167
+ canSend: x,
29162
29168
  onSubmit: () => {
29163
- O && j(), M(), h(d);
29169
+ j && P(), F(), y(m);
29164
29170
  },
29165
- isListening: O,
29166
- isVoiceSupported: k,
29171
+ isListening: j,
29172
+ isVoiceSupported: M,
29167
29173
  onToggleVoice: () => {
29168
- O ? j() : (f(""), A());
29174
+ j ? P() : (h(""), N());
29169
29175
  },
29170
- drawerTitle: N,
29171
- runtimeInfo: y,
29172
- scrollViewportRef: D,
29173
- drawerDraggable: x,
29174
- drawerResizableWidth: C,
29175
- drawerResizableHeight: S
29176
+ drawerTitle: ee,
29177
+ runtimeInfo: S,
29178
+ scrollViewportRef: A,
29179
+ drawerDraggable: D,
29180
+ drawerResizableWidth: k,
29181
+ drawerResizableHeight: O
29176
29182
  })] });
29177
29183
  }
29178
29184
  //#endregion