sage-nexus-ui 1.13.3 → 1.13.4

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 a}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 p 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:g="Ask Nexus",subtitle:x="Ready to help",avatarIcon:C,placeholder:b,emptyTitle:v="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:"}){const F=A.length>0||S,H=F&&W&&W.length>0;return e(i,{open:u,fullScreen:!0,onClose:f,children:o(r,{sx:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden"},children:[e(a,{title:g,subtitle:x,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:F?e(c,{messages:A,isTyping:S,streamingText:I,liveTraceEvents:T,onAbort:D,avatarIcon:C,showActivity:E}):e(d,{title:v,description:y,dataSources:w,prompts:j.slice(0,4),avatarIcon:C,onSelect:z})})]}),H&&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(p,{prompts:W,onSelect:z})]}),e(h,{placeholder:b,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.4";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -166,8 +166,14 @@ 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;
169
175
  }
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;
176
+ declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
171
177
 
172
178
  interface FABButtonProps {
173
179
  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.4",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",