sage-nexus-ui 1.13.3 → 1.13.5

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{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"@mui/icons-material/CloseFullscreen";import{Dialog as i}from"../Dialog.mjs";import{Box as s}from"../Box.mjs";import{Stack as r}from"../Stack.mjs";import{IconButton as n}from"../IconButton.mjs";import{AiChip as m}from"../AiChip.mjs";import{AgentChatWindowHeader as l}from"./AgentChatWindowHeader.mjs";import a from"./WidgetParts/WidgetBody.mjs";import p from"./WidgetParts/WidgetInput.mjs";function c({open:c,onClose:d,title:g="Ask Nexus",subtitle:u="Ready to help",avatarIcon:h,placeholder:f,emptyTitle:y="Ask Nexus",emptyDescription:x="Ask me anything about your data and I'll help you find answers.",dataSources:A,suggestedPrompts:j=[],showAiChip:v=!0,isTyping:C,messages:T,streamingText:w,liveTraceEvents:S,showActivity:b=!1,onSend:k,onAbort:I}){return e(i,{open:c,fullScreen:!0,onClose:d,children:t(s,{sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"background.default"},children:[e(l,{title:g,subtitle:u,showAiChip:!1,actions:t(r,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[v&&e(m,{}),e(n,{title:"Close full view",size:"small",onClick:d,children:e(o,{sx:{fontSize:16}})})]})}),e(a,{avatarIcon:h,isTyping:C,liveTraceEvents:S,messages:T,onAbort:I,showActivity:b,streamingText:w,emptyTitle:y,emptyDescription:x,dataSources:A,suggestedPrompts:j,onSend:k}),e(p,{placeholder:f,isTyping:C,onSend:k})]})})}export{c as NexusChatDialog};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"@mui/icons-material/CloseFullscreen";import{Dialog as i}from"../Dialog.mjs";import{Box as r}from"../Box.mjs";import{Stack as s}from"../Stack.mjs";import{IconButton as n}from"../IconButton.mjs";import{AiChip as m}from"../AiChip.mjs";import{Caption as l}from"../Typography.mjs";import{AgentChatWindowHeader as p}from"./AgentChatWindowHeader.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react";import"@mui/material";import"../Code.mjs";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/StopCircle";import a from"./ChatComponents/SuggestedPrompts.mjs";import c from"./ChatComponents/MessageList.mjs";import d from"./ChatComponents/EmptyState.mjs";import h from"./WidgetParts/WidgetInput.mjs";function u({open:u,onClose:f,title:x="Ask Nexus",subtitle:g="Ready to help",avatarIcon:C,placeholder:v,emptyTitle:b="Ask Nexus",emptyDescription:y="Ask me anything about your data and I'll help you find answers.",dataSources:w,suggestedPrompts:j=[],showAiChip:k=!0,isTyping:S,messages:A,streamingText:I,liveTraceEvents:T,showActivity:E=!1,onSend:z,onAbort:D,background:P,followUpPrompts:W,followUpLabel:B="Suggested follow-ups:",topOffset:F}){const H=A.length>0||S,L=H&&W&&W.length>0;return e(i,{open:u,fullScreen:!0,onClose:f,sx:F?{top:`${F}px`}:void 0,children:o(r,{sx:{display:"flex",flexDirection:"column",height:F?`calc(100vh - ${F}px)`:"100vh",overflow:"hidden"},children:[e(p,{title:x,subtitle:g,showAiChip:!1,actions:o(s,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[k&&e(m,{}),e(n,{title:"Close full view",size:"small",onClick:f,children:e(t,{sx:{fontSize:16}})})]})}),o(r,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[P&&e(r,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:P}),e(r,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,overflowY:"auto",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:H?e(c,{messages:A,isTyping:S,streamingText:I,liveTraceEvents:T,onAbort:D,avatarIcon:C,showActivity:E}):e(d,{title:b,description:y,dataSources:w,prompts:j.slice(0,4),avatarIcon:C,onSelect:z})})]}),L&&o(r,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:.5,flexShrink:0},children:[e(l,{sx:{display:"block",mb:.75},children:B}),e(a,{prompts:W,onSelect:z})]}),e(h,{placeholder:v,isTyping:S,onSend:z})]})})}export{u as NexusChatDialog};
@@ -1 +1 @@
1
- const o="1.13.3";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.13.5";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -166,8 +166,17 @@ interface NexusChatDialogProps {
166
166
  showActivity?: boolean;
167
167
  onSend: (message: string) => void;
168
168
  onAbort?: () => void;
169
+ /** Rendered as an absolute-fill layer behind the glass body, e.g. <GreenWaveBackground /> */
170
+ background?: React.ReactNode;
171
+ /** Prompt chips shown in a paper strip directly above the input during an active conversation */
172
+ followUpPrompts?: string[];
173
+ /** Label shown above the follow-up chips. Defaults to "Suggested follow-ups:" */
174
+ followUpLabel?: string;
175
+ /** Height in px of a sticky/fixed bar above the dialog (e.g. AppBar). The dialog root shifts
176
+ * down by this amount so the bar remains visible above the overlay. */
177
+ topOffset?: number;
169
178
  }
170
- declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
179
+ declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, topOffset, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
171
180
 
172
181
  interface FABButtonProps {
173
182
  onOpen: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.13.3",
3
+ "version": "1.13.5",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",