sage-nexus-ui 1.12.0 → 1.13.1

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.
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as r}from"../../Box.mjs";import{Chip as i}from"../../Chip.mjs";import{H3 as l,Body1 as n}from"../../Typography.mjs";import o from"./ChatAvatar.mjs";import m from"./SuggestedPrompts.mjs";const s=({title:s,description:p,dataSources:a,prompts:c,avatarIcon:x,onSelect:f})=>e(r,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,py:6},children:[t(o,{size:"lg",icon:x}),e(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",gap:.5},children:[t(l,{children:s}),t(n,{children:p})]}),a&&a.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:a.map(e=>t(i,{label:e,size:"small"},e))}),e(r,{sx:{mt:2},children:[t(n,{sx:{mb:1},children:"Try asking:"}),t(m,{prompts:c,onSelect:f})]})]});export{s as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as r}from"../../Box.mjs";import{Chip as i}from"../../Chip.mjs";import{H3 as l,Body1 as n}from"../../Typography.mjs";import o from"./ChatAvatar.mjs";import m from"./SuggestedPrompts.mjs";const s=({title:s,description:p,dataSources:a,prompts:c,avatarIcon:x,onSelect:f})=>e(r,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,py:6},children:[t(o,{size:"lg",icon:x}),e(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",gap:.5},children:[t(l,{children:s}),t(n,{children:p})]}),a&&a.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:a.map(e=>t(i,{label:e,size:"small"},e))}),c.length>0&&e(r,{sx:{mt:2},children:[t(n,{sx:{mb:1},children:"Try asking:"}),t(m,{prompts:c,onSelect:f})]})]});export{s as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Box as t}from"../Box.mjs";import{AiButton as i}from"../AiButton.mjs";const r=({onOpen:r,fabLabel:e})=>o(t,{sx:{position:"fixed",bottom:24,right:24,zIndex:50},children:o(i,{onClick:r,label:e,"aria-label":e})});export{r as FABButton};
1
+ import{jsx as t}from"react/jsx-runtime";import{Box as o}from"../Box.mjs";import{AiButton as e}from"../AiButton.mjs";const i=({onOpen:i,fabLabel:m,placement:r="bottom-right"})=>t(o,{sx:{position:"fixed",bottom:24,..."bottom-left"===r?{left:24}:{right:24},zIndex:50},children:t(e,{onClick:i,label:m,"aria-label":m})});export{i as FABButton};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{FABButton as i}from"./FABButton.mjs";import{GlassPaper as s}from"../GlassPaper.mjs";import n from"./WidgetParts/WidgetBody.mjs";import a from"./WidgetParts/WidgetHeader.mjs";import r from"./WidgetParts/WidgetInput.mjs";const d=["Summarise my latest data","What changed this week?","Show me the key trends","Help me understand my metrics"];function l({title:l="Ask Nexus",subtitle:m="Ready to help",fabLabel:p="Ask Nexus",avatarIcon:h,placeholder:u,emptyTitle:c="Ask Nexus",emptyDescription:g="Ask me anything about your data and I'll help you find answers.",dataSources:x,suggestedPrompts:y=d,isOpen:f,isTyping:b,messages:v,streamingText:w,liveTraceEvents:T,showActivity:A=!1,onOpen:P,onClose:S,onSend:W,onAbort:j,onNewChat:k,onExpandToFullPage:I,hideFab:N=!1}){return N?null:e(t,{children:[f&&e(s,{elevation:8,sx:{boxShadow:e=>e.shadows[2],borderRadius:3,position:"fixed",bottom:24,right:24,zIndex:50,display:"flex",flexDirection:"column",width:380,maxHeight:"min(520px, 80vh)",overflow:"hidden",p:0,"& > div":{display:"flex",flexDirection:"column",flex:1,minHeight:0}},children:[o(a,{title:l,subtitle:m,onNewChat:k,onExpandToFullPage:I,onClose:S,avatarIcon:h}),o(n,{avatarIcon:h,isTyping:b,liveTraceEvents:T,messages:v,onAbort:j,showActivity:A,streamingText:w,emptyTitle:c,emptyDescription:g,dataSources:x,suggestedPrompts:y,onSend:W}),o(r,{placeholder:u,isTyping:b,onSend:W})]}),!f&&o(i,{onOpen:P,fabLabel:p})]})}export{l as NexusChatWidget};
1
+ import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{FABButton as i}from"./FABButton.mjs";import{GlassPaper as n}from"../GlassPaper.mjs";import s from"./WidgetParts/WidgetBody.mjs";import a from"./WidgetParts/WidgetHeader.mjs";import r from"./WidgetParts/WidgetInput.mjs";const l=["Summarise my latest data","What changed this week?","Show me the key trends","Help me understand my metrics"];function m({title:m="Ask Nexus",subtitle:d="Ready to help",fabLabel:p="Ask Nexus",avatarIcon:c,placeholder:h,emptyTitle:u="Ask Nexus",emptyDescription:g="Ask me anything about your data and I'll help you find answers.",dataSources:f,suggestedPrompts:x=l,isOpen:y,isTyping:b,messages:v,streamingText:w,liveTraceEvents:T,showActivity:A=!1,onOpen:P,onClose:S,onSend:W,onAbort:j,onNewChat:k,onExpandToFullPage:I,hideFab:N=!1,placement:C="bottom-right"}){if(N)return null;return e(t,{children:[y&&e(n,{elevation:8,sx:{boxShadow:e=>e.shadows[2],borderRadius:3,position:"fixed",bottom:24,..."bottom-left"===C?{left:24}:{right:24},zIndex:50,display:"flex",flexDirection:"column",width:380,maxHeight:"min(520px, 80vh)",overflow:"hidden",p:0,"& > div":{display:"flex",flexDirection:"column",flex:1,minHeight:0}},children:[o(a,{title:m,subtitle:d,onNewChat:k,onExpandToFullPage:I,onClose:S,avatarIcon:c}),o(s,{avatarIcon:c,isTyping:b,liveTraceEvents:T,messages:v,onAbort:j,showActivity:A,streamingText:w,emptyTitle:u,emptyDescription:g,dataSources:f,suggestedPrompts:x,onSend:W}),o(r,{placeholder:h,isTyping:b,onSend:W})]}),!y&&o(i,{onOpen:P,fabLabel:p,placement:C})]})}export{m as NexusChatWidget};
@@ -1 +1 @@
1
- const o="1.12.0";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.13.1";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -752,8 +752,10 @@ interface NexusChatWidgetProps {
752
752
  /** hideFab - Pass true to hide the FAB (e.g. when on the full-page chat route).
753
753
  * Consumer computes this: hideFab={pathname === ROUTES.AGENT} */
754
754
  hideFab?: boolean;
755
+ /** Anchor corner for the floating widget and FAB. Defaults to 'bottom-right'. */
756
+ placement?: "bottom-right" | "bottom-left";
755
757
  }
756
- declare function NexusChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onAbort, onNewChat, onExpandToFullPage, hideFab, }: NexusChatWidgetProps): react_jsx_runtime.JSX.Element | null;
758
+ declare function NexusChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onAbort, onNewChat, onExpandToFullPage, hideFab, placement, }: NexusChatWidgetProps): react_jsx_runtime.JSX.Element | null;
757
759
 
758
760
  interface MarkdownContentProps {
759
761
  content: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",