it-data-nexus-ui-library 2.5.0 → 2.5.2

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 t,jsx as r}from"react/jsx-runtime";import{useRef as e,useEffect as o}from"react";import{Box as n}from"../../_Primitives/Box.mjs";import i from"./MessageBubble.mjs";import c from"./StreamingBubble.mjs";import l from"./TypingIndicator.mjs";import{latestTraceLabel as s}from"./latestTraceLabel.mjs";const m=({messages:m,isTyping:a,streamingText:u,liveTraceEvents:g,highlightQuery:h,onAbort:p,showActivity:f=!1,compact:x=!1,markdownComponents:y})=>{const v=e(null),b=e(null),d=e(!1),T=e(m.length),j=e(!1),w=()=>{const t=b.current;t&&(j.current=!0,t.scrollTop=t.scrollHeight,requestAnimationFrame(()=>{j.current=!1}))};o(()=>{const t=m[m.length-1];m.length>T.current&&"user"===t?.role&&(d.current=!1,w()),T.current=m.length},[m]),o(()=>{d.current||w()},[a,u]);const A=(u||"").trim().length>0,H=a&&(A||f),B=a&&!H;return t(n,{ref:b,onScroll:()=>{j.current||(d.current=!(()=>{const t=b.current;return!t||t.scrollHeight-t.scrollTop-t.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[m.filter(t=>"user"===t.role||t.content).map(t=>r(i,{message:t,highlightQuery:h,showActivity:f,compact:x,markdownComponents:y},t.id)),H&&r(c,{text:u||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f,compact:x}),B&&r(l,{traceLabel:g&&g.length>0?s(g):void 0}),r(n,{ref:v})]})};export{m as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useRef as r,useEffect as o}from"react";import{Box as n}from"../../_Primitives/Box.mjs";import i from"./MessageBubble.mjs";import c from"./StreamingBubble.mjs";import l from"./TypingIndicator.mjs";import{latestTraceLabel as s}from"./latestTraceLabel.mjs";const m=({messages:m,isTyping:a,streamingText:u,liveTraceEvents:g,highlightQuery:h,onAbort:p,showActivity:f=!1,compact:b=!1,markdownComponents:d,onFeedback:x})=>{const y=r(null),v=r(null),T=r(!1),j=r(m.length),w=r(!1),A=()=>{const t=v.current;t&&(w.current=!0,t.scrollTop=t.scrollHeight,requestAnimationFrame(()=>{w.current=!1}))};o(()=>{const t=m[m.length-1];m.length>j.current&&"user"===t?.role&&(T.current=!1,A()),j.current=m.length},[m]),o(()=>{T.current||A()},[a,u]);const k=(u||"").trim().length>0,H=a&&(k||f),B=a&&!H;return t(n,{ref:v,onScroll:()=>{w.current||(T.current=!(()=>{const t=v.current;return!t||t.scrollHeight-t.scrollTop-t.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[m.filter(t=>"user"===t.role||t.content).map(t=>e(i,{message:t,highlightQuery:h,showActivity:f,compact:b,markdownComponents:d,onFeedback:x},t.id)),H&&e(c,{text:u||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f,compact:b}),B&&e(l,{traceLabel:g&&g.length>0?s(g):void 0}),e(n,{ref:y})]})};export{m as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Stack as e}from"../../_Primitives/Stack.mjs";import{Chip as t}from"../../_Primitives/Chip.mjs";const i=({prompts:i,onSelect:o})=>r(e,{direction:"row",spacing:1,sx:{flexWrap:"wrap",gap:1,justifyContent:"center",alignItems:"center"},children:i.map(e=>r(t,{label:e,onClick:()=>o(e),size:"medium",sx:{cursor:"pointer",backgroundColor:"background.greys",color:"text.primary"}},e))});export{i as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{Stack as e}from"../../_Primitives/Stack.mjs";import{Chip as o}from"../../_Primitives/Chip.mjs";const i=({prompts:i,onSelect:t})=>r(e,{direction:"row",spacing:1,sx:{flexWrap:"wrap",gap:1,justifyContent:"center",alignItems:"center"},children:i.map(e=>r(o,{label:e,onClick:()=>t(e),size:"medium",sx:{backgroundColor:"background.default",border:1,borderColor:"divider",cursor:"pointer",color:"text.primary"}},e))});export{i as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as t,useCallback as i}from"react";import r from"@mui/icons-material/ChevronRight";import{Caption as n}from"../Typography.mjs";import{Box as s}from"../_Primitives/Box.mjs";import{Stack as a}from"../_Primitives/Stack.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{ChatHistoryHeader as h}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as c}from"./ChatHistoryButtonBase.mjs";const m=({conversations:m,activeConversationId:d,onSelectConversation:C,onDeleteConversation:p,onNewConversation:v,onClose:f,onSearchChange:x,title:g="Chat history",emptyText:y="No conversations yet",newChatTitle:u="New chat",deleteConversationTitle:w="Delete conversation",searchPlaceholder:b="Search chat histories",searchDebounceMs:S=300,width:j=288,sx:T,formatMessageCount:B=e=>`${e} messages`,isCollapsed:D=!1,onToggleCollapse:k,collapsedWidth:A=40})=>{const[H,M]=t(""),N=i(e=>{M(e),x?.(e)},[x]);return e(s,{sx:{width:D?A:j,minWidth:D?A:0,flexShrink:0,borderRight:1,borderColor:"divider",overflow:"hidden",transition:"width 0.2s ease, min-width 0.2s ease",display:"flex",flexDirection:"column"},children:D?e(a,{sx:{justifyContent:"center",alignItems:"center",py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:e(l,{onClick:k,title:"Expand history",ariaLabel:"expand-history",sx:{width:36,height:36},children:e(r,{sx:{fontSize:18}})})}):o(a,{direction:"column",sx:[{flex:1,minHeight:0},...Array.isArray(T)?T:T?[T]:[]],children:[e(h,{title:g,newChatTitle:u,onNewConversation:v,onClose:f,onToggleCollapse:k,onSearchChange:N,searchPlaceholder:b,searchDebounceMs:S}),e(s,{component:"nav","aria-label":g,sx:{flex:1,overflowY:"auto",p:1},children:0===m.length?e(n,{sx:{display:"block",textAlign:"center",py:4},children:y}):m.map(o=>{const t=o.id===d;return e(c,{conversation:o,isActive:t,highlightQuery:H,onSelectConversation:C,onDeleteConversation:p,deleteConversationTitle:w,formatMessageCount:B},o.id)})})]})})};export{m as ChatHistory};
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useState as i,useCallback as r}from"react";import n from"@mui/icons-material/ChevronRight";import{H4 as s,Caption as l}from"../Typography.mjs";import{Box as a}from"../_Primitives/Box.mjs";import{Stack as c}from"../_Primitives/Stack.mjs";import{Divider as h}from"../_Primitives/Divider.mjs";import{IconButton as d}from"../Buttons/IconButton.mjs";import{ChatHistoryHeader as m}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as x}from"./ChatHistoryButtonBase.mjs";import{ChatHistoryAgentItem as p}from"./ChatHistoryAgentItem.mjs";import{filterChatHistoryConversations as g}from"./ChatHistorySearch.mjs";const f=({conversations:f,activeConversationId:C,onSelectConversation:v,onDeleteConversation:y,onNewConversation:u,onClose:b,onSearchChange:S,agents:w,activeAgentId:j,onSelectAgent:k,title:A="Chat history",agentsLabel:H="Agents",sectionLabel:T="Chats",emptyText:D="No conversations yet",newChatTitle:B="New chat",deleteConversationTitle:I="Delete conversation",searchPlaceholder:N="Search conversations",searchDebounceMs:P=300,width:M=288,sx:L,formatMessageCount:_=e=>`${e} messages`,isCollapsed:R=!1,onToggleCollapse:W,collapsedWidth:$=40})=>{const[z,E]=i(""),Q=r(e=>{E(e),S?.(e)},[S]),Y=g(f,z),q=w&&w.length>0;return e(a,{sx:{width:R?$:M,minWidth:R?$:0,flexShrink:0,borderRight:1,borderColor:"divider",overflow:"hidden",transition:"width 0.2s ease, min-width 0.2s ease",display:"flex",flexDirection:"column"},children:R?e(c,{sx:{justifyContent:"center",alignItems:"center",py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:e(d,{onClick:W,title:"Expand history",ariaLabel:"expand-history",sx:{width:36,height:36},children:e(n,{sx:{fontSize:18}})})}):t(c,{direction:"column",sx:[{flex:1,minHeight:0},...Array.isArray(L)?L:L?[L]:[]],children:[e(m,{newChatTitle:B,onNewConversation:u,onClose:b,onToggleCollapse:W,onSearchChange:Q,searchPlaceholder:N,searchDebounceMs:P}),t(c,{direction:"column",sx:{flex:1,minHeight:0},children:[q&&t(o,{children:[t(c,{sx:{flexShrink:0,px:1.5,pt:1,pb:.5},children:[e(s,{sx:{color:"text.secondary",py:.5},children:H}),w.map(t=>e(p,{agent:t,isActive:t.id===j,onSelect:k??(()=>{})},t.id))]}),e(h,{sx:{flexShrink:0}})]}),t(c,{direction:"column",sx:{flex:1,minHeight:0},children:[q&&t(c,{direction:"row",sx:{alignItems:"center",px:1.5,pt:1,pb:.5,flexShrink:0},children:[e(s,{sx:{flex:1,color:"text.secondary"},children:T}),z&&Y.length>0&&t(l,{sx:{color:"text.disabled"},children:[Y.length," ",1===Y.length?"result":"results"]})]}),e(a,{component:"nav","aria-label":A,sx:{flex:1,overflowY:"auto",px:1,pt:1,pb:1},children:0===Y.length?e(l,{sx:{display:"block",px:.5,py:2,color:"text.disabled"},children:z?`No results for "${z}"`:D}):Y.map(t=>e(x,{conversation:t,isActive:t.id===C,highlightQuery:z,onSelectConversation:v,onDeleteConversation:y,deleteConversationTitle:I,formatMessageCount:_},t.id))})]})]})]})})};export{f as ChatHistory};
@@ -0,0 +1 @@
1
+ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{ButtonBase as e}from"../Buttons/ButtonBase.mjs";import{Avatar as t}from"../Avatar.mjs";import{Body1 as s}from"../Typography.mjs";import i from"../../assets/images/nexus-logo-node.svg.mjs";const n=({agent:n,isActive:a,onSelect:l})=>r(e,{onClick:()=>l(n.id),sx:{display:"flex",alignItems:"center",width:"100%",borderRadius:1,border:"1px solid",borderColor:a?"primary.main":"transparent",backgroundColor:a?"action.selected":"transparent",textAlign:"left",transition:"background-color 0.15s ease, border-color 0.15s ease","&:hover":{backgroundColor:"action.hover"}},children:[o(t,{size:"sm",sx:{backgroundColor:"transparent"},children:o("img",{src:i,alt:"",style:{width:"50%",height:"50%"}})}),o(s,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",mb:0},children:n.name})]});export{n as ChatHistoryAgentItem};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as i,Caption as n}from"../Typography.mjs";import{GhostButton as s}from"../Buttons/GhostButton.mjs";import{Box as a}from"../_Primitives/Box.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{colours as m}from"../../theme/tokens.mjs";const p=(e,o)=>{const t=o?.trim();if(!t)return e;const i=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(i).map((e,o)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?r(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}-${o}`):e})},d=({conversation:d,isActive:c,highlightQuery:u,onSelectConversation:b,onDeleteConversation:g,deleteConversationTitle:h,formatMessageCount:x,showMessageCount:f=!1,sx:y})=>{const v=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(d);return e(a,{sx:[{position:"relative",mb:.25,"&:hover .delete-button":{visibility:"visible"}},...Array.isArray(y)?y:y?[y]:[]],children:[e(s,{onClick:()=>b(d.id),sx:{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,pr:4.5,backgroundColor:e=>e.palette.background.paper,backgroundImage:"none",opacity:1,border:"1px solid",borderColor:c?m.primaryGreenActive:"transparent","&:hover":{backgroundColor:e=>e.palette.background.paper,backgroundImage:"none"},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`}},children:[r(o,{sx:{fontSize:14,color:c?m.primaryGreenActive:"text.disabled"}}),e(a,{sx:{flex:1,minWidth:0},children:[r(i,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:c?"text.primary":"text.secondary"},children:p(d.title,u)}),f&&r(n,{noWrap:!0,sx:{display:"block"},children:x(v)})]})]}),r(a,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)"},children:r(l,{className:"delete-button",title:h,ariaLabel:h,onClick:e=>{e.stopPropagation(),g&&Promise.resolve(g(d.id))},disabled:!g,sx:{visibility:"hidden"},children:r(t,{sx:{fontSize:14,color:c?"error.main":"text.disabled"}})})})]})};export{d as ChatHistoryButtonBase};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@mui/icons-material/ChatBubbleOutlined";import o from"@mui/icons-material/DeleteForeverOutlined";import{Tooltip as i}from"@mui/material";import{Body1 as n,Caption as a}from"../Typography.mjs";import{GhostButton as s}from"../Buttons/GhostButton.mjs";import{Box as l}from"../_Primitives/Box.mjs";import{IconButton as m}from"../Buttons/IconButton.mjs";import{colours as p}from"../../theme/tokens.mjs";const d=(e,t)=>{const o=t?.trim();if(!o)return e;const i=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(o)})`,"ig");return e.split(i).map((e,t)=>{if(!e)return null;return e.toLowerCase()===o.toLowerCase()?r(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}-${t}`):e})},c=({conversation:c,isActive:u,highlightQuery:b,onSelectConversation:h,onDeleteConversation:g,deleteConversationTitle:x,formatMessageCount:f,showMessageCount:v=!1,sx:y})=>{const C=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(c);return e(l,{sx:[{position:"relative",mb:.5,"&:hover .delete-button":{visibility:"visible"}},...Array.isArray(y)?y:y?[y]:[]],children:[r(i,{title:c.agentName??"",placement:"right",disableInteractive:!0,children:r("span",{children:e(s,{onClick:()=>h(c.id),sx:{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:.75,pr:4.5,backgroundColor:u?e=>e.palette.background.paper:"transparent",backgroundImage:"none",opacity:1,border:"1px solid",borderColor:u?p.primaryGreenActive:"transparent","&:hover":{backgroundColor:u?e=>e.palette.background.paper:"action.hover",backgroundImage:"none"},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`}},children:[r(t,{sx:{fontSize:14,color:u?p.primaryGreenActive:"text.disabled"}}),e(l,{sx:{flex:1,minWidth:0},children:[r(n,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:u?"text.primary":"text.secondary"},children:d(c.title,b)}),v&&r(a,{noWrap:!0,sx:{display:"block"},children:f(C)})]})]})})}),r(l,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)"},children:r(m,{className:"delete-button",title:x,ariaLabel:x,onClick:e=>{e.stopPropagation(),g&&Promise.resolve(g(c.id))},disabled:!g,sx:{visibility:"hidden"},children:r(o,{sx:{fontSize:14,color:u?"error.main":"text.disabled"}})})})]})};export{c as ChatHistoryButtonBase};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import r from"@mui/icons-material/Add";import t from"@mui/icons-material/ChevronLeft";import o from"@mui/icons-material/Clear";import a from"@mui/icons-material/Search";import{InputAdornment as l}from"@mui/material";import{useState as n,useEffect as s}from"react";import{Box as c}from"../_Primitives/Box.mjs";import{H3 as m}from"../Typography.mjs";import{IconButton as h}from"../Buttons/IconButton.mjs";import{Stack as d}from"../_Primitives/Stack.mjs";import{TextField as p}from"../_Primitives/TextField.mjs";const f=({title:f,newChatTitle:u,onNewConversation:x,onClose:C,onToggleCollapse:b,onSearchChange:g,searchPlaceholder:w="Search chat histories",searchDebounceMs:S=300})=>{const[y,v]=n("");return s(()=>{if(!g)return;const e=window.setTimeout(()=>{g(y)},S);return()=>window.clearTimeout(e)},[g,S,y]),e(d,{direction:"column",spacing:1,sx:{px:2,py:2,borderBottom:1,borderColor:"divider"},children:[e(d,{direction:"row",spacing:2,sx:{alignItems:"center",justifyContent:"space-between"},children:[i(m,{noWrap:!0,children:f}),e(d,{direction:"row",sx:{alignItems:"center"},children:[i(h,{onClick:x,title:u,ariaLabel:u,disabled:!x,children:i(r,{sx:{fontSize:16}})}),i(h,{onClick:b,title:"Collapse history",ariaLabel:"collapse-history",disabled:!b,sx:{width:36,height:36},children:i(t,{sx:{fontSize:18}})}),C&&i(h,{onClick:C,title:"Close history",ariaLabel:"close-history",children:i(t,{sx:{fontSize:16}})})]})]}),e(c,{sx:{display:"flex",alignItems:"center",gap:.75},children:[i(p,{fullWidth:!0,size:"small",value:y,onChange:e=>v(e.target.value),placeholder:w,slotProps:{htmlInput:{"aria-label":"Search chat histories"},input:{startAdornment:i(l,{position:"start",children:i(a,{sx:{fontSize:16,color:"text.disabled"}})})}}}),i(h,{title:"Clear search",ariaLabel:"clear-search",onClick:()=>v(""),disabled:!y,children:i(o,{sx:{fontSize:14}})})]})]})};export{f as ChatHistoryHeader};
1
+ import{jsxs as o,jsx as t}from"react/jsx-runtime";import e from"@mui/icons-material/Add";import r from"@mui/icons-material/ChevronLeft";import i from"@mui/icons-material/Search";import{InputAdornment as n}from"@mui/material";import{useState as l,useEffect as s}from"react";import{Stack as a}from"../_Primitives/Stack.mjs";import{TextField as m}from"../_Primitives/TextField.mjs";import{IconButton as c}from"../Buttons/IconButton.mjs";import{PrimaryButton as d}from"../Buttons/PrimaryButton.mjs";const h=({newChatTitle:h,onNewConversation:p,onClose:u,onToggleCollapse:f,onSearchChange:C,searchPlaceholder:x="Search conversations",searchDebounceMs:v=300})=>{const[S,b]=l("");s(()=>{if(!C)return;const o=window.setTimeout(()=>{C(S)},v);return()=>window.clearTimeout(o)},[C,v,S]);return o(a,{direction:"column",spacing:1.5,sx:{px:1.5,py:1.5,borderBottom:1,borderColor:"divider",flexShrink:0},children:[(f||u)&&o(a,{direction:"row",sx:{justifyContent:"flex-end",alignItems:"center",gap:.5},children:[f&&t(c,{onClick:f,title:"Collapse history",ariaLabel:"collapse-history",children:t(r,{sx:{fontSize:18}})}),u&&t(c,{onClick:u,title:"Close history",ariaLabel:"close-history",children:t(r,{sx:{fontSize:16}})})]}),t(d,{fullWidth:!0,startIcon:t(e,{}),onClick:p,disabled:!p,children:h}),t(m,{fullWidth:!0,size:"small",value:S,onChange:o=>b(o.target.value),placeholder:x,slotProps:{htmlInput:{"aria-label":"Search conversations"},input:{startAdornment:t(n,{position:"start",children:t(i,{sx:{fontSize:16,color:"text.disabled"}})})}}})]})};export{h as ChatHistoryHeader};
@@ -1 +1 @@
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 p from"@mui/icons-material/GridView";import c from"@mui/icons-material/History";import{ChatHistory as d}from"./ChatHistory.mjs";import{ChatInput as h}from"./ChatInput.mjs";import{Dialog as f}from"../_Primitives/Dialog.mjs";import{Box as x}from"../_Primitives/Box.mjs";import{Stack as u}from"../_Primitives/Stack.mjs";import{Paper as g}from"../_Primitives/Paper.mjs";import{IconButton as C}from"../Buttons/IconButton.mjs";import{AiChip as v}from"../AiChip.mjs";import{Caption as w,H1 as b,H2 as y}from"../Typography.mjs";import{AgentChatWindowHeader as S}from"./AgentChatWindowHeader.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import{chatWindowMarkdownComponents as j}from"./ChatComponents/MarkdownContent.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";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:H="Ask Nexus",subtitle:P="Ready to help",placeholder:A,suggestedPrompts:E=[],showAiChip:O=!0,isTyping:N,messages:W,streamingText:B,liveTraceEvents:L,showActivity:R=!1,onSend:_,onStop:M,background:U,followUpPrompts:X,followUpLabel:$="Suggested follow-ups:",topOffset:F,conversations:G,activeConversationId:V,onSelectConversation:Y,onDeleteConversation:q,onNewConversation:J}){const K=t(),Q=r(K.breakpoints.down("md")),[Z,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=!Q||Z,pe=void 0!==G;return e(f,{open:D,fullScreen:!0,onClose:T,sx:F?{top:`${F}px`}:void 0,children:o(x,{sx:{display:"flex",flexDirection:"column",height:F?`calc(100vh - ${F}px)`:"100vh",overflow:"hidden"},children:[o(x,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[pe&&e(x,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(d,{conversations:G,activeConversationId:V??null,onSelectConversation:Y??(()=>{}),onDeleteConversation:q,onNewConversation:J,isCollapsed:ne,onToggleCollapse:()=>te(e=>!e)})}),o(x,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(x,{sx:{position:"relative",flexShrink:0},children:[e(S,{title:H,subtitle:P,showAiChip:!1,actions:Q?e(u,{}):o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[O&&e(v,{}),e(C,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})}),Q&&o(u,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[pe&&e(C,{title:"Chat history",size:"small",onClick:()=>ie(e=>!e),children:e(c,{sx:{fontSize:18}})}),e(C,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})]}),o(x,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[U&&e(x,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:U}),se?o(x,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e(g,{elevation:0,sx:{borderRadius:0,border:"none",p:0,backgroundColor:"transparent",flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:e(z,{messages:W,isTyping:N,streamingText:B,liveTraceEvents:L,showActivity:R,markdownComponents:j})}),me&&o(x,{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:$}),Q&&e(C,{size:"small",onClick:()=>ee(e=>!e),title:Z?"Collapse suggestions":"Expand suggestions",children:e(Z?a:m,{sx:{fontSize:16}})})]}),ae&&e(k,{prompts:X,onSelect:_})]}),e(g,{elevation:0,sx:{borderRadius:0,border:"none",p:0},children:e(I,{placeholder:A,isStreaming:N,onStop:M,onSend:_})})]}):o(g,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(b,{children:H}),e(y,{sx:{color:"text.secondary"},children:P})]}),e(x,{sx:{mt:10,width:"70%",minWidth:"min(40vw, 100%)"},children:e(h,{onSend:_,isStreaming:N,onStop:M,placeholder:A,actions:E.length>0?o(i,{children:[e(C,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:e=>le(e.currentTarget),children:e(p,{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(x,{sx:{p:2,maxWidth:360},children:e(k,{prompts:E,onSelect:e=>{le(null),_(e)}})})})]}):void 0})})]})]})]})]}),pe&&Q&&o(i,{children:[oe&&e(x,{onClick:()=>ie(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(x,{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:G,activeConversationId:V??null,onSelectConversation:e=>{Y?.(e),ie(!1)},onDeleteConversation:q,onNewConversation:J?()=>{J(),ie(!1)}:void 0,onClose:()=>ie(!1)})})]})]})})}export{D as NexusChatDialog};
1
+ import{jsxs as o,jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as i}from"react";import{useTheme as n,useMediaQuery as r,Popover as s}from"@mui/material";import l from"@mui/icons-material/CloseFullscreen";import a from"@mui/icons-material/GridView";import m from"@mui/icons-material/History";import{AgentChatWindow as p}from"./AgentChatWindow.mjs";import{ChatHistory as c}from"./ChatHistory.mjs";import{Dialog as d}from"../_Primitives/Dialog.mjs";import{Box as h}from"../_Primitives/Box.mjs";import{Stack as C}from"../_Primitives/Stack.mjs";import{IconButton as g}from"../Buttons/IconButton.mjs";import{AiChip as u}from"../AiChip.mjs";import{H1 as f,H2 as v}from"../Typography.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import{chatWindowMarkdownComponents as x}from"./ChatComponents/MarkdownContent.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import w from"./ChatComponents/SuggestedPrompts.mjs";import S from"./ChatComponents/MessageList.mjs";function b({open:b,onClose:y,title:j="Ask Nexus",subtitle:k="Ready to help",placeholder:A,suggestedPrompts:I=[],showAiChip:T=!0,isTyping:z,messages:P,streamingText:D,liveTraceEvents:E,showActivity:O=!1,onSend:U,onStop:L,onFeedback:N,followUpPrompts:B,followUpLabel:F="Suggested follow-ups:",topOffset:M,conversations:_,activeConversationId:H,onSelectConversation:W,onDeleteConversation:X,onNewConversation:$,agents:G,activeAgentId:R,onSelectAgent:V}){const q=n(),J=r(q.breakpoints.down("md")),[K,Q]=i(!1),[Y,Z]=i(!1),[oo,eo]=i(null),to=P.length>0||z,io=void 0!==_,no=M?`calc(100vh - ${M}px)`:"100vh",ro=o(C,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[T&&e(u,{}),io&&J&&e(g,{title:"Chat history",size:"small",onClick:()=>Q(o=>!o),children:e(m,{sx:{fontSize:18}})}),e(g,{title:"Close full view",size:"small",onClick:y,children:e(l,{sx:{fontSize:16}})})]}),so=to?e(S,{messages:P,isTyping:z,streamingText:D,liveTraceEvents:E,showActivity:O,markdownComponents:x,onFeedback:N}):o(C,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(f,{children:j}),e(v,{sx:{color:"text.secondary"},children:k})]}),lo=!to&&I.length>0?o(t,{children:[e(g,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:o=>eo(o.currentTarget),children:e(a,{sx:{fontSize:18}})}),e(s,{open:Boolean(oo),anchorEl:oo,onClose:()=>eo(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(h,{sx:{p:2,maxWidth:360},children:e(w,{prompts:I,onSelect:o=>{eo(null),U(o)}})})})]}):void 0;return o(d,{open:b,fullScreen:!0,onClose:y,sx:M?{top:`${M}px`}:void 0,children:[o(h,{sx:{display:"flex",height:no,overflow:"hidden"},children:[io&&e(h,{sx:{display:{xs:"none",md:"flex"},flexShrink:0},children:e(c,{conversations:_,activeConversationId:H??null,onSelectConversation:W??(()=>{}),onDeleteConversation:X,onNewConversation:$,agents:G,activeAgentId:R,onSelectAgent:V,isCollapsed:Y,onToggleCollapse:()=>Z(o=>!o)})}),e(p,{title:j,subtitle:k,showAiChip:!1,headerActions:ro,isEmpty:!to,body:so,followUpPrompts:B,onSelectFollowUp:U,followUpLabel:F,onSend:U,isStreaming:z,onStop:L,inputPlaceholder:A,inputActions:lo})]}),io&&J&&o(t,{children:[K&&e(h,{onClick:()=>Q(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(h,{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:K?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(c,{conversations:_,activeConversationId:H??null,onSelectConversation:o=>{W?.(o),Q(!1)},onDeleteConversation:X,onNewConversation:$?()=>{$(),Q(!1)}:void 0,agents:G,activeAgentId:R,onSelectAgent:V,onClose:()=>Q(!1)})})]})]})}export{b as NexusChatDialog};
@@ -1 +1 @@
1
- const o="2.5.0";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.5.2";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -165,6 +165,12 @@ interface ChatHistoryConversation {
165
165
  title: string;
166
166
  messages?: unknown[];
167
167
  messageCount?: number;
168
+ /** When provided, shown as a tooltip on hover — useful for identifying the agent that ran the conversation. */
169
+ agentName?: string;
170
+ }
171
+ interface ChatHistoryAgent {
172
+ id: string;
173
+ name: string;
168
174
  }
169
175
  interface ChatHistoryProps {
170
176
  conversations: ChatHistoryConversation[];
@@ -174,7 +180,14 @@ interface ChatHistoryProps {
174
180
  onNewConversation?: () => void;
175
181
  onClose?: () => void;
176
182
  onSearchChange?: (query: string) => void;
183
+ agents?: ChatHistoryAgent[];
184
+ activeAgentId?: string | null;
185
+ onSelectAgent?: (id: string) => void;
186
+ /** aria-label for the nav element. Defaults to "Chat history". */
177
187
  title?: string;
188
+ agentsLabel?: string;
189
+ /** Label shown above conversations. Only rendered when agents are also present. */
190
+ sectionLabel?: string;
178
191
  emptyText?: string;
179
192
  newChatTitle?: string;
180
193
  deleteConversationTitle?: string;
@@ -203,9 +216,8 @@ interface NexusChatDialogProps {
203
216
  showActivity?: boolean;
204
217
  onSend: (message: string) => void;
205
218
  onStop?: () => void;
206
- /** Rendered as an absolute-fill layer behind the glass body, e.g. <GreenWaveBackground /> */
207
- background?: React.ReactNode;
208
- /** Prompt chips shown in a paper strip directly above the input during an active conversation */
219
+ onFeedback?: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
220
+ /** Prompt chips shown directly above the input during an active conversation */
209
221
  followUpPrompts?: string[];
210
222
  /** Label shown above the follow-up chips. Defaults to "Suggested follow-ups:" */
211
223
  followUpLabel?: string;
@@ -218,8 +230,11 @@ interface NexusChatDialogProps {
218
230
  onSelectConversation?: (id: string) => void;
219
231
  onDeleteConversation?: (id: string) => void | Promise<boolean>;
220
232
  onNewConversation?: () => void;
233
+ agents?: ChatHistoryAgent[];
234
+ activeAgentId?: string | null;
235
+ onSelectAgent?: (id: string) => void;
221
236
  }
222
- declare function NexusChatDialog({ open, onClose, title, subtitle, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onStop, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react.JSX.Element;
237
+ declare function NexusChatDialog({ open, onClose, title, subtitle, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onStop, onFeedback, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, agents, activeAgentId, onSelectAgent, }: NexusChatDialogProps): react.JSX.Element;
223
238
 
224
239
  interface FABButtonProps {
225
240
  onOpen: () => void;
@@ -277,10 +292,9 @@ interface ChatInputProps {
277
292
  }
278
293
  declare const ChatInput: ({ onSend, disabled, placeholder, maxRows, sendButtonTitle, isStreaming, onStop, stopButtonTitle, actions, value: controlledValue, onChange, inputRef, label, }: ChatInputProps) => react.JSX.Element;
279
294
 
280
- declare const ChatHistory: ({ conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, onClose, onSearchChange, title, emptyText, newChatTitle, deleteConversationTitle, searchPlaceholder, searchDebounceMs, width, sx, formatMessageCount, isCollapsed, onToggleCollapse, collapsedWidth, }: ChatHistoryProps) => react.JSX.Element;
295
+ declare const ChatHistory: ({ conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, onClose, onSearchChange, agents, activeAgentId, onSelectAgent, title, agentsLabel, sectionLabel, emptyText, newChatTitle, deleteConversationTitle, searchPlaceholder, searchDebounceMs, width, sx, formatMessageCount, isCollapsed, onToggleCollapse, collapsedWidth, }: ChatHistoryProps) => react.JSX.Element;
281
296
 
282
297
  interface ChatHistoryHeaderProps {
283
- title: string;
284
298
  newChatTitle: string;
285
299
  onNewConversation?: () => void;
286
300
  onClose?: () => void;
@@ -289,7 +303,7 @@ interface ChatHistoryHeaderProps {
289
303
  searchPlaceholder?: string;
290
304
  searchDebounceMs?: number;
291
305
  }
292
- declare const ChatHistoryHeader: ({ title, newChatTitle, onNewConversation, onClose, onToggleCollapse, onSearchChange, searchPlaceholder, searchDebounceMs, }: ChatHistoryHeaderProps) => react.JSX.Element;
306
+ declare const ChatHistoryHeader: ({ newChatTitle, onNewConversation, onClose, onToggleCollapse, onSearchChange, searchPlaceholder, searchDebounceMs, }: ChatHistoryHeaderProps) => react.JSX.Element;
293
307
 
294
308
  interface ChatHistoryButtonBaseProps {
295
309
  conversation: ChatHistoryConversation;
@@ -304,6 +318,13 @@ interface ChatHistoryButtonBaseProps {
304
318
  }
305
319
  declare const ChatHistoryButtonBase: ({ conversation, isActive, highlightQuery, onSelectConversation, onDeleteConversation, deleteConversationTitle, formatMessageCount, showMessageCount, sx, }: ChatHistoryButtonBaseProps) => react.JSX.Element;
306
320
 
321
+ interface ChatHistoryAgentItemProps {
322
+ agent: ChatHistoryAgent;
323
+ isActive: boolean;
324
+ onSelect: (id: string) => void;
325
+ }
326
+ declare const ChatHistoryAgentItem: ({ agent, isActive, onSelect, }: ChatHistoryAgentItemProps) => react.JSX.Element;
327
+
307
328
  declare const chatHistoryMatchesQuery: (conversation: ChatHistoryConversation, query: string) => boolean;
308
329
  declare const filterChatHistoryConversations: <TConversation extends ChatHistoryConversation>(conversations: TConversation[], query: string) => TConversation[];
309
330
 
@@ -386,8 +407,9 @@ interface MessageListProps {
386
407
  showActivity?: boolean;
387
408
  compact?: boolean;
388
409
  markdownComponents?: Partial<Components>;
410
+ onFeedback?: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
389
411
  }
390
- declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, showActivity, compact, markdownComponents, }: MessageListProps) => react.JSX.Element;
412
+ declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, showActivity, compact, markdownComponents, onFeedback, }: MessageListProps) => react.JSX.Element;
391
413
 
392
414
  interface EmptyStateProps {
393
415
  title: string;
@@ -1353,5 +1375,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
1353
1375
  declare const leftPipe: SxProps<Theme>;
1354
1376
  declare const expandableText: (isExpanded: boolean) => SxProps<Theme>;
1355
1377
 
1356
- export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatWindow, AgentChatWindowHeader, AiButton, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, Breadcrumbs, ButtonBase, Caption, Card, ChatAvatar, ChatHistory, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NexusBarChart, NexusChatDialog, NexusChatWidget, NexusDataGrid, NexusHome, NexusLineChart, NexusLogo, NexusPieChart, NexusScatterChart, NexusiFrame, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, useThemeMode, useTokens };
1357
- export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, BreadcrumbItem, BreadcrumbsProps, CardProps, CardTrend, ChartAsyncProps, ChatAvatarProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, EmptyStateProps, FABButtonProps, FileArtifact, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, MetricCardProps, MetricStatProps, MetricValueSize, ModeTokens, NexusBarChartProps, NexusChatDialogProps, NexusChatWidgetProps, NexusLineChartProps, NexusPieChartProps, NexusScatterChartProps, NexusiFrameProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SelectableListItem, SelectableListProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, TooltipProps, TraceEvent, TypingIndicatorProps };
1378
+ export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatWindow, AgentChatWindowHeader, AiButton, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, Breadcrumbs, ButtonBase, Caption, Card, ChatAvatar, ChatHistory, ChatHistoryAgentItem, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NexusBarChart, NexusChatDialog, NexusChatWidget, NexusDataGrid, NexusHome, NexusLineChart, NexusLogo, NexusPieChart, NexusScatterChart, NexusiFrame, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, useThemeMode, useTokens };
1379
+ export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, BreadcrumbItem, BreadcrumbsProps, CardProps, CardTrend, ChartAsyncProps, ChatAvatarProps, ChatHistoryAgent, ChatHistoryAgentItemProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, EmptyStateProps, FABButtonProps, FileArtifact, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, MetricCardProps, MetricStatProps, MetricValueSize, ModeTokens, NexusBarChartProps, NexusChatDialogProps, NexusChatWidgetProps, NexusLineChartProps, NexusPieChartProps, NexusScatterChartProps, NexusiFrameProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SelectableListItem, SelectableListProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, TooltipProps, TraceEvent, TypingIndicatorProps };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/_Primitives/Alert.mjs";export{NexusChatWidget}from"./components/NexusChat/NexusChatWidget.mjs";export{NexusChatDialog}from"./components/NexusChat/NexusChatDialog.mjs";export{FABButton}from"./components/NexusChat/FABButton.mjs";export{AgentChatWindow}from"./components/NexusChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/NexusChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/NexusChat/ChatInput.mjs";export{ChatHistory}from"./components/NexusChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/NexusChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/NexusChat/ChatHistoryButtonBase.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/NexusChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/NexusChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/NexusChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/NexusChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/NexusChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/NexusChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/NexusChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/NexusChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/NexusChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/NexusChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/NexusChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/NexusChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/_Primitives/Container.mjs";export{Grid}from"./components/_Primitives/Grid.mjs";export{Link}from"./components/_Primitives/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{SegmentedControl}from"./components/SegmentedControl.mjs";export{Breadcrumbs}from"./components/Breadcrumbs.mjs";export{Switch}from"./components/_Primitives/Switch.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,MetricValue,Span}from"./components/Typography.mjs";export{MetricStat}from"./components/MetricStat.mjs";export{MetricCard}from"./components/MetricCard.mjs";export{ActionBar}from"./components/ActionBar.mjs";export{AccordionGroup,AccordionGroupItem}from"./components/AccordionGroup.mjs";export{AccordionSingle}from"./components/AccordionSingle.mjs";export{AiButton}from"./components/Buttons/AiButton.mjs";export{AiChip}from"./components/AiChip.mjs";export{AiCard}from"./components/AiCard.mjs";export{AiGlassCard}from"./components/AiGlassCard.mjs";export{AiPaper}from"./components/AiPaper.mjs";export{AiGlassPaper}from"./components/AiGlassPaper.mjs";export{Box}from"./components/_Primitives/Box.mjs";export{CircularProgress}from"./components/_Primitives/CircularProgress.mjs";export{Collapse}from"./components/_Primitives/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{GhostButton}from"./components/Buttons/GhostButton.mjs";export{SelectableList}from"./components/Buttons/SelectableList.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/FormControls/Checkbox.mjs";export{FormControlLabel}from"./components/FormControls/FormControlLabel.mjs";export{FormGroup}from"./components/FormControls/FormGroup.mjs";export{CheckboxGroup}from"./components/FormControls/CheckboxGroup.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/_Primitives/Dialog.mjs";export{Divider}from"./components/_Primitives/Divider.mjs";export{Table,TableBody,TableCell,TableHead,TableRow}from"./components/_Primitives/Table.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/LogoOptions/index.mjs";export{NexusHome}from"./components/NexusHome.mjs";export{default as NexusLogo}from"./components/NexusLogo.mjs";export{SageLogoSvg}from"./components/LogoOptions/SageLogo.mjs";export{Paper}from"./components/_Primitives/Paper.mjs";export{PrimaryButton}from"./components/Buttons/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/Buttons/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/Buttons/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{ragColorForDelta}from"./components/ragColorForDelta.mjs";export{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBlade/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBlade/SideBladeNavListItem.mjs";export{Skeleton}from"./components/_Primitives/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/_Primitives/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/_Primitives/Tab.mjs";export{Tabs}from"./components/_Primitives/Tabs.mjs";export{TextField}from"./components/_Primitives/TextField.mjs";export{ThemeToggle}from"./components/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusiFrame}from"./components/NexusiFrame.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{NexusScatterChart}from"./components/Charts/NexusScatterChart.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./theme/tokens.mjs";export{useTokens}from"./theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./theme/MuiAppThemeProvider.mjs";export{ThemeModeContext,ThemeModeProvider,useThemeMode}from"./theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./theme/sxHelpers.mjs";export{ChartsReferenceLine}from"./node_modules/@mui/x-charts/ChartsReferenceLine/ChartsReferenceLine.mjs";
1
+ export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/_Primitives/Alert.mjs";export{NexusChatWidget}from"./components/NexusChat/NexusChatWidget.mjs";export{NexusChatDialog}from"./components/NexusChat/NexusChatDialog.mjs";export{FABButton}from"./components/NexusChat/FABButton.mjs";export{AgentChatWindow}from"./components/NexusChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/NexusChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/NexusChat/ChatInput.mjs";export{ChatHistory}from"./components/NexusChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/NexusChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/NexusChat/ChatHistoryButtonBase.mjs";export{ChatHistoryAgentItem}from"./components/NexusChat/ChatHistoryAgentItem.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/NexusChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/NexusChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/NexusChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/NexusChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/NexusChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/NexusChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/NexusChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/NexusChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/NexusChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/NexusChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/NexusChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/NexusChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/_Primitives/Container.mjs";export{Grid}from"./components/_Primitives/Grid.mjs";export{Link}from"./components/_Primitives/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{SegmentedControl}from"./components/SegmentedControl.mjs";export{Breadcrumbs}from"./components/Breadcrumbs.mjs";export{Switch}from"./components/_Primitives/Switch.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,MetricValue,Span}from"./components/Typography.mjs";export{MetricStat}from"./components/MetricStat.mjs";export{MetricCard}from"./components/MetricCard.mjs";export{ActionBar}from"./components/ActionBar.mjs";export{AccordionGroup,AccordionGroupItem}from"./components/AccordionGroup.mjs";export{AccordionSingle}from"./components/AccordionSingle.mjs";export{AiButton}from"./components/Buttons/AiButton.mjs";export{AiChip}from"./components/AiChip.mjs";export{AiCard}from"./components/AiCard.mjs";export{AiGlassCard}from"./components/AiGlassCard.mjs";export{AiPaper}from"./components/AiPaper.mjs";export{AiGlassPaper}from"./components/AiGlassPaper.mjs";export{Box}from"./components/_Primitives/Box.mjs";export{CircularProgress}from"./components/_Primitives/CircularProgress.mjs";export{Collapse}from"./components/_Primitives/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{GhostButton}from"./components/Buttons/GhostButton.mjs";export{SelectableList}from"./components/Buttons/SelectableList.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/FormControls/Checkbox.mjs";export{FormControlLabel}from"./components/FormControls/FormControlLabel.mjs";export{FormGroup}from"./components/FormControls/FormGroup.mjs";export{CheckboxGroup}from"./components/FormControls/CheckboxGroup.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/_Primitives/Dialog.mjs";export{Divider}from"./components/_Primitives/Divider.mjs";export{Table,TableBody,TableCell,TableHead,TableRow}from"./components/_Primitives/Table.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/LogoOptions/index.mjs";export{NexusHome}from"./components/NexusHome.mjs";export{default as NexusLogo}from"./components/NexusLogo.mjs";export{SageLogoSvg}from"./components/LogoOptions/SageLogo.mjs";export{Paper}from"./components/_Primitives/Paper.mjs";export{PrimaryButton}from"./components/Buttons/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/Buttons/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/Buttons/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{ragColorForDelta}from"./components/ragColorForDelta.mjs";export{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBlade/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBlade/SideBladeNavListItem.mjs";export{Skeleton}from"./components/_Primitives/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/_Primitives/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/_Primitives/Tab.mjs";export{Tabs}from"./components/_Primitives/Tabs.mjs";export{TextField}from"./components/_Primitives/TextField.mjs";export{ThemeToggle}from"./components/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusiFrame}from"./components/NexusiFrame.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{NexusScatterChart}from"./components/Charts/NexusScatterChart.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./theme/tokens.mjs";export{useTokens}from"./theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./theme/MuiAppThemeProvider.mjs";export{ThemeModeContext,ThemeModeProvider,useThemeMode}from"./theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./theme/sxHelpers.mjs";export{ChartsReferenceLine}from"./node_modules/@mui/x-charts/ChartsReferenceLine/ChartsReferenceLine.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",
@@ -71,7 +71,7 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
- "@chromatic-com/storybook": "^5.1.1",
74
+ "@chromatic-com/storybook": "^5.3.0",
75
75
  "@emotion/react": "^11.14.0",
76
76
  "@emotion/styled": "^11.14.1",
77
77
  "@eslint/js": "9.39.4",
@@ -87,10 +87,10 @@
87
87
  "@rollup/plugin-terser": "^1.0.0",
88
88
  "@rollup/plugin-typescript": "^12.3.0",
89
89
  "@rollup/plugin-url": "^8.0.2",
90
- "@storybook/addon-a11y": "^10.3.5",
91
- "@storybook/addon-docs": "^10.3.5",
92
- "@storybook/addon-vitest": "^10.3.5",
93
- "@storybook/react-vite": "^10.3.5",
90
+ "@storybook/addon-a11y": "^10.5.10",
91
+ "@storybook/addon-docs": "^10.5.10",
92
+ "@storybook/addon-vitest": "^10.5.10",
93
+ "@storybook/react-vite": "^10.5.10",
94
94
  "@types/node": "^25.6.0",
95
95
  "@types/react": "^19.2.14",
96
96
  "@types/rollup-plugin-peer-deps-external": "^2.2.6",
@@ -112,7 +112,7 @@
112
112
  "rollup-plugin-peer-deps-external": "^2.2.4",
113
113
  "rollup-plugin-postcss": "^4.0.2",
114
114
  "sharp": "^0.34.5",
115
- "storybook": "^10.3.5",
115
+ "storybook": "^10.5.10",
116
116
  "tslib": "^2.8.1",
117
117
  "typescript": "^6.0.2",
118
118
  "typescript-eslint": "8.58.2",