bstp-agent-widget 0.2.90 → 0.2.91

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.
@@ -28403,42 +28403,52 @@ function AP(e = {}) {
28403
28403
  };
28404
28404
  }
28405
28405
  var jP = {
28406
- root: "_root_1vfzh_1",
28407
- button: "_button_1vfzh_5",
28408
- icon: "_icon_1vfzh_22",
28409
- label: "_label_1vfzh_28"
28406
+ root: "_root_1eel0_1",
28407
+ button: "_button_1eel0_5",
28408
+ icon: "_icon_1eel0_21",
28409
+ label: "_label_1eel0_27"
28410
28410
  };
28411
28411
  //#endregion
28412
28412
  //#region src/components/AgentChat/AgentChatFab/AgentChatFab.tsx
28413
- function MP({ onClick: e, zIndex: t, position: n, label: r }) {
28414
- let i = CT(), { handlePointerDown: a, style: o } = AP({ skipSelector: "" }), { transform: s, cursor: c, touchAction: l } = o, u = _(() => ({
28415
- transform: s,
28416
- touchAction: l,
28413
+ function MP({ onClick: e, zIndex: t, position: n, label: r, accentColor: i }) {
28414
+ let a = CT(), o = An(), { handlePointerDown: s, style: c } = AP({ skipSelector: "" }), { transform: l, cursor: u, touchAction: d } = c, f = _(() => ({
28415
+ transform: l,
28416
+ touchAction: d,
28417
28417
  zIndex: t,
28418
28418
  ...n
28419
28419
  }), [
28420
28420
  n,
28421
+ d,
28421
28422
  l,
28422
- s,
28423
28423
  t
28424
+ ]), p = _(() => {
28425
+ let e = i || o.colors.primary[4];
28426
+ return {
28427
+ cursor: u ?? "pointer",
28428
+ background: `linear-gradient(135deg, ${o.colors.primary[5]}, ${e})`
28429
+ };
28430
+ }, [
28431
+ u,
28432
+ i,
28433
+ o.colors.primary
28424
28434
  ]);
28425
28435
  return /* @__PURE__ */ T("div", {
28426
28436
  className: jP.root,
28427
- style: u,
28437
+ style: f,
28428
28438
  children: /* @__PURE__ */ T(xv, {
28429
28439
  label: "Open agent widget",
28430
28440
  position: "left",
28431
28441
  children: /* @__PURE__ */ E(hc, {
28432
28442
  onClick: e,
28433
- onPointerDown: a,
28434
- style: { cursor: c ?? "pointer" },
28443
+ onPointerDown: s,
28444
+ style: p,
28435
28445
  className: jP.button,
28436
28446
  "aria-label": "Open agent widget",
28437
28447
  children: [/* @__PURE__ */ T("span", {
28438
28448
  className: jP.icon,
28439
28449
  children: /* @__PURE__ */ T(DP, {
28440
- width: i.other.iconSize["icon-md"],
28441
- height: i.other.iconSize["icon-md"]
28450
+ width: a.other.iconSize["icon-md"],
28451
+ height: a.other.iconSize["icon-md"]
28442
28452
  })
28443
28453
  }), /* @__PURE__ */ T("span", {
28444
28454
  className: jP.label,
@@ -33971,7 +33981,8 @@ function YV(e) {
33971
33981
  zIndex: a,
33972
33982
  fabPosition: o,
33973
33983
  fabButtonLabel: e?.fabButtonLabel,
33974
- panelTitle: s
33984
+ panelTitle: s,
33985
+ accentColor: e?.accentColor
33975
33986
  };
33976
33987
  }
33977
33988
  //#endregion
@@ -34108,54 +34119,55 @@ function eH({ isListening: e, stopListening: t, reset: n, sendMessage: r, compos
34108
34119
  //#region src/features/agent-chat/components/AgentChatLauncher/AgentChatLauncher.tsx
34109
34120
  function tH(e) {
34110
34121
  GV();
34111
- let { panelWidth: t, panelHeight: n, panelHeaderHeight: r, panelTopOffset: i, zIndex: a, fabPosition: o, fabButtonLabel: s, panelTitle: c } = YV(e), l = v(!1), { messages: u, composerText: d, setComposerText: f, isLoading: p, error: m, sendMessage: h, sendInitialMessage: g, canSend: _ } = kV(), { actions: y, handleActionClick: b } = XV(u, h), { runtimeInfo: x, refreshRuntimeInfo: S } = AV(), { isOpen: C, open: D, close: O } = KV({
34122
+ let { panelWidth: t, panelHeight: n, panelHeaderHeight: r, panelTopOffset: i, zIndex: a, fabPosition: o, fabButtonLabel: s, panelTitle: c, accentColor: l } = YV(e), u = v(!1), { messages: d, composerText: f, setComposerText: p, isLoading: m, error: h, sendMessage: g, sendInitialMessage: _, canSend: y } = kV(), { actions: b, handleActionClick: x } = XV(d, g), { runtimeInfo: S, refreshRuntimeInfo: C } = AV(), { isOpen: D, open: O, close: k } = KV({
34112
34123
  defaultOpen: !1,
34113
34124
  persist: !0,
34114
34125
  onOpen: async () => {
34115
- l.current || (l.current = !0, await S(), await g());
34126
+ u.current || (u.current = !0, await C(), await _());
34116
34127
  }
34117
- }), k = MV([u.length, p]), { isListening: A, isSupported: j, startListening: M, stopListening: N, reset: P } = NV({
34128
+ }), A = MV([d.length, m]), { isListening: j, isSupported: M, startListening: N, stopListening: P, reset: F } = NV({
34118
34129
  lang: PV(),
34119
34130
  continuous: !0,
34120
34131
  pauseOnSubmit: !0,
34121
- onTextChange: f
34122
- }), { panelResizableWidth: F } = $V(e, t, C), { handleSubmit: ee, handleToggleVoice: te, handleClose: I } = eH({
34123
- isListening: A,
34124
- stopListening: N,
34125
- reset: P,
34126
- sendMessage: h,
34127
- composerText: d,
34128
- setComposerText: f,
34129
- startListening: M,
34130
- close: O
34131
- });
34132
- return /* @__PURE__ */ E(w, { children: [!C && /* @__PURE__ */ T(MP, {
34133
- onClick: () => void D(),
34132
+ onTextChange: p
34133
+ }), { panelResizableWidth: ee } = $V(e, t, D), { handleSubmit: te, handleToggleVoice: I, handleClose: L } = eH({
34134
+ isListening: j,
34135
+ stopListening: P,
34136
+ reset: F,
34137
+ sendMessage: g,
34138
+ composerText: f,
34139
+ setComposerText: p,
34140
+ startListening: N,
34141
+ close: k
34142
+ });
34143
+ return /* @__PURE__ */ E(w, { children: [!D && /* @__PURE__ */ T(MP, {
34144
+ onClick: () => void O(),
34134
34145
  zIndex: a,
34135
34146
  position: o,
34136
- label: s
34137
- }), C && /* @__PURE__ */ T(EP, {
34147
+ label: s,
34148
+ accentColor: l
34149
+ }), D && /* @__PURE__ */ T(EP, {
34138
34150
  visible: !0,
34139
- onClose: I,
34140
- messages: u,
34141
- composerText: d,
34142
- onComposerTextChange: f,
34143
- isLoading: p,
34144
- error: m,
34145
- canSend: _,
34146
- onSubmit: ee,
34147
- actions: y,
34148
- onActionClick: b,
34149
- isListening: A,
34150
- isVoiceSupported: j,
34151
- onToggleVoice: te,
34151
+ onClose: L,
34152
+ messages: d,
34153
+ composerText: f,
34154
+ onComposerTextChange: p,
34155
+ isLoading: m,
34156
+ error: h,
34157
+ canSend: y,
34158
+ onSubmit: te,
34159
+ actions: b,
34160
+ onActionClick: x,
34161
+ isListening: j,
34162
+ isVoiceSupported: M,
34163
+ onToggleVoice: I,
34152
34164
  panelTitle: c,
34153
- runtimeInfo: x,
34154
- scrollViewportRef: k,
34165
+ runtimeInfo: S,
34166
+ scrollViewportRef: A,
34155
34167
  panelWidth: t,
34156
34168
  panelHeight: n,
34157
34169
  panelHeaderHeight: r,
34158
- panelResizableWidth: F,
34170
+ panelResizableWidth: ee,
34159
34171
  zIndex: a,
34160
34172
  panelTopOffset: i
34161
34173
  })] });