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