sage-nexus-ui 1.14.7 → 1.14.9

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 i,jsxs as e,Fragment as t}from"react/jsx-runtime";import{Box as o}from"../Box.mjs";import{Stack as r}from"../Stack.mjs";import{Caption as m}from"../Typography.mjs";import{GlassPaper as n}from"../GlassPaper.mjs";import{Paper as s}from"../Paper.mjs";import{ChatInput as l}from"./ChatInput.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react";import"../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/Download";import"@mui/material";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import a from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as p}from"./AgentChatWindowHeader.mjs";const c=({title:c="Nexus AI Chat",subtitle:d="Your intelligent assistant",showAiChip:h=!0,headerActions:u,body:x,followUpLabel:f="Suggested follow-ups:",followUpPrompts:C,onSelectFollowUp:b,onSend:g,inputDisabled:y=!1,inputPlaceholder:j="Ask me anything...",isStreaming:w=!1,onStop:S,inputActions:A,inputRef:k,isEmpty:D=!1,sx:I})=>{const P=Boolean(C&&C.length>0&&b),R=i(l,{onSend:g,disabled:y,placeholder:j,isStreaming:w,onStop:S,actions:A,inputRef:k});return e(o,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],children:[i(p,{title:c,subtitle:d,showAiChip:h,actions:u}),D?e(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[x,i(o,{sx:{mt:3,width:"100%",maxWidth:700,minWidth:"min(40vw, 100%)"},children:R})]}):e(t,{children:[i(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:x}),P&&e(r,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[i(m,{sx:{display:"block",mb:1},children:f}),i(a,{prompts:C??[],onSelect:b})]}),i(s,{sx:{borderRadius:0,border:"none"},children:i(o,{sx:{p:2,flexShrink:0},children:R})})]})]})};export{c as AgentChatWindow};
1
+ import{jsx as i,jsxs as e,Fragment as t}from"react/jsx-runtime";import{Box as o}from"../Box.mjs";import{Stack as r}from"../Stack.mjs";import{Caption as n}from"../Typography.mjs";import{GlassPaper as m}from"../GlassPaper.mjs";import{Paper as s}from"../Paper.mjs";import{ChatInput as l}from"./ChatInput.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react";import"../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/Download";import"@mui/material";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import p from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as a}from"./AgentChatWindowHeader.mjs";const c=({title:c="Nexus AI Chat",subtitle:d="Your intelligent assistant",showAiChip:h=!0,headerActions:u,body:x,followUpLabel:f="Suggested follow-ups:",followUpPrompts:C,onSelectFollowUp:b,onSend:g,inputDisabled:y=!1,inputPlaceholder:w="Ask me anything...",isStreaming:j=!1,onStop:S,inputActions:A,inputRef:k,isEmpty:D=!1,sx:I})=>{const P=Boolean(C&&C.length>0&&b),R=i(l,{onSend:g,disabled:y,placeholder:w,isStreaming:j,onStop:S,actions:A,inputRef:k});return e(o,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],children:[i(a,{title:c,subtitle:d,showAiChip:h,actions:u}),D?i(s,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:e(m,{sx:{width:"60%",px:4,py:12,textAlign:"center"},children:[x,i(o,{sx:{mt:3,width:"100%",minWidth:"min(40vw, 100%)"},children:R})]})}):e(t,{children:[i(s,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:x}),P&&e(r,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[i(n,{sx:{display:"block",mb:1},children:f}),i(p,{prompts:C??[],onSelect:b})]}),i(s,{sx:{borderRadius:0,border:"none"},children:i(o,{sx:{p:2,flexShrink:0},children:R})})]})]})};export{c as AgentChatWindow};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../Box.mjs";import{Stack as c}from"../../Stack.mjs";import{NexusLogoNodeSvg as s}from"../../NexusLogoNode.mjs";import{IconButton as m}from"../../IconButton.mjs";import{SecondaryButton as d}from"../../SecondaryButton.mjs";import p from"./MarkdownContent.mjs";import f from"./MessageFeedbackBar.mjs";import{colours as u}from"../../../theme/tokens.mjs";const g=({block:i})=>{const[a,c]=r(!1),s=i.language?.trim()||"text",d=i.content||"";if(!d.trim())return null;const p=Boolean(i.title);return e(l,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden",mb:1,"&:last-child":{mb:0}},children:[p&&e(l,{onClick:()=>c(e=>!e),sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider",cursor:"pointer",userSelect:"none"},children:[o(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),o(m,{size:"small",ariaLabel:a?"Collapse":"Expand",children:o(a?n:t,{sx:{fontSize:16}})})]}),(!p||a)&&o(l,{component:"pre",sx:{m:0,p:1.5,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"0.8125rem",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',lineHeight:1.5,bgcolor:"action.hover"},children:o(l,{component:"code",className:`language-${s}`,children:d})})]})},h=({file:e,onDownloadFile:t})=>{const[n,a]=r(!1);return o(d,{size:"small",startIcon:o(i,{}),onClick:async()=>{if(t){a(!0);try{await t(e)}finally{a(!1)}}},disabled:n||!t,children:n?"Preparing…":e.downloadLabel||e.displayName||"Download file"})},x=(e,r)=>{const t=r?.trim();if(!t)return e;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(n).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(l,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},b=({message:r,highlightQuery:t,avatarIcon:n,showActivity:i=!1,onFeedback:m,onDownloadFile:d,contentRenderer:b,markdownComponents:y})=>{const k="user"===r.role,w=!k&&r.codeBlocks&&r.codeBlocks.length>0,v=!k&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:k?"flex-end":"flex-start"},children:[!k&&o(l,{sx:{mt:.25,flexShrink:0},children:n??o(s,{size:36})}),e(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...k?{}:{flex:1}},children:[e(l,{sx:{borderRadius:k?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:k?u.jadeLight:"background.default",color:k?u.black:"text.primary",border:k?"none":"1px solid",borderColor:"divider",whiteSpace:k?"pre-wrap":"normal",lineHeight:1.6},children:[w&&o(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((e,r)=>o(g,{block:e},r))}),k?x(r.content,t):b?b(r.content):o(p,{content:r.content,highlightQuery:t,components:y}),v&&o(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((e,r)=>o(h,{file:e,onDownloadFile:d},`${e.bucket}-${e.key}-${r}`))})]}),!k&&i&&r.traceEvents&&r.traceEvents.length>0&&o(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),!k&&m&&o(f,{message:r,onFeedback:m})]})]})};export{b as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../Box.mjs";import{Stack as c}from"../../Stack.mjs";import{IconButton as m}from"../../IconButton.mjs";import{SecondaryButton as s}from"../../SecondaryButton.mjs";import d from"./MarkdownContent.mjs";import p from"./MessageFeedbackBar.mjs";import{colours as f}from"../../../theme/tokens.mjs";const u=({block:i})=>{const[a,c]=r(!1),s=i.language?.trim()||"text",d=i.content||"";if(!d.trim())return null;const p=Boolean(i.title);return o(l,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden",mb:1,"&:last-child":{mb:0}},children:[p&&o(l,{onClick:()=>c(e=>!e),sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider",cursor:"pointer",userSelect:"none"},children:[e(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),e(m,{size:"small",ariaLabel:a?"Collapse":"Expand",children:e(a?n:t,{sx:{fontSize:16}})})]}),(!p||a)&&e(l,{component:"pre",sx:{m:0,p:1.5,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"0.8125rem",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',lineHeight:1.5,bgcolor:"action.hover"},children:e(l,{component:"code",className:`language-${s}`,children:d})})]})},g=({file:o,onDownloadFile:t})=>{const[n,a]=r(!1);return e(s,{size:"small",startIcon:e(i,{}),onClick:async()=>{if(t){a(!0);try{await t(o)}finally{a(!1)}}},disabled:n||!t,children:n?"Preparing…":o.downloadLabel||o.displayName||"Download file"})},h=(o,r)=>{const t=r?.trim();if(!t)return o;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return o.split(n).map((o,r)=>{if(!o)return null;return o.toLowerCase()===t.toLowerCase()?e(l,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:o},`${o}-${r}`):o})},x=({message:r,highlightQuery:t,showActivity:n=!1,onFeedback:i,onDownloadFile:m,contentRenderer:s,markdownComponents:x})=>{const b="user"===r.role,y=!b&&r.codeBlocks&&r.codeBlocks.length>0,w=!b&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:b?"flex-end":"flex-start"},children:o(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...b?{}:{flex:1}},children:[o(l,{sx:{borderRadius:b?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:b?f.jadeLight:"background.default",color:b?f.black:"text.primary",border:"none",whiteSpace:b?"pre-wrap":"normal",lineHeight:1.6},children:[y&&e(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((o,r)=>e(u,{block:o},r))}),b?h(r.content,t):s?s(r.content):e(d,{content:r.content,highlightQuery:t,components:x}),w&&e(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((o,r)=>e(g,{file:o,onDownloadFile:m},`${o.bucket}-${o.key}-${r}`))})]}),!b&&n&&r.traceEvents&&r.traceEvents.length>0&&e(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),!b&&i&&e(p,{message:r,onFeedback:i})]})})};export{x as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useRef as e,useEffect as o}from"react";import{Box as n}from"../../Box.mjs";import i from"./MessageBubble.mjs";import l from"./StreamingBubble.mjs";import c from"./TypingIndicator.mjs";import{latestTraceLabel as s}from"./latestTraceLabel.mjs";const a=({messages:a,isTyping:m,streamingText:u,liveTraceEvents:g,highlightQuery:h,onAbort:p,avatarIcon:f,showActivity:v=!1})=>{const x=e(null),y=e(null),b=e(!1),T=e(a.length),d=e(!1),j=()=>{const r=y.current;r&&(d.current=!0,r.scrollTop=r.scrollHeight,requestAnimationFrame(()=>{d.current=!1}))};o(()=>{const r=a[a.length-1];a.length>T.current&&"user"===r?.role&&(b.current=!1,j()),T.current=a.length},[a]),o(()=>{b.current||j()},[m,u]);const A=(u||"").trim().length>0,I=m&&A,w=m&&!I;return r(n,{ref:y,onScroll:()=>{d.current||(b.current=!(()=>{const r=y.current;return!r||r.scrollHeight-r.scrollTop-r.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[a.filter(r=>"user"===r.role||r.content).map(r=>t(i,{message:r,highlightQuery:h,avatarIcon:f,showActivity:v},r.id)),I&&t(l,{text:u||"",traceEvents:g||[],highlightQuery:h,avatarIcon:f,onAbort:p,showActivity:v}),w&&t(c,{avatarIcon:f,traceLabel:g&&g.length>0?s(g):void 0}),t(n,{ref:x})]})};export{a as default};
1
+ import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useRef as e,useEffect as o}from"react";import{Box as n}from"../../Box.mjs";import i from"./MessageBubble.mjs";import l from"./StreamingBubble.mjs";import s from"./TypingIndicator.mjs";import{latestTraceLabel as c}from"./latestTraceLabel.mjs";const m=({messages:m,isTyping:u,streamingText:g,liveTraceEvents:a,highlightQuery:h,onAbort:p,showActivity:f=!1})=>{const x=e(null),y=e(null),b=e(!1),v=e(m.length),T=e(!1),d=()=>{const r=y.current;r&&(T.current=!0,r.scrollTop=r.scrollHeight,requestAnimationFrame(()=>{T.current=!1}))};o(()=>{const r=m[m.length-1];m.length>v.current&&"user"===r?.role&&(b.current=!1,d()),v.current=m.length},[m]),o(()=>{b.current||d()},[u,g]);const j=(g||"").trim().length>0,A=u&&j,w=u&&!A;return r(n,{ref:y,onScroll:()=>{T.current||(b.current=!(()=>{const r=y.current;return!r||r.scrollHeight-r.scrollTop-r.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[m.filter(r=>"user"===r.role||r.content).map(r=>t(i,{message:r,highlightQuery:h,showActivity:f},r.id)),A&&t(l,{text:g||"",traceEvents:a||[],highlightQuery:h,onAbort:p,showActivity:f}),w&&t(s,{traceLabel:a&&a.length>0?c(a):void 0}),t(n,{ref:x})]})};export{m as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import i from"@mui/icons-material/StopCircle";import o from"../AgentActivity/AgentActivity.mjs";import{Box as t}from"../../Box.mjs";import{Stack as n}from"../../Stack.mjs";import{ButtonBase as a}from"../../ButtonBase.mjs";import{Caption as m}from"../../Typography.mjs";import{NexusLogoNodeSvg as s}from"../../NexusLogoNode.mjs";import c from"./MarkdownContent.mjs";import{latestTraceLabel as l}from"./latestTraceLabel.mjs";const p=({text:p,traceEvents:d,highlightQuery:g,avatarIcon:x,onAbort:f,showActivity:h=!1})=>r(n,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[e(t,{sx:{mt:.25,flexShrink:0},children:x??e(s,{size:28})}),r(n,{spacing:1,children:[p?r(t,{sx:{borderRadius:" 0.25rem 1rem 1rem 1rem",border:"1px solid",borderColor:"primary.light",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[e(c,{content:p,highlightQuery:g}),e(t,{sx:{display:"inline-block",height:16,bgcolor:"primary.main",verticalAlign:"text-bottom",animation:"pulse 1.2s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.35},"50%":{opacity:1}}}})]}):e(t,{sx:{borderRadius:"1rem 1rem 1rem 0.25rem",border:"1px solid",borderColor:"divider",bgcolor:"background.default",px:1.75,py:1.25},children:e(n,{direction:"row",spacing:1,sx:{alignItems:"center"},children:r(n,{direction:"row",spacing:.5,children:[" ",e(m,{children:d.length>0?`Agent is working... ${l(d)}`:"Agent is working..."}),[0,150,300].map(r=>e(t,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${r}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},r))]})})}),h&&e(o,{isStreaming:!0,traceEvents:d,defaultExpanded:!0}),f&&r(a,{onClick:f,sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:"0.625rem",color:"text.secondary","&:hover":{color:"error.main"},borderRadius:.5,px:.5},children:[e(i,{sx:{fontSize:11}}),"Stop generating"]})]})]});export{p as default};
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import e from"@mui/icons-material/StopCircle";import r from"../AgentActivity/AgentActivity.mjs";import{Box as o}from"../../Box.mjs";import{Stack as n}from"../../Stack.mjs";import{ButtonBase as a}from"../../ButtonBase.mjs";import{Caption as s}from"../../Typography.mjs";import{NexusLogoNodeSvg as m}from"../../NexusLogoNode.mjs";import c from"./MarkdownContent.mjs";import{latestTraceLabel as l}from"./latestTraceLabel.mjs";const p=({text:p,traceEvents:g,highlightQuery:d,avatarIcon:f,onAbort:x,showActivity:h=!1})=>t(n,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[i(o,{sx:{mt:.25,flexShrink:0},children:f??i(m,{size:28})}),t(n,{spacing:1,children:[p?t(o,{sx:{bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[i(c,{content:p,highlightQuery:d}),i(o,{sx:{display:"inline-block",height:16,bgcolor:"primary.main",verticalAlign:"text-bottom",animation:"pulse 1.2s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.35},"50%":{opacity:1}}}})]}):i(o,{sx:{bgcolor:"background.default",px:1.75,py:1.25},children:i(n,{direction:"row",spacing:1,sx:{alignItems:"center"},children:t(n,{direction:"row",spacing:.5,children:[" ",i(s,{children:g.length>0?`Agent is working... ${l(g)}`:"Agent is working..."}),[0,150,300].map(t=>i(o,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${t}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},t))]})})}),h&&i(r,{isStreaming:!0,traceEvents:g,defaultExpanded:!0}),x&&t(a,{onClick:x,sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:"0.625rem",color:"text.secondary","&:hover":{color:"error.main"},borderRadius:.5,px:.5},children:[i(e,{sx:{fontSize:11}}),"Stop generating"]})]})]});export{p as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import r from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as n,Caption as i}from"../Typography.mjs";import{Box as a}from"../Box.mjs";import{IconButton as s}from"../IconButton.mjs";import{colours as l}from"../../theme/tokens.mjs";const m=(e,r)=>{const t=r?.trim();if(!t)return e;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(n).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(a,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},p=({conversation:p,isActive:d,highlightQuery:c,onSelectConversation:u,onDeleteConversation:b,deleteConversationTitle:g,formatMessageCount:x,showMessageCount:h=!1,sx:y})=>{const f=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(p);return e(a,{component:"div",role:"button",tabIndex:0,onClick:()=>u(p.id),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(p.id))},sx:[{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,textAlign:"left",backgroundColor:d?e=>"dark"===e.palette.mode?l.black:l.white:"transparent",backgroundImage:"none",opacity:1,position:"relative",zIndex:1,border:"1px solid",borderColor:d?l.primaryGreenActive:"transparent",cursor:"pointer",outline:"none","&:hover":{backgroundColor:d?e=>"dark"===e.palette.mode?l.black:l.white:"action.hover",backgroundImage:"none"},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`},mb:.25},...Array.isArray(y)?y:y?[y]:[]],children:[o(r,{sx:{fontSize:14,color:d?l.primaryGreenActive:"text.disabled"}}),e(a,{sx:{flex:1,minWidth:0},children:[o(n,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:d?"text.primary":"text.secondary"},children:m(p.title,c)}),h&&o(i,{noWrap:!0,sx:{display:"block"},children:x(f)})]}),o(s,{title:g,ariaLabel:g,onClick:e=>{e.stopPropagation(),b&&Promise.resolve(b(p.id))},disabled:!b,children:o(t,{sx:{fontSize:14,color:d?"error.main":"text.disabled"}})})]})};export{p as ChatHistoryButtonBase};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import r from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as i,Caption as n}from"../Typography.mjs";import{Box as a}from"../Box.mjs";import{IconButton as s}from"../IconButton.mjs";import{colours as l}from"../../theme/tokens.mjs";const d=(e,r)=>{const t=r?.trim();if(!t)return e;const i=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(i).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(a,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},m=({conversation:m,isActive:p,highlightQuery:c,onSelectConversation:u,onDeleteConversation:b,deleteConversationTitle:x,formatMessageCount:g,showMessageCount:h=!1,sx:y})=>{const f=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(m);return e(a,{component:"div",role:"button",tabIndex:0,onClick:()=>u(m.id),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(m.id))},sx:[{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,textAlign:"left",backgroundColor:p?e=>"dark"===e.palette.mode?l.black:l.white:"transparent",backgroundImage:"none",opacity:1,position:"relative",zIndex:1,border:"1px solid",borderColor:p?l.primaryGreenActive:"transparent",cursor:"pointer",outline:"none","&:hover":{backgroundColor:p?e=>"dark"===e.palette.mode?l.black:l.white:"action.hover",backgroundImage:"none","& .delete-button":{visibility:"visible"}},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`},mb:.25},...Array.isArray(y)?y:y?[y]:[]],children:[o(r,{sx:{fontSize:14,color:p?l.primaryGreenActive:"text.disabled"}}),e(a,{sx:{flex:1,minWidth:0},children:[o(i,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:p?"text.primary":"text.secondary"},children:d(m.title,c)}),h&&o(n,{noWrap:!0,sx:{display:"block"},children:g(f)})]}),o(s,{className:"delete-button",title:x,ariaLabel:x,onClick:e=>{e.stopPropagation(),b&&Promise.resolve(b(m.id))},disabled:!b,sx:{visibility:"hidden"},children:o(t,{sx:{fontSize:14,color:p?"error.main":"text.disabled"}})})]})};export{m as ChatHistoryButtonBase};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as t}from"react";import{useTheme as n,useMediaQuery as r,Popover as l}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import a from"@mui/icons-material/ExpandLess";import m from"@mui/icons-material/ExpandMore";import c from"@mui/icons-material/GridView";import p from"@mui/icons-material/History";import{ChatHistory as d}from"./ChatHistory.mjs";import{ChatInput as h}from"./ChatInput.mjs";import{Dialog as x}from"../Dialog.mjs";import{Box as f}from"../Box.mjs";import{Stack as u}from"../Stack.mjs";import{IconButton as g}from"../IconButton.mjs";import{AiChip as v}from"../AiChip.mjs";import{Caption as C,H1 as b,H2 as w}from"../Typography.mjs";import{AgentChatWindowHeader as k}from"./AgentChatWindowHeader.mjs";import"./ChatComponents/ChatAvatar.mjs";import"../Code.mjs";import"@mui/icons-material/Download";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import y from"./ChatComponents/SuggestedPrompts.mjs";import S from"./ChatComponents/MessageList.mjs";import j from"./WidgetParts/WidgetInput.mjs";function I({open:I,onClose:z,title:D="Ask Nexus",subtitle:T="Ready to help",avatarIcon:A,placeholder:H,suggestedPrompts:W=[],showAiChip:E=!0,isTyping:O,messages:B,streamingText:F,liveTraceEvents:N,showActivity:L=!1,onSend:P,onAbort:U,background:M,followUpPrompts:X,followUpLabel:$="Suggested follow-ups:",topOffset:G,conversations:R,activeConversationId:V,onSelectConversation:Y,onDeleteConversation:q,onNewConversation:J}){const K=n(),Q=r(K.breakpoints.down("md")),[Z,_]=t(!0),[ee,oe]=t(!1),[ie,te]=t(!1),[ne,re]=t(null),le=B.length>0||O,se=le&&X&&X.length>0,ae=!Q||Z,me=void 0!==R;return e(x,{open:I,fullScreen:!0,onClose:z,sx:G?{top:`${G}px`}:void 0,children:o(f,{sx:{display:"flex",flexDirection:"column",height:G?`calc(100vh - ${G}px)`:"100vh",overflow:"hidden"},children:[o(f,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[me&&e(f,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(d,{conversations:R,activeConversationId:V??null,onSelectConversation:Y??(()=>{}),onDeleteConversation:q,onNewConversation:J,isCollapsed:ie,onToggleCollapse:()=>te(e=>!e)})}),o(f,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(f,{sx:{position:"relative",flexShrink:0},children:[e(k,{title:D,subtitle:T,showAiChip:!1,actions:Q?e(u,{}):o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[E&&e(v,{}),e(g,{title:"Close full view",size:"small",onClick:z,children:e(s,{sx:{fontSize:16}})})]})}),Q&&o(u,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[me&&e(g,{title:"Chat history",size:"small",onClick:()=>oe(e=>!e),children:e(p,{sx:{fontSize:18}})}),e(g,{title:"Close full view",size:"small",onClick:z,children:e(s,{sx:{fontSize:16}})})]})]}),o(f,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[M&&e(f,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:M}),o(f,le?{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e(f,{sx:{flex:1,minHeight:0,overflowY:"auto",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:e(S,{messages:B,isTyping:O,streamingText:F,liveTraceEvents:N,onAbort:U,avatarIcon:A,showActivity:L})}),se&&o(f,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:ae?.5:1,flexShrink:0},children:[o(u,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:ae?.75:0},children:[e(C,{children:$}),Q&&e(g,{size:"small",onClick:()=>_(e=>!e),title:Z?"Collapse suggestions":"Expand suggestions",children:e(Z?m:a,{sx:{fontSize:16}})})]}),ae&&e(y,{prompts:X,onSelect:P})]}),e(j,{placeholder:H,isTyping:O,onSend:P})]}:{sx:{position:"relative",zIndex:1,flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4,background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[o(u,{direction:"column",sx:{gap:2,alignItems:"center",mb:3},children:[e(b,{children:D}),e(w,{sx:{color:"text.secondary"},children:T})]}),e(f,{sx:{width:"100%",maxWidth:700,minWidth:"min(40vw, 100%)"},children:e(h,{onSend:P,disabled:O,placeholder:H,actions:W.length>0?o(i,{children:[e(g,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:e=>re(e.currentTarget),children:e(c,{sx:{fontSize:18}})}),e(l,{open:Boolean(ne),anchorEl:ne,onClose:()=>re(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(f,{sx:{p:2,maxWidth:360},children:e(y,{prompts:W,onSelect:e=>{re(null),P(e)}})})})]}):void 0})})]})]})]})]}),me&&Q&&o(i,{children:[ee&&e(f,{onClick:()=>oe(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(f,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:ee?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(d,{conversations:R,activeConversationId:V??null,onSelectConversation:e=>{Y?.(e),oe(!1)},onDeleteConversation:q,onNewConversation:J?()=>{J(),oe(!1)}:void 0,onClose:()=>oe(!1)})})]})]})})}export{I as NexusChatDialog};
1
+ import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as n}from"react";import{useTheme as t,useMediaQuery as r,Popover as l}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import m from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import c from"@mui/icons-material/GridView";import p from"@mui/icons-material/History";import{ChatHistory as d}from"./ChatHistory.mjs";import{ChatInput as h}from"./ChatInput.mjs";import{Dialog as x}from"../Dialog.mjs";import{Box as f}from"../Box.mjs";import{Stack as u}from"../Stack.mjs";import{Paper as g}from"../Paper.mjs";import{GlassPaper as C}from"../GlassPaper.mjs";import{IconButton as v}from"../IconButton.mjs";import{AiChip as b}from"../AiChip.mjs";import{Caption as w,H1 as y,H2 as S}from"../Typography.mjs";import{AgentChatWindowHeader as j}from"./AgentChatWindowHeader.mjs";import"./ChatComponents/ChatAvatar.mjs";import"../Code.mjs";import"@mui/icons-material/Download";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import k from"./ChatComponents/SuggestedPrompts.mjs";import z from"./ChatComponents/MessageList.mjs";import I from"./WidgetParts/WidgetInput.mjs";function D({open:D,onClose:T,title:A="Ask Nexus",subtitle:H="Ready to help",placeholder:E,suggestedPrompts:O=[],showAiChip:P=!0,isTyping:N,messages:W,streamingText:L,liveTraceEvents:R,showActivity:B=!1,onSend:U,onAbort:G,background:M,followUpPrompts:X,followUpLabel:$="Suggested follow-ups:",topOffset:F,conversations:V,activeConversationId:Y,onSelectConversation:q,onDeleteConversation:J,onNewConversation:K}){const Q=t(),Z=r(Q.breakpoints.down("md")),[_,ee]=n(!0),[oe,ie]=n(!1),[ne,te]=n(!1),[re,le]=n(null),se=W.length>0||N,me=se&&X&&X.length>0,ae=!Z||_,ce=void 0!==V;return e(x,{open:D,fullScreen:!0,onClose:T,sx:F?{top:`${F}px`}:void 0,children:o(f,{sx:{display:"flex",flexDirection:"column",height:F?`calc(100vh - ${F}px)`:"100vh",overflow:"hidden"},children:[o(f,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[ce&&e(f,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(d,{conversations:V,activeConversationId:Y??null,onSelectConversation:q??(()=>{}),onDeleteConversation:J,onNewConversation:K,isCollapsed:ne,onToggleCollapse:()=>te(e=>!e)})}),o(f,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(f,{sx:{position:"relative",flexShrink:0},children:[e(j,{title:A,subtitle:H,showAiChip:!1,actions:Z?e(u,{}):o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[P&&e(b,{}),e(v,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})}),Z&&o(u,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[ce&&e(v,{title:"Chat history",size:"small",onClick:()=>ie(e=>!e),children:e(p,{sx:{fontSize:18}})}),e(v,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})]}),o(f,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[M&&e(f,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:M}),se?o(f,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e(g,{sx:{borderRadius:0,border:"none",flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:e(z,{messages:W,isTyping:N,streamingText:L,liveTraceEvents:R,onAbort:G,showActivity:B})}),me&&o(f,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:ae?.5:1,flexShrink:0},children:[o(u,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:ae?.75:0},children:[e(w,{children:$}),Z&&e(v,{size:"small",onClick:()=>ee(e=>!e),title:_?"Collapse suggestions":"Expand suggestions",children:e(_?a:m,{sx:{fontSize:16}})})]}),ae&&e(k,{prompts:X,onSelect:U})]}),e(g,{sx:{borderRadius:0,border:"none"},children:e(I,{placeholder:E,isTyping:N,onSend:U})})]}):e(g,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:o(C,{sx:{width:"60%",px:4,py:8,textAlign:"center"},children:[o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(y,{children:A}),e(S,{sx:{color:"text.secondary"},children:H})]}),e(f,{sx:{mt:10,width:"100%",minWidth:"min(40vw, 100%)"},children:e(h,{onSend:U,disabled:N,placeholder:E,actions:O.length>0?o(i,{children:[e(v,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:e=>le(e.currentTarget),children:e(c,{sx:{fontSize:18}})}),e(l,{open:Boolean(re),anchorEl:re,onClose:()=>le(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(f,{sx:{p:2,maxWidth:360},children:e(k,{prompts:O,onSelect:e=>{le(null),U(e)}})})})]}):void 0})})]})})]})]})]}),ce&&Z&&o(i,{children:[oe&&e(f,{onClick:()=>ie(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(f,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:oe?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(d,{conversations:V,activeConversationId:Y??null,onSelectConversation:e=>{q?.(e),ie(!1)},onDeleteConversation:J,onNewConversation:K?()=>{K(),ie(!1)}:void 0,onClose:()=>ie(!1)})})]})]})})}export{D as NexusChatDialog};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as o,useMediaQuery as r,Drawer as n,Box as t,IconButton as l}from"@mui/material";import a from"@mui/icons-material/ChevronLeft";import d from"@mui/icons-material/Menu";const s="0.25s",p=({open:t,onToggle:l,children:a,collapsedContent:d,expandedWidth:p=240,collapsedWidth:x=64,sx:b,headerActions:f})=>{const m=o(),v=r(m.breakpoints.down("sm"));return e(n,v?{anchor:"left",variant:"temporary",open:t,onClose:l,keepMounted:!0,slotProps:{paper:{sx:[{width:p,boxSizing:"border-box",backgroundColor:"background.paper",borderRight:`1px solid ${m.palette.divider}`,overflowX:"hidden"},...Array.isArray(b)?b:b?[b]:[]]}},children:[i(h,{open:t,onToggle:l,collapsedWidth:x,headerActions:f}),i(c,{open:t,collapsedContent:d,children:a})]}:{anchor:"left",variant:"permanent",open:t,slotProps:{paper:{sx:[{position:"relative",width:t?p:x,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",overflowX:"hidden",transition:`width ${s} ease`,backgroundColor:"background.paper",borderRadius:0,borderRight:`1px solid ${m.palette.divider}`,display:"flex",flexDirection:"column"},...Array.isArray(b)?b:b?[b]:[]]}},sx:{width:t?p:x,flexShrink:0,transition:`width ${s} ease`,"& .MuiDrawer-paper":{width:t?p:x,transition:`width ${s} ease`}},children:[i(h,{open:t,onToggle:l,collapsedWidth:x,headerActions:f}),i(c,{open:t,collapsedContent:d,children:a})]})},c=({open:o,children:r,collapsedContent:n})=>e(t,{sx:{position:"relative",flex:1,overflow:"hidden"},children:[i(t,{sx:{height:"100%",overflowY:"auto",overflowX:"hidden",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${s} ease, visibility ${s} ease`},children:r}),n&&i(t,{sx:{position:"absolute",inset:0,overflowY:"auto",overflowX:"hidden",opacity:o?0:1,visibility:o?"hidden":"visible",transition:`opacity ${s} ease, visibility ${s} ease`},children:n})]}),h=({open:o,onToggle:r,collapsedWidth:n,headerActions:s})=>{const p=i(o?a:d,{fontSize:"small"});return e(t,{sx:{display:"flex",alignItems:"center",justifyContent:o&&s?"space-between":o?"flex-end":"center",minHeight:48,px:.5,flexShrink:0},children:[o&&s&&i(t,{sx:{display:"flex",alignItems:"center"},children:s}),i(l,{onClick:r,size:"small","aria-label":o?"Collapse side blade":"Expand side blade",sx:{width:n-16,borderRadius:1,color:"text.secondary","&:hover":{color:"text.primary",backgroundColor:"action.hover"}},children:p})]})};export{p as SideBlade};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as o,useMediaQuery as r,Drawer as n,Box as t,IconButton as l}from"@mui/material";import a from"@mui/icons-material/ChevronLeft";import d from"@mui/icons-material/Menu";const s="0.25s",p=({open:t,onToggle:l,children:a,collapsedContent:d,expandedWidth:p=300,collapsedWidth:x=64,sx:b,headerActions:f})=>{const m=o(),v=r(m.breakpoints.down("sm"));return e(n,v?{anchor:"left",variant:"temporary",open:t,onClose:l,keepMounted:!0,slotProps:{paper:{sx:[{width:p,boxSizing:"border-box",backgroundColor:"background.paper",borderRight:`1px solid ${m.palette.divider}`,overflowX:"hidden"},...Array.isArray(b)?b:b?[b]:[]]}},children:[i(h,{open:t,onToggle:l,collapsedWidth:x,headerActions:f}),i(c,{open:t,collapsedContent:d,children:a})]}:{anchor:"left",variant:"permanent",open:t,slotProps:{paper:{sx:[{position:"relative",width:t?p:x,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",overflowX:"hidden",transition:`width ${s} ease`,backgroundColor:"background.paper",borderRadius:0,borderRight:`1px solid ${m.palette.divider}`,display:"flex",flexDirection:"column"},...Array.isArray(b)?b:b?[b]:[]]}},sx:{width:t?p:x,flexShrink:0,transition:`width ${s} ease`,"& .MuiDrawer-paper":{width:t?p:x,transition:`width ${s} ease`}},children:[i(h,{open:t,onToggle:l,collapsedWidth:x,headerActions:f}),i(c,{open:t,collapsedContent:d,children:a})]})},c=({open:o,children:r,collapsedContent:n})=>e(t,{sx:{position:"relative",flex:1,overflow:"hidden"},children:[i(t,{sx:{height:"100%",overflowY:"auto",overflowX:"hidden",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${s} ease, visibility ${s} ease`},children:r}),n&&i(t,{sx:{position:"absolute",inset:0,overflowY:"auto",overflowX:"hidden",opacity:o?0:1,visibility:o?"hidden":"visible",transition:`opacity ${s} ease, visibility ${s} ease`},children:n})]}),h=({open:o,onToggle:r,collapsedWidth:n,headerActions:s})=>{const p=i(o?a:d,{fontSize:"small"});return e(t,{sx:{display:"flex",alignItems:"center",justifyContent:o&&s?"space-between":o?"flex-end":"center",minHeight:48,px:.5,flexShrink:0},children:[o&&s&&i(t,{sx:{display:"flex",alignItems:"center"},children:s}),i(l,{onClick:r,size:"small","aria-label":o?"Collapse side blade":"Expand side blade",sx:{width:n-16,borderRadius:1,color:"text.secondary","&:hover":{color:"text.primary",backgroundColor:"action.hover"}},children:p})]})};export{p as SideBlade};
@@ -1 +1 @@
1
- const o="1.14.7";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.14.9";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -191,7 +191,6 @@ interface NexusChatDialogProps {
191
191
  onClose: () => void;
192
192
  title?: string;
193
193
  subtitle?: string;
194
- avatarIcon?: React.ReactNode;
195
194
  placeholder?: string;
196
195
  suggestedPrompts?: string[];
197
196
  showAiChip?: boolean;
@@ -218,7 +217,7 @@ interface NexusChatDialogProps {
218
217
  onDeleteConversation?: (id: string) => void | Promise<boolean>;
219
218
  onNewConversation?: () => void;
220
219
  }
221
- declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
220
+ declare function NexusChatDialog({ open, onClose, title, subtitle, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
222
221
 
223
222
  interface FABButtonProps {
224
223
  onOpen: () => void;
@@ -321,7 +320,6 @@ declare const MarkdownContent: ({ content, highlightQuery, components: extraComp
321
320
  interface MessageBubbleProps {
322
321
  message: ChatMessage;
323
322
  highlightQuery?: string;
324
- avatarIcon?: React.ReactNode;
325
323
  showActivity?: boolean;
326
324
  /** Called when the user submits thumbs-up/down feedback */
327
325
  onFeedback?: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
@@ -332,7 +330,7 @@ interface MessageBubbleProps {
332
330
  /** Override or extend individual markdown element renderers */
333
331
  markdownComponents?: Partial<Components>;
334
332
  }
335
- declare const MessageBubble: ({ message, highlightQuery, avatarIcon, showActivity, onFeedback, onDownloadFile, contentRenderer, markdownComponents, }: MessageBubbleProps) => react_jsx_runtime.JSX.Element;
333
+ declare const MessageBubble: ({ message, highlightQuery, showActivity, onFeedback, onDownloadFile, contentRenderer, markdownComponents, }: MessageBubbleProps) => react_jsx_runtime.JSX.Element;
336
334
 
337
335
  interface MessageFeedbackBarProps {
338
336
  message: ChatMessage;
@@ -372,7 +370,7 @@ interface MessageListProps {
372
370
  avatarIcon?: React.ReactNode;
373
371
  showActivity?: boolean;
374
372
  }
375
- declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, avatarIcon, showActivity, }: MessageListProps) => react_jsx_runtime.JSX.Element;
373
+ declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, showActivity, }: MessageListProps) => react_jsx_runtime.JSX.Element;
376
374
 
377
375
  interface EmptyStateProps {
378
376
  title: string;
@@ -819,24 +817,13 @@ interface SearchInputProps {
819
817
  declare const SearchInput: react__default.FC<SearchInputProps>;
820
818
 
821
819
  interface SideBladeProps {
822
- /** Whether the blade is currently expanded */
823
820
  open: boolean;
824
- /** Called when the toggle button is clicked, or when the mobile backdrop is clicked */
825
821
  onToggle: () => void;
826
- /** Content shown when the blade is expanded */
827
822
  children?: ReactNode;
828
- /**
829
- * Optional content shown when the blade is collapsed (e.g. icon-only navigation).
830
- * When omitted the blade shows only the toggle button in its collapsed state.
831
- */
832
- collapsedContent?: ReactNode;
833
- /** Width of the blade when expanded (px). Default: 240 */
834
- expandedWidth?: number;
835
- /** Width of the blade when collapsed (px). Default: 64 */
823
+ collapsedContent?: ReactNode; /** Width of the blade when expanded (px). Default: 300 */
824
+ expandedWidth?: number; /** Width of the blade when collapsed (px). Default: 64 */
836
825
  collapsedWidth?: number;
837
- /** Additional sx overrides applied to the Drawer Paper */
838
826
  sx?: SxProps$1<Theme$1>;
839
- /** Extra actions rendered in the header row alongside the collapse/expand toggle (expanded state only) */
840
827
  headerActions?: ReactNode;
841
828
  }
842
829
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.14.7",
3
+ "version": "1.14.9",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",