bstp-agent-widget 0.2.20 → 0.2.22

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.
@@ -23740,162 +23740,176 @@ function JO({ ...e }) {
23740
23740
  //#endregion
23741
23741
  //#region src/components/AgentChat/AgentChatDrawer.tsx
23742
23742
  function YO({ opened: e, onClose: t, zIndex: n, withinPortal: r, messages: i, composerText: a, onComposerTextChange: o, isLoading: s, error: c, canSend: l, onSubmit: u, isListening: d, isVoiceSupported: f, onToggleVoice: p, drawerTitle: m, runtimeInfo: h, scrollViewportRef: g, drawerDraggable: _, drawerResizableWidth: v, drawerResizableHeight: y }) {
23743
- return /* @__PURE__ */ T(Y, {
23744
- style: {
23745
- position: "fixed",
23746
- top: 0,
23747
- right: 0,
23748
- bottom: 0,
23749
- width: e ? `${Math.max(280, 420 + v.offset)}px` : 0,
23750
- zIndex: n,
23751
- pointerEvents: e ? "auto" : "none",
23752
- ..._.style
23743
+ return /* @__PURE__ */ T(w, { children: /* @__PURE__ */ E(ub, {
23744
+ opened: e,
23745
+ onClose: t,
23746
+ size: Math.max(280, 420 + v.offset),
23747
+ zIndex: n,
23748
+ withinPortal: r,
23749
+ overlayProps: {
23750
+ backgroundOpacity: .45,
23751
+ blur: 6,
23752
+ style: { zIndex: Math.max(1, n - 1) }
23753
23753
  },
23754
- children: /* @__PURE__ */ E(ub, {
23755
- opened: e,
23756
- onClose: t,
23757
- size: Math.max(280, 420 + v.offset),
23758
- zIndex: n,
23759
- withinPortal: r,
23760
- title: /* @__PURE__ */ T(Y, { children: /* @__PURE__ */ E(kl, {
23761
- gap: "xs",
23762
- align: "center",
23763
- wrap: "nowrap",
23764
- children: [
23765
- m,
23766
- /* @__PURE__ */ T(Xd, {
23767
- size: "xs",
23768
- c: "dimmed",
23769
- children: h.customerId ? `#${h.customerId}` : "#-"
23770
- }),
23771
- /* @__PURE__ */ T(Xd, {
23772
- size: "xs",
23773
- c: h.hasCustomerToken ? "green" : "red",
23774
- children: h.hasCustomerToken ? "cust✓" : "cust✗"
23775
- }),
23776
- /* @__PURE__ */ T(Xd, {
23777
- size: "xs",
23778
- c: h.hasGenaiToken ? "green" : "red",
23779
- children: h.hasGenaiToken ? "genai✓" : "genai✗"
23780
- })
23781
- ]
23782
- }) }),
23754
+ styles: {
23755
+ content: {
23756
+ display: "flex",
23757
+ flexDirection: "column",
23758
+ backgroundColor: "var(--mantine-custom-color-surface-body-bg, #f8f9fa)"
23759
+ },
23760
+ header: {
23761
+ padding: "16px",
23762
+ borderBottom: "1px solid var(--mantine-color-gray-3)",
23763
+ backgroundColor: "var(--mantine-custom-color-surface-default, #ffffff)"
23764
+ },
23765
+ body: {
23766
+ padding: "16px",
23767
+ backgroundColor: "var(--mantine-custom-color-surface-default, #ffffff)"
23768
+ },
23769
+ title: {
23770
+ fontSize: "18px",
23771
+ fontWeight: 700,
23772
+ color: "var(--mantine-custom-color-text-default, #1f2937)"
23773
+ }
23774
+ },
23775
+ title: /* @__PURE__ */ T(Y, { children: /* @__PURE__ */ E(kl, {
23776
+ gap: "xs",
23777
+ align: "center",
23778
+ wrap: "nowrap",
23783
23779
  children: [
23784
- /* @__PURE__ */ E(ub.Body, { children: [c && /* @__PURE__ */ T(Xd, {
23780
+ m,
23781
+ /* @__PURE__ */ T(Xd, {
23785
23782
  size: "xs",
23786
- c: "red",
23787
- mb: "sm",
23788
- children: c
23789
- }), /* @__PURE__ */ T(uc, {
23790
- h: "100%",
23791
- type: "auto",
23792
- offsetScrollbars: !0,
23793
- viewportRef: g,
23794
- children: /* @__PURE__ */ E(zv, {
23795
- gap: "sm",
23796
- children: [i.map((e) => /* @__PURE__ */ T(Y, {
23797
- style: {
23798
- alignSelf: e.sentBy === "user" ? "flex-end" : "flex-start",
23799
- maxWidth: "90%",
23800
- padding: 12,
23801
- borderRadius: 12,
23802
- background: e.sentBy === "user" ? "var(--mantine-color-blue-light)" : "var(--mantine-color-gray-light)"
23803
- },
23804
- children: e.sentBy === "assistant" ? /* @__PURE__ */ T(VO, { content: e.text }) : /* @__PURE__ */ T(Xd, {
23805
- style: {
23806
- whiteSpace: "pre-wrap",
23807
- fontSize: "14px",
23808
- lineHeight: 1.5
23809
- },
23810
- children: e.text
23811
- })
23812
- }, e.id)), s && /* @__PURE__ */ T(Y, {
23783
+ c: "dimmed",
23784
+ children: h.customerId ? `#${h.customerId}` : "#-"
23785
+ }),
23786
+ /* @__PURE__ */ T(Xd, {
23787
+ size: "xs",
23788
+ c: h.hasCustomerToken ? "green" : "red",
23789
+ children: h.hasCustomerToken ? "cust✓" : "cust✗"
23790
+ }),
23791
+ /* @__PURE__ */ T(Xd, {
23792
+ size: "xs",
23793
+ c: h.hasGenaiToken ? "green" : "red",
23794
+ children: h.hasGenaiToken ? "genai✓" : "genai✗"
23795
+ })
23796
+ ]
23797
+ }) }),
23798
+ children: [
23799
+ /* @__PURE__ */ E(ub.Body, { children: [c && /* @__PURE__ */ T(Xd, {
23800
+ size: "xs",
23801
+ c: "red",
23802
+ mb: "sm",
23803
+ children: c
23804
+ }), /* @__PURE__ */ T(uc, {
23805
+ h: "100%",
23806
+ type: "auto",
23807
+ offsetScrollbars: !0,
23808
+ viewportRef: g,
23809
+ children: /* @__PURE__ */ E(zv, {
23810
+ gap: "sm",
23811
+ children: [i.map((e) => /* @__PURE__ */ T(Y, {
23812
+ style: {
23813
+ alignSelf: e.sentBy === "user" ? "flex-end" : "flex-start",
23814
+ maxWidth: "90%",
23815
+ padding: 12,
23816
+ borderRadius: 12,
23817
+ background: e.sentBy === "user" ? "var(--mantine-color-blue-light)" : "var(--mantine-color-gray-light)"
23818
+ },
23819
+ children: e.sentBy === "assistant" ? /* @__PURE__ */ T(VO, { content: e.text }) : /* @__PURE__ */ T(Xd, {
23813
23820
  style: {
23814
- alignSelf: "flex-start",
23815
- maxWidth: "90%",
23816
- padding: 12,
23817
- borderRadius: 12,
23818
- background: "var(--mantine-color-gray-light)"
23821
+ whiteSpace: "pre-wrap",
23822
+ fontSize: "14px",
23823
+ lineHeight: 1.5
23819
23824
  },
23820
- children: /* @__PURE__ */ T(HO, { messages: [
23821
- "Thinking...",
23822
- "Analyzing your request...",
23823
- "Searching for information...",
23824
- "Processing data...",
23825
- "Preparing response...",
23826
- "Almost there..."
23827
- ] })
23828
- })]
23829
- })
23830
- })] }),
23831
- /* @__PURE__ */ T(ub.Footer, { children: /* @__PURE__ */ T(Y, {
23832
- style: { position: "relative" },
23833
- children: /* @__PURE__ */ E(Y, {
23825
+ children: e.text
23826
+ })
23827
+ }, e.id)), s && /* @__PURE__ */ T(Y, {
23834
23828
  style: {
23835
- position: "relative",
23836
- width: "100%"
23829
+ alignSelf: "flex-start",
23830
+ maxWidth: "90%",
23831
+ padding: 12,
23832
+ borderRadius: 12,
23833
+ background: "var(--mantine-color-gray-light)"
23837
23834
  },
23838
- children: [/* @__PURE__ */ T(qO, {
23839
- composerText: a,
23840
- onComposerTextChange: o,
23841
- isLoading: s,
23835
+ children: /* @__PURE__ */ T(HO, { messages: [
23836
+ "Thinking...",
23837
+ "Analyzing your request...",
23838
+ "Searching for information...",
23839
+ "Processing data...",
23840
+ "Preparing response...",
23841
+ "Almost there..."
23842
+ ] })
23843
+ })]
23844
+ })
23845
+ })] }),
23846
+ /* @__PURE__ */ T(ub.Footer, { children: /* @__PURE__ */ T(Y, {
23847
+ style: { position: "relative" },
23848
+ children: /* @__PURE__ */ E(Y, {
23849
+ style: {
23850
+ position: "relative",
23851
+ width: "100%"
23852
+ },
23853
+ children: [/* @__PURE__ */ T(qO, {
23854
+ composerText: a,
23855
+ onComposerTextChange: o,
23856
+ isLoading: s,
23857
+ isListening: d,
23858
+ isVoiceSupported: f,
23859
+ onSubmit: u
23860
+ }), /* @__PURE__ */ E(kl, {
23861
+ gap: 4,
23862
+ align: "center",
23863
+ style: {
23864
+ position: "absolute",
23865
+ right: 8,
23866
+ top: "50%",
23867
+ transform: "translateY(-50%)"
23868
+ },
23869
+ children: [f && /* @__PURE__ */ T(KO, {
23842
23870
  isListening: d,
23843
- isVoiceSupported: f,
23844
- onSubmit: u
23845
- }), /* @__PURE__ */ E(kl, {
23846
- gap: 4,
23847
- align: "center",
23848
- style: {
23849
- position: "absolute",
23850
- right: 8,
23851
- top: "50%",
23852
- transform: "translateY(-50%)"
23853
- },
23854
- children: [f && /* @__PURE__ */ T(KO, {
23855
- isListening: d,
23856
- isLoading: s,
23857
- onToggleVoice: p
23858
- }), /* @__PURE__ */ T(yl, {
23859
- onClick: u,
23860
- disabled: !l || s,
23861
- size: 32,
23862
- radius: "xl",
23863
- variant: "filled",
23864
- children: /* @__PURE__ */ T(JO, {
23865
- width: "18",
23866
- height: "18"
23867
- })
23868
- })]
23871
+ isLoading: s,
23872
+ onToggleVoice: p
23873
+ }), /* @__PURE__ */ T(yl, {
23874
+ onClick: u,
23875
+ disabled: !l || s,
23876
+ size: 32,
23877
+ radius: "xl",
23878
+ variant: "filled",
23879
+ children: /* @__PURE__ */ T(JO, {
23880
+ width: "18",
23881
+ height: "18"
23882
+ })
23869
23883
  })]
23870
- })
23871
- }) }),
23872
- /* @__PURE__ */ T(Y, {
23873
- onPointerDown: y.handlePointerDown,
23874
- style: {
23875
- position: "absolute",
23876
- bottom: 0,
23877
- left: 0,
23878
- right: 0,
23879
- height: "8px",
23880
- ...y.style,
23881
- zIndex: 10
23882
- }
23883
- }),
23884
- /* @__PURE__ */ T(Y, {
23885
- onPointerDown: v.handlePointerDown,
23886
- style: {
23887
- position: "absolute",
23888
- top: 0,
23889
- bottom: 0,
23890
- left: 0,
23891
- width: "8px",
23892
- ...v.style,
23893
- zIndex: 10
23894
- }
23884
+ })]
23895
23885
  })
23896
- ]
23897
- })
23898
- });
23886
+ }) }),
23887
+ /* @__PURE__ */ T(Y, {
23888
+ onPointerDown: y.handlePointerDown,
23889
+ style: {
23890
+ position: "absolute",
23891
+ bottom: 0,
23892
+ left: 0,
23893
+ right: 0,
23894
+ height: "8px",
23895
+ ...y.style,
23896
+ zIndex: 10
23897
+ }
23898
+ }),
23899
+ /* @__PURE__ */ T(Y, {
23900
+ onPointerDown: v.handlePointerDown,
23901
+ style: {
23902
+ position: "absolute",
23903
+ top: 0,
23904
+ bottom: 0,
23905
+ left: 0,
23906
+ width: "8px",
23907
+ ...v.style,
23908
+ zIndex: 10
23909
+ }
23910
+ })
23911
+ ]
23912
+ }) });
23899
23913
  }
23900
23914
  //#endregion
23901
23915
  //#region src/hooks/usePointerInteraction.ts