it-data-nexus-ui-library 2.9.12 → 2.9.13

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.
Files changed (33) hide show
  1. package/dist/components/ActionBar.mjs +1 -1
  2. package/dist/components/AgentChat/AgentChatDialog.mjs +1 -1
  3. package/dist/components/AgentChat/AgentChatWindow.mjs +1 -1
  4. package/dist/components/AgentChat/ChatComponents/ChatContentFallback.mjs +1 -1
  5. package/dist/components/AgentChat/ChatComponents/ChatDatapoints.mjs +1 -1
  6. package/dist/components/AgentChat/ChatComponents/ChatResponseMarkdown.mjs +1 -1
  7. package/dist/components/AgentChat/ChatComponents/CopyableTableContainer.mjs +1 -1
  8. package/dist/components/AgentChat/ChatComponents/EmptyState.mjs +1 -1
  9. package/dist/components/AgentChat/ChatComponents/MarkdownContent.mjs +1 -1
  10. package/dist/components/AgentChat/ChatComponents/MessageBubble.mjs +1 -1
  11. package/dist/components/AgentChat/ChatComponents/MessageFeedbackBar.mjs +1 -1
  12. package/dist/components/AgentChat/ChatComponents/MessageList.mjs +1 -1
  13. package/dist/components/AgentChat/ChatComponents/SourceCitations.mjs +1 -1
  14. package/dist/components/AgentChat/ChatComponents/StreamingBubble.mjs +1 -1
  15. package/dist/components/AgentChat/ChatComponents/TypingIndicator.mjs +1 -1
  16. package/dist/components/AgentChat/ChatHistory.mjs +1 -1
  17. package/dist/components/AgentChat/ChatHistoryButtonBase.mjs +1 -1
  18. package/dist/components/AgentChat/ChatInput.mjs +1 -1
  19. package/dist/components/AgentChat/FABButton.mjs +1 -1
  20. package/dist/components/AgentChat/WidgetParts/WidgetBody.mjs +1 -1
  21. package/dist/components/AgentChat/WidgetParts/WidgetInput.mjs +1 -1
  22. package/dist/components/DateRangeFilter.mjs +1 -1
  23. package/dist/components/DateRangePicker.mjs +1 -1
  24. package/dist/components/GlassPaperAsync.mjs +1 -1
  25. package/dist/components/LoadingSpinnerNexus.mjs +1 -1
  26. package/dist/components/NexusOrbit.mjs +2 -2
  27. package/dist/components/PaperAsync.mjs +1 -1
  28. package/dist/components/ProcessSteps.mjs +1 -1
  29. package/dist/generated/version.mjs +1 -1
  30. package/dist/index.d.ts +7 -7
  31. package/dist/index.mjs +1 -1
  32. package/package.json +1 -1
  33. package/dist/components/_Primitives/Box.mjs +0 -1
@@ -1 +1 @@
1
- import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o,IconButton as s}from"@mui/material";import c from"@mui/icons-material/ChevronLeft";import a from"@mui/icons-material/Menu";import{Box as d}from"./_Primitives/Box.mjs";import{Stack as m}from"./_Primitives/Stack.mjs";import{NexusHome as f}from"./Logo/NexusHome.mjs";import{ThemeToggle as x}from"./Theme/ThemeToggle.mjs";import h from"./Logo/NexusLogo.mjs";import{ActionBarTitle as p}from"./Typography.mjs";import{useRef as u,useState as g,useEffect as w}from"react";const y=({title:y,extraLeft:v,extraRight:C,rightActions:I,homeHref:b,showHome:j=!0,logo:z,mobileNavigation:R})=>{const k=z??e(h,{}),B=i(),L=r(B.breakpoints.up("lg")),E=u(null),[M,T]=g(49),A=u(null),S=u(null),H=u(null),O=u(null),N=u(null),$=u(null),[D,P]=g(null),[W,X]=g(null);return w(()=>{const e=E.current;if(!e)return;const n=()=>T(e.getBoundingClientRect().height);n();const t=window.ResizeObserver;if(!t)return;const i=new t(n);return i.observe(e),()=>i.disconnect()},[]),w(()=>{if(!L)return P(null),void X(null);function e(){const e=S.current,n=H.current,t=A.current,i=O.current,r=N.current,l=$.current;if(!e||!n||!t)return;const o=e.getBoundingClientRect(),s=n.getBoundingClientRect(),c=t.getBoundingClientRect();if(i){const e=i.getBoundingClientRect().width||0,n=(o.right+s.left)/2,t=o.right+e/2+8,r=s.left-e/2-8,l=Math.min(Math.max(n,t),r);P(l-c.left)}else P(null);if(r&&l){const e=r.getBoundingClientRect().width||0,n=l.getBoundingClientRect(),t=(s.right+n.left)/2,i=s.right+e/2+8,o=n.left-e/2-8,a=Math.min(Math.max(t,i),o);X(a-c.left)}else X(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),A.current&&n.observe(A.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[L,v,C]),n(t,{children:[e(l,{position:"sticky",component:"header",color:"inherit",elevation:0,ref:E,sx:{zIndex:{xs:B.zIndex.appBar,sm:B.zIndex.drawer+1},[B.breakpoints.up("sm")]:{position:"fixed"}},children:n(o,{variant:"dense",sx:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{lg:"center"},py:{xs:.5,lg:0}},children:[n(m,{direction:"row",sx:{display:{xs:"grid",sm:"none"},gridTemplateColumns:"minmax(72px, 1fr) minmax(0, auto) minmax(72px, 1fr)",alignItems:"center",width:"100%",minHeight:40,"& .MuiIconButton-root":{padding:"4px"},"& svg":{fontSize:"1.1rem"}},children:[e(d,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:R&&e(s,{ref:R.buttonRef,onClick:R.onToggle,size:"small","aria-label":R.open?"Close navigation":"Open navigation","aria-expanded":R.open,children:R.open?e(c,{fontSize:"small"}):e(a,{fontSize:"small"})})}),e(p,{noWrap:!0,sx:{minWidth:0,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},children:y}),n(m,{direction:"row",sx:{justifyContent:"flex-end",alignItems:"center"},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{display:{xs:"flex",sm:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%",mt:1},children:[v,C]}),n(m,{sx:{display:{xs:"none",sm:"flex",lg:"none"},width:"100%"},spacing:.5,children:[n(m,{direction:"row",sx:{alignItems:"center",width:"100%"},children:[e(d,{sx:{flex:1,display:"flex",alignItems:"center"},children:e(d,{sx:{height:"38px",pt:.5},children:k})}),e(p,{children:y}),n(m,{direction:"row",sx:{flex:1,justifyContent:"flex-end",alignItems:"center",gap:1},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{justifyContent:"center",alignItems:"center",gap:2,pb:.5},children:[v&&e(d,{children:v}),C&&e(d,{children:C})]})]}),e(d,{sx:{display:{xs:"none",lg:"block"},width:"100%"},children:n(d,{sx:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",position:"relative"},ref:A,children:[e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-start"},children:e(d,{sx:{height:"38px",pt:.5},ref:S,children:k})}),e(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:e(d,{sx:{pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:H,children:e(p,{children:y})})})}),e(d,{sx:{display:v?"block":"none",position:"absolute",left:null!=D?`${D}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:O,children:v})}),e(d,{sx:{display:C?"block":"none",position:"absolute",left:null!=W?`${W}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:N,children:C})}),e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:n(d,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:$,children:[I,j&&e(f,{href:b}),e(x,{})]})})]})})]})}),e(d,{sx:{display:{xs:"none",sm:"block"},height:`${M}px`,flexShrink:0}})]})};export{y as ActionBar};
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o,IconButton as s}from"@mui/material";import c from"@mui/icons-material/ChevronLeft";import a from"@mui/icons-material/Menu";import d from"@mui/material/Box";import{Stack as m}from"./_Primitives/Stack.mjs";import{NexusHome as f}from"./Logo/NexusHome.mjs";import{ThemeToggle as x}from"./Theme/ThemeToggle.mjs";import h from"./Logo/NexusLogo.mjs";import{ActionBarTitle as p}from"./Typography.mjs";import{useRef as u,useState as g,useEffect as w}from"react";const y=({title:y,extraLeft:v,extraRight:C,rightActions:I,homeHref:b,showHome:j=!0,logo:z,mobileNavigation:R})=>{const k=z??e(h,{}),B=i(),L=r(B.breakpoints.up("lg")),E=u(null),[M,T]=g(49),A=u(null),S=u(null),H=u(null),O=u(null),N=u(null),$=u(null),[D,W]=g(null),[X,P]=g(null);return w(()=>{const e=E.current;if(!e)return;const n=()=>T(e.getBoundingClientRect().height);n();const t=window.ResizeObserver;if(!t)return;const i=new t(n);return i.observe(e),()=>i.disconnect()},[]),w(()=>{if(!L)return W(null),void P(null);function e(){const e=S.current,n=H.current,t=A.current,i=O.current,r=N.current,l=$.current;if(!e||!n||!t)return;const o=e.getBoundingClientRect(),s=n.getBoundingClientRect(),c=t.getBoundingClientRect();if(i){const e=i.getBoundingClientRect().width||0,n=(o.right+s.left)/2,t=o.right+e/2+8,r=s.left-e/2-8,l=Math.min(Math.max(n,t),r);W(l-c.left)}else W(null);if(r&&l){const e=r.getBoundingClientRect().width||0,n=l.getBoundingClientRect(),t=(s.right+n.left)/2,i=s.right+e/2+8,o=n.left-e/2-8,a=Math.min(Math.max(t,i),o);P(a-c.left)}else P(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),A.current&&n.observe(A.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[L,v,C]),n(t,{children:[e(l,{position:"sticky",component:"header",color:"inherit",elevation:0,ref:E,sx:{zIndex:{xs:B.zIndex.appBar,sm:B.zIndex.drawer+1},[B.breakpoints.up("sm")]:{position:"fixed"}},children:n(o,{variant:"dense",sx:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{lg:"center"},py:{xs:.5,lg:0}},children:[n(m,{direction:"row",sx:{display:{xs:"grid",sm:"none"},gridTemplateColumns:"minmax(72px, 1fr) minmax(0, auto) minmax(72px, 1fr)",alignItems:"center",width:"100%",minHeight:40,"& .MuiIconButton-root":{padding:"4px"},"& svg":{fontSize:"1.1rem"}},children:[e(d,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:R&&e(s,{ref:R.buttonRef,onClick:R.onToggle,size:"small","aria-label":R.open?"Close navigation":"Open navigation","aria-expanded":R.open,children:R.open?e(c,{fontSize:"small"}):e(a,{fontSize:"small"})})}),e(p,{noWrap:!0,sx:{minWidth:0,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},children:y}),n(m,{direction:"row",sx:{justifyContent:"flex-end",alignItems:"center"},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{display:{xs:"flex",sm:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%",mt:1},children:[v,C]}),n(m,{sx:{display:{xs:"none",sm:"flex",lg:"none"},width:"100%"},spacing:.5,children:[n(m,{direction:"row",sx:{alignItems:"center",width:"100%"},children:[e(d,{sx:{flex:1,display:"flex",alignItems:"center"},children:e(d,{sx:{height:"38px",pt:.5},children:k})}),e(p,{children:y}),n(m,{direction:"row",sx:{flex:1,justifyContent:"flex-end",alignItems:"center",gap:1},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{justifyContent:"center",alignItems:"center",gap:2,pb:.5},children:[v&&e(d,{children:v}),C&&e(d,{children:C})]})]}),e(d,{sx:{display:{xs:"none",lg:"block"},width:"100%"},children:n(d,{sx:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",position:"relative"},ref:A,children:[e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-start"},children:e(d,{sx:{height:"38px",pt:.5},ref:S,children:k})}),e(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:e(d,{sx:{pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:H,children:e(p,{children:y})})})}),e(d,{sx:{display:v?"block":"none",position:"absolute",left:null!=D?`${D}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:O,children:v})}),e(d,{sx:{display:C?"block":"none",position:"absolute",left:null!=X?`${X}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:N,children:C})}),e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:n(d,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:$,children:[I,j&&e(f,{href:b}),e(x,{})]})})]})})]})}),e(d,{sx:{display:{xs:"none",sm:"block"},height:`${M}px`,flexShrink:0}})]})};export{y as ActionBar};
@@ -1 +1 @@
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 u}from"../_Primitives/Stack.mjs";import{IconButton as C}from"../Buttons/IconButton.mjs";import{AiChip as f}from"../AiChip.mjs";import{H1 as g,H2 as v}from"../Typography.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.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 x from"./ChatComponents/SuggestedPrompts.mjs";import w from"./ChatComponents/MessageList.mjs";function S({open:S,onClose:y,title:b="Ask Nexus",subtitle:j="Ready to help",placeholder:A,suggestedPrompts:k=[],showAiChip:I=!0,isTyping:T,messages:z,streamingText:D,liveTraceEvents:P,showActivity:U=!1,onSend:E,onStop:O,onFeedback:L,followUpPrompts:N,followUpLabel:B="Suggested follow-ups:",topOffset:F,conversations:M,activeConversationId:_,onSelectConversation:H,onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R}){const V=n(),q=r(V.breakpoints.down("md")),[J,K]=i(!1),[Q,Y]=i(!1),[Z,oo]=i(null),eo=z.length>0||T,to=void 0!==M,io=F?`calc(100vh - ${F}px)`:"100vh",no=o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[I&&e(f,{}),to&&q&&e(C,{title:"Chat history",size:"small",onClick:()=>K(o=>!o),children:e(m,{sx:{fontSize:18}})}),e(C,{title:"Close full view",size:"small",onClick:y,children:e(l,{sx:{fontSize:16}})})]}),ro=eo?e(w,{messages:z,isTyping:T,streamingText:D,liveTraceEvents:P,showActivity:U,onFeedback:L}):o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(g,{children:b}),e(v,{sx:{color:"text.secondary"},children:j})]}),so=!eo&&k.length>0?o(t,{children:[e(C,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:o=>oo(o.currentTarget),children:e(a,{sx:{fontSize:18}})}),e(s,{open:Boolean(Z),anchorEl:Z,onClose:()=>oo(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(h,{sx:{p:2,maxWidth:360},children:e(x,{prompts:k,onSelect:o=>{oo(null),E(o)}})})})]}):void 0;return o(d,{open:S,fullScreen:!0,onClose:y,sx:F?{top:`${F}px`}:void 0,children:[o(h,{sx:{display:"flex",height:io,overflow:"hidden"},children:[to&&e(h,{sx:{display:{xs:"none",md:"flex"},flexShrink:0},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:H??(()=>{}),onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R,isCollapsed:Q,onToggleCollapse:()=>Y(o=>!o)})}),e(p,{title:b,subtitle:j,showAiChip:!1,headerActions:no,isEmpty:!eo,body:ro,followUpPrompts:N,onSelectFollowUp:E,followUpLabel:B,onSend:E,isStreaming:T,onStop:O,inputPlaceholder:A,inputActions:so})]}),to&&q&&o(t,{children:[J&&e(h,{onClick:()=>K(!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:J?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:o=>{H?.(o),K(!1)},onDeleteConversation:W,onNewConversation:X?()=>{X(),K(!1)}:void 0,agents:$,activeAgentId:G,onSelectAgent:R,onClose:()=>K(!1)})})]})]})}export{S as AgentChatDialog};
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 h from"@mui/material/Box";import{Stack as u}from"../_Primitives/Stack.mjs";import{IconButton as C}from"../Buttons/IconButton.mjs";import{AiChip as f}from"../AiChip.mjs";import{H1 as g,H2 as v}from"../Typography.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.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 x from"./ChatComponents/SuggestedPrompts.mjs";import w from"./ChatComponents/MessageList.mjs";function S({open:S,onClose:y,title:b="Ask Nexus",subtitle:A="Ready to help",placeholder:j,suggestedPrompts:k=[],showAiChip:I=!0,isTyping:T,messages:z,streamingText:D,liveTraceEvents:P,showActivity:U=!1,onSend:E,onStop:O,onFeedback:L,followUpPrompts:N,followUpLabel:B="Suggested follow-ups:",topOffset:F,conversations:M,activeConversationId:_,onSelectConversation:H,onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R}){const V=n(),q=r(V.breakpoints.down("md")),[J,K]=i(!1),[Q,Y]=i(!1),[Z,oo]=i(null),eo=z.length>0||T,to=void 0!==M,io=F?`calc(100vh - ${F}px)`:"100vh",no=o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[I&&e(f,{}),to&&q&&e(C,{title:"Chat history",size:"small",onClick:()=>K(o=>!o),children:e(m,{sx:{fontSize:18}})}),e(C,{title:"Close full view",size:"small",onClick:y,children:e(l,{sx:{fontSize:16}})})]}),ro=eo?e(w,{messages:z,isTyping:T,streamingText:D,liveTraceEvents:P,showActivity:U,onFeedback:L}):o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(g,{children:b}),e(v,{sx:{color:"text.secondary"},children:A})]}),so=!eo&&k.length>0?o(t,{children:[e(C,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:o=>oo(o.currentTarget),children:e(a,{sx:{fontSize:18}})}),e(s,{open:Boolean(Z),anchorEl:Z,onClose:()=>oo(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(h,{sx:{p:2,maxWidth:360},children:e(x,{prompts:k,onSelect:o=>{oo(null),E(o)}})})})]}):void 0;return o(d,{open:S,fullScreen:!0,onClose:y,sx:F?{top:`${F}px`}:void 0,children:[o(h,{sx:{display:"flex",height:io,overflow:"hidden"},children:[to&&e(h,{sx:{display:{xs:"none",md:"flex"},flexShrink:0},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:H??(()=>{}),onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R,isCollapsed:Q,onToggleCollapse:()=>Y(o=>!o)})}),e(p,{title:b,subtitle:A,showAiChip:!1,headerActions:no,isEmpty:!eo,body:ro,followUpPrompts:N,onSelectFollowUp:E,followUpLabel:B,onSend:E,isStreaming:T,onStop:O,inputPlaceholder:j,inputActions:so})]}),to&&q&&o(t,{children:[J&&e(h,{onClick:()=>K(!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:J?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:o=>{H?.(o),K(!1)},onDeleteConversation:W,onNewConversation:X?()=>{X(),K(!1)}:void 0,agents:$,activeAgentId:G,onSelectAgent:R,onClose:()=>K(!1)})})]})]})}export{S as AgentChatDialog};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useState as i,useRef as o,useEffect as n}from"react";import{Box as s}from"../_Primitives/Box.mjs";import{Stack as m}from"../_Primitives/Stack.mjs";import{Caption as a}from"../Typography.mjs";import{Paper as l}from"../_Primitives/Paper.mjs";import{ChatInput as c}from"./ChatInput.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.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 p from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as u}from"./AgentChatWindowHeader.mjs";const d=({title:d="Nexus AI Chat",subtitle:h="Your intelligent assistant",showAiChip:f=!0,headerActions:x,body:C,followUpLabel:y="Suggested follow-ups:",followUpPrompts:b,onSelectFollowUp:g,onSend:w,inputDisabled:S=!1,inputPlaceholder:j="Ask me anything...",isStreaming:A=!1,onStop:k,inputActions:D,inputRef:M,inputLabel:v="Message",isEmpty:T=!1,inputSx:P,sx:I})=>{const[R,U]=i(!1),E=o(0),L=o(0),Y=o(0),_=o(null),H=Boolean(b&&b.length>0&&g);n(()=>{T&&(U(!1),E.current=0,L.current=0)},[T]);const W=r(c,{onSend:w,disabled:S,placeholder:j,isStreaming:A,onStop:k,actions:D,inputRef:M,label:v});return t(s,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],onWheelCapture:()=>{Y.current=Date.now()},onTouchStartCapture:r=>{_.current=r.touches[0]?.clientY??null},onTouchMoveCapture:r=>{const t=r.touches[0]?.clientY;void 0!==t&&null!==_.current&&Math.abs(t-_.current)>1&&(Y.current=Date.now(),_.current=t)},onScrollCapture:r=>{const t=r.target;if(!(t instanceof HTMLElement))return;if("true"!==t.dataset.agentChatScrollContainer)return;const e=t.scrollTop,i=e-E.current;if(E.current=e,e<=0)return L.current=0,void U(!1);Date.now()-Y.current>250?L.current=0:(Math.sign(i)!==Math.sign(L.current)?L.current=i:L.current+=i,L.current>=12?(U(!0),L.current=0):L.current<=-12&&(U(!1),L.current=0))},children:[r(s,{sx:{display:{xs:R?"none":"block",sm:"block"},flexShrink:0},children:r(u,{title:d,subtitle:h,showAiChip:f,actions:x})}),T?t(l,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[C,r(s,{sx:[{mt:3,width:"100%"},...Array.isArray(P)?P:P?[P]:[]],children:W})]}):t(e,{children:[r(l,{"data-agent-chat-scroll-container":"true",sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:C}),H&&t(m,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[r(a,{sx:{display:"block",mb:1},children:y}),r(p,{prompts:b??[],onSelect:g})]}),r(l,{sx:{borderRadius:0,border:"none"},children:r(s,{sx:[{p:2,flexShrink:0},...Array.isArray(P)?P:P?[P]:[]],children:W})})]})]})};export{d as AgentChatWindow};
1
+ import{jsx as r,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useState as i,useRef as o,useEffect as n}from"react";import s from"@mui/material/Box";import{Stack as m}from"../_Primitives/Stack.mjs";import{Caption as a}from"../Typography.mjs";import{Paper as l}from"../_Primitives/Paper.mjs";import{ChatInput as c}from"./ChatInput.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.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 p from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as u}from"./AgentChatWindowHeader.mjs";const d=({title:d="Nexus AI Chat",subtitle:h="Your intelligent assistant",showAiChip:f=!0,headerActions:x,body:C,followUpLabel:y="Suggested follow-ups:",followUpPrompts:b,onSelectFollowUp:g,onSend:w,inputDisabled:S=!1,inputPlaceholder:A="Ask me anything...",isStreaming:j=!1,onStop:k,inputActions:D,inputRef:M,inputLabel:T="Message",isEmpty:v=!1,inputSx:P,sx:I})=>{const[R,U]=i(!1),E=o(0),L=o(0),Y=o(0),H=o(null),W=Boolean(b&&b.length>0&&g);n(()=>{v&&(U(!1),E.current=0,L.current=0)},[v]);const _=r(c,{onSend:w,disabled:S,placeholder:A,isStreaming:j,onStop:k,actions:D,inputRef:M,label:T});return t(s,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],onWheelCapture:()=>{Y.current=Date.now()},onTouchStartCapture:r=>{H.current=r.touches[0]?.clientY??null},onTouchMoveCapture:r=>{const t=r.touches[0]?.clientY;void 0!==t&&null!==H.current&&Math.abs(t-H.current)>1&&(Y.current=Date.now(),H.current=t)},onScrollCapture:r=>{const t=r.target;if(!(t instanceof HTMLElement))return;if("true"!==t.dataset.agentChatScrollContainer)return;const e=t.scrollTop,i=e-E.current;if(E.current=e,e<=0)return L.current=0,void U(!1);Date.now()-Y.current>250?L.current=0:(Math.sign(i)!==Math.sign(L.current)?L.current=i:L.current+=i,L.current>=12?(U(!0),L.current=0):L.current<=-12&&(U(!1),L.current=0))},children:[r(s,{sx:{display:{xs:R?"none":"block",sm:"block"},flexShrink:0},children:r(u,{title:d,subtitle:h,showAiChip:f,actions:x})}),v?t(l,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[C,r(s,{sx:[{mt:3,width:"100%"},...Array.isArray(P)?P:P?[P]:[]],children:_})]}):t(e,{children:[r(l,{"data-agent-chat-scroll-container":"true",sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:C}),W&&t(m,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[r(a,{sx:{display:"block",mb:1},children:y}),r(p,{prompts:b??[],onSelect:g})]}),r(l,{sx:{borderRadius:0,border:"none"},children:r(s,{sx:[{p:2,flexShrink:0},...Array.isArray(P)?P:P?[P]:[]],children:_})})]})]})};export{d as AgentChatWindow};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Alert as i}from"../../_Primitives/Alert.mjs";import{Box as t}from"../../_Primitives/Box.mjs";import{Paper as o}from"../../_Primitives/Paper.mjs";import{Stack as n}from"../../_Primitives/Stack.mjs";import{Caption as s}from"../../Typography.mjs";const a={chart:"This chart couldn't be displayed.",mermaid:"This diagram couldn't be displayed."},m=m=>"notice"===m.variant?e(n,{spacing:.5,role:"status",children:e(s,{children:m.kind&&a[m.kind]||"This content couldn't be displayed."})}):r(n,{spacing:1,role:"status",children:[e(i,{severity:"warning",children:m.reason||m.defaultReason||"This rich response could not be rendered safely."}),e(o,{variant:"outlined",component:"pre",sx:{p:1.5,overflowX:"auto",whiteSpace:"pre-wrap"},children:e(t,{component:"code",children:m.rawSource})})]});export{m as default};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Alert as i}from"../../_Primitives/Alert.mjs";import t from"@mui/material/Box";import{Paper as o}from"../../_Primitives/Paper.mjs";import{Stack as a}from"../../_Primitives/Stack.mjs";import{Caption as n}from"../../Typography.mjs";const s={chart:"This chart couldn't be displayed.",mermaid:"This diagram couldn't be displayed."},m=m=>"notice"===m.variant?e(a,{spacing:.5,role:"status",children:e(n,{children:m.kind&&s[m.kind]||"This content couldn't be displayed."})}):r(a,{spacing:1,role:"status",children:[e(i,{severity:"warning",children:m.reason||m.defaultReason||"This rich response could not be rendered safely."}),e(o,{variant:"outlined",component:"pre",sx:{p:1.5,overflowX:"auto",whiteSpace:"pre-wrap"},children:e(t,{component:"code",children:m.rawSource})})]});export{m as default};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as r}from"react/jsx-runtime";import{Box as e}from"../../_Primitives/Box.mjs";import{Stack as l}from"../../_Primitives/Stack.mjs";import{Card as i}from"../../Card.mjs";import{MetricStat as a}from"../../MetricStat.mjs";import{H4 as o,Caption as n}from"../../Typography.mjs";import{columnsForItemCount as m,formatDatapointValue as s,formatDatapointDelta as p,deltaColorForPolarity as d}from"../../../utils/chatDatapoints.mjs";const u={p:.5,"&:last-child":{pb:.5}},c=({datapoints:c})=>{if(!c||!Array.isArray(c.items)||0===c.items.length)return null;const{items:f}=c,h=f.map(t=>[t.period,t.source].filter(Boolean).join(" · ")),g=f.length>1&&h.every(t=>t&&t===h[0])?h[0]:null,x=m(f.length);return t(l,{spacing:1,role:"group","aria-label":c.title||"Key figures",children:[c.title?r(o,{children:c.title}):null,g?r(n,{children:g}):null,r(e,{"data-testid":"datapoints-grid",sx:{display:"grid",gap:1.5,alignItems:"stretch",gridTemplateColumns:{xs:"repeat(auto-fill, minmax(140px, 1fr))",sm:`repeat(${x}, minmax(0, 1fr))`}},children:f.map((e,l)=>{const o=s(e.value,e.valueFormat,{currency:e.currency,unit:e.unit}),m=p(e.delta,e),c=d(e.delta,e.polarity),f=h[l],x=Boolean(f)&&!g;return t(i,{sx:{flexGrow:1},contentSx:u,children:[r(a,{label:e.label,value:o,delta:m||void 0,deltaColor:c}),x?r(n,{children:f}):null]},`${e.label}-${l}`)})})]})};export{c as default};
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import e from"@mui/material/Box";import{Stack as l}from"../../_Primitives/Stack.mjs";import{Card as i}from"../../Card.mjs";import{MetricStat as a}from"../../MetricStat.mjs";import{H4 as o,Caption as n}from"../../Typography.mjs";import{columnsForItemCount as m,formatDatapointValue as s,formatDatapointDelta as p,deltaColorForPolarity as u}from"../../../utils/chatDatapoints.mjs";const d={p:.5,"&:last-child":{pb:.5}},c=({datapoints:c})=>{if(!c||!Array.isArray(c.items)||0===c.items.length)return null;const{items:f}=c,h=f.map(t=>[t.period,t.source].filter(Boolean).join(" · ")),g=f.length>1&&h.every(t=>t&&t===h[0])?h[0]:null,x=m(f.length);return t(l,{spacing:1,role:"group","aria-label":c.title||"Key figures",children:[c.title?r(o,{children:c.title}):null,g?r(n,{children:g}):null,r(e,{"data-testid":"datapoints-grid",sx:{display:"grid",gap:1.5,alignItems:"stretch",gridTemplateColumns:{xs:"repeat(auto-fill, minmax(140px, 1fr))",sm:`repeat(${x}, minmax(0, 1fr))`}},children:f.map((e,l)=>{const o=s(e.value,e.valueFormat,{currency:e.currency,unit:e.unit}),m=p(e.delta,e),c=u(e.delta,e.polarity),f=h[l],x=Boolean(f)&&!g;return t(i,{sx:{flexGrow:1},contentSx:d,children:[r(a,{label:e.label,value:o,delta:m||void 0,deltaColor:c}),x?r(n,{children:f}):null]},`${e.label}-${l}`)})})]})};export{c as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import{Box as e}from"../../_Primitives/Box.mjs";import{Link as o}from"../../_Primitives/Link.mjs";import{safeMarkdownUrl as n}from"../../../utils/safeMarkdownUrl.mjs";import{splitRawHtmlTables as m,sanitizeRawHtmlTable as a}from"../../../utils/chatTableHtml.mjs";import{CopyableTableContainer as i}from"./CopyableTableContainer.mjs";import l from"./ChatContentFallback.mjs";import c,{chatWindowMarkdownComponents as s}from"./MarkdownContent.mjs";const h={img:({alt:r})=>t(e,{component:"span",children:r?`[Image omitted: ${r}]`:"[Image omitted]"}),a:({href:r,children:m})=>{const a=n(r);if(!a)return t(e,{component:"span",children:m});const i=a.startsWith("#");return t(o,{href:a,openInNewTab:!i,rel:i?void 0:"noopener noreferrer",children:m})}},p=({html:e})=>{const o=r(()=>{try{return{html:a(e),reason:null}}catch{return{html:null,reason:"The raw HTML table could not be rendered safely."}}},[e]);return o.html?t(i,{sanitizedHtml:o.html}):t(l,{variant:"diagnostic",reason:o.reason,rawSource:e})},u=({content:o,highlightQuery:n,compact:a=!1,components:i})=>{const u=r(()=>m(o),[o]),d={...a||n?{}:s,...h,...i};return t(e,{sx:{color:"text.primary"},children:u.map(r=>"html-table"===r.type?t(p,{html:r.html},r.key):"fallback"===r.type?t(l,{variant:"diagnostic",reason:r.reason,rawSource:r.rawSource},r.key):r.content?t(c,{content:r.content,highlightQuery:n,compact:a,components:d},r.key):null)})};export{u as default,h as safeChatMarkdownComponents};
1
+ import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import e from"@mui/material/Box";import{Link as o}from"../../_Primitives/Link.mjs";import{safeMarkdownUrl as n}from"../../../utils/safeMarkdownUrl.mjs";import{splitRawHtmlTables as a,sanitizeRawHtmlTable as m}from"../../../utils/chatTableHtml.mjs";import{CopyableTableContainer as i}from"./CopyableTableContainer.mjs";import l from"./ChatContentFallback.mjs";import c,{chatWindowMarkdownComponents as s}from"./MarkdownContent.mjs";const h={img:({alt:r})=>t(e,{component:"span",children:r?`[Image omitted: ${r}]`:"[Image omitted]"}),a:({href:r,children:a})=>{const m=n(r);if(!m)return t(e,{component:"span",children:a});const i=m.startsWith("#");return t(o,{href:m,openInNewTab:!i,rel:i?void 0:"noopener noreferrer",children:a})}},p=({html:e})=>{const o=r(()=>{try{return{html:m(e),reason:null}}catch{return{html:null,reason:"The raw HTML table could not be rendered safely."}}},[e]);return o.html?t(i,{sanitizedHtml:o.html}):t(l,{variant:"diagnostic",reason:o.reason,rawSource:e})},u=({content:o,highlightQuery:n,compact:m=!1,components:i})=>{const u=r(()=>a(o),[o]),d={...m||n?{}:s,...h,...i};return t(e,{sx:{color:"text.primary"},children:u.map(r=>"html-table"===r.type?t(p,{html:r.html},r.key):"fallback"===r.type?t(l,{variant:"diagnostic",reason:r.reason,rawSource:r.rawSource},r.key):r.content?t(c,{content:r.content,highlightQuery:n,compact:m,components:d},r.key):null)})};export{u as default,h as safeChatMarkdownComponents};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o,useMemo as n,createElement as i}from"react";import l from"@mui/icons-material/Check";import a from"@mui/icons-material/ContentCopy";import c from"@mui/icons-material/Download";import s from"@mui/icons-material/ArrowUpward";import d from"@mui/icons-material/ArrowDownward";import{Box as m}from"../../_Primitives/Box.mjs";import{Stack as p}from"../../_Primitives/Stack.mjs";import{Table as u,TableHead as f,TableRow as h,TableCell as y,TableBody as x}from"../../_Primitives/Table.mjs";import{ButtonBase as b}from"../../Buttons/ButtonBase.mjs";import{SecondaryButton as w}from"../../Buttons/SecondaryButton.mjs";const S=e=>e.replace(/\s+/g," ").trim(),g=e=>e?Array.from(e.querySelectorAll("table")).map(e=>Array.from(e.querySelectorAll("tr")).map(e=>Array.from(e.querySelectorAll("th, td")).map(e=>(e=>{const t=S(e||"");return/[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t})(e.textContent||"")).join(",")).filter(Boolean).join("\r\n")).filter(Boolean).join("\r\n\r\n"):"",C=(e,t)=>{if(3===e.nodeType)return e.textContent;if(1!==e.nodeType)return null;const r=e,o=r.tagName.toLowerCase();return["br","strong","em","code"].includes(o)?i(o,{key:t},...Array.from(r.childNodes,C)):r.textContent},A=({children:i,table:A,sanitizedHtml:v})=>{const[j,B]=r(!1),[T,q]=r(null),$=o(null),k=n(()=>v?(e=>{if("undefined"==typeof DOMParser)return null;const t=(new DOMParser).parseFromString(e,"text/html").querySelector("table");if(!t)return null;const r=e=>Array.from(e.cells,e=>({content:Array.from(e.childNodes,C),sortText:S(e.textContent||""),colSpan:e.colSpan,rowSpan:e.rowSpan,scope:e.getAttribute("scope")||void 0,header:"TH"===e.tagName})),o=Array.from(t.tHead?.rows||[]),n=[...Array.from(t.tBodies).flatMap(e=>Array.from(e.rows)),...Array.from(t.children).filter(e=>"TR"===e.tagName)],i=!o.length&&n[0]?.querySelector("th")?n.shift():void 0,l=o[0]||i||n.shift();return l?{headers:r(l),rows:[...o.slice(1),...n].map(r),footer:Array.from(t.tFoot?.rows||[],r),caption:t.caption?.textContent||void 0}:null})(v):null,[v]),z=A||k,D=n(()=>z&&T?z.rows.map((e,t)=>({row:e,index:t})).sort((e,t)=>{const r=e.row[T.column]?.sortText||"",o=t.row[T.column]?.sortText||"",n=r.localeCompare(o,void 0,{sensitivity:"base"});return("asc"===T.direction?n:-n)||e.index-t.index}).map(({row:e})=>e):z?.rows||[],[z,T]),L=(e,r)=>e.map((e,o)=>t(y,{colSpan:e.colSpan,rowSpan:e.rowSpan,component:e.header?"th":"td",scope:e.scope,sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:e.content},`${r}-${o}`));return e(m,{sx:{my:1},children:[e(p,{direction:"row",sx:{justifyContent:"flex-end",gap:1,mb:.5},children:[t(w,{size:"small",startIcon:t(j?l:a,{sx:{fontSize:14}}),onClick:async()=>{const e=(t=$.current)?Array.from(t.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?t.map(e=>{const r=null!==e.closest("thead")||e===t[0]&&null!==e.querySelector("th"),o=Array.from(e.querySelectorAll("th, td")).map(e=>S(e.textContent||"")),n="| "+o.join(" | ")+" |";return r?n+"\n| "+o.map(()=>"---").join(" | ")+" |":n}).join("\n"):""}).filter(Boolean).join("\n\n"):"";var t;const r=(e=>e?Array.from(e.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?`<table style="border-collapse:collapse;border:1px solid #d0d7de;">${t.map(e=>`<tr>${Array.from(e.querySelectorAll("th, td")).map(e=>{const t="th"===e.tagName.toLowerCase()?"th":"td";return`<${t} style="border:1px solid #d0d7de;padding:6px 10px;text-align:left;">${S(e.textContent||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</${t}>`}).join("")}</tr>`).join("")}</table>`:""}).filter(Boolean).join("<br>"):"")($.current);await(async(e,t)=>{if(navigator.clipboard?.write&&"undefined"!=typeof ClipboardItem)try{const r={"text/plain":new Blob([t||""],{type:"text/plain"})};return e&&(r["text/html"]=new Blob([e],{type:"text/html"})),void await navigator.clipboard.write([new ClipboardItem(r)])}catch{}t&&await navigator.clipboard.writeText(t)})(r,e),B(!0),setTimeout(()=>B(!1),2e3)},title:j?"Table copied":"Copy table","aria-label":j?"Table copied to clipboard":"Copy table",children:j?"Copied":"Copy table"}),t(w,{size:"small",startIcon:t(c,{sx:{fontSize:14}}),onClick:()=>{const e=g($.current);if(!e)return;((e,t)=>{if(!e)return;const r=new Blob(["\ufeff",e],{type:"text/csv;charset=utf-8;"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)})(e,`nexus-table-${(new Date).toISOString().slice(0,19).replace(/[:T]/g,"-")}.csv`)},title:"Download CSV","aria-label":"Download table as CSV",children:"CSV"})]}),t(m,{ref:$,sx:{overflowX:"auto",width:"100%",maxWidth:"100%"},children:z?e(u,{sx:{width:"100%",minWidth:"max-content",borderCollapse:"collapse"},children:[z.caption?t("caption",{children:z.caption}):null,t(f,{children:t(h,{children:z.headers.map((r,o)=>t(y,{component:"th",scope:"col",colSpan:r.colSpan,rowSpan:r.rowSpan,"aria-sort":T?.column===o?"asc"===T.direction?"ascending":"descending":void 0,sx:{border:"1px solid",borderColor:"divider",bgcolor:"action.hover",px:1.25,py:.75,fontWeight:600,textAlign:"left"},children:e(b,{onClick:()=>{return e=o,q(t=>t?.column!==e?{column:e,direction:"asc"}:"asc"===t.direction?{column:e,direction:"desc"}:null);var e},"aria-label":`Sort by ${r.sortText}${T?.column===o?", "+("asc"===T.direction?"ascending":"descending"):""}`,sx:{width:"100%",justifyContent:"flex-start",textAlign:"left",font:"inherit",fontWeight:"inherit",color:"inherit",gap:.5,"&.Mui-focusVisible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},children:[r.content,t(m,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",flex:"0 0 14px",width:14,height:14,visibility:T?.column===o?"visible":"hidden"},children:T?.column===o&&("asc"===T.direction?t(s,{sx:{fontSize:14}}):t(d,{sx:{fontSize:14}}))})]})},o))})}),e(x,{children:[D.map((e,r)=>t(h,{children:L(e,r)},r)),z.footer?.map((e,r)=>t(h,{children:L(e,r)},`footer-${r}`))]})]}):i})]})};export{A as CopyableTableContainer};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o,useMemo as n,createElement as i}from"react";import l from"@mui/icons-material/Check";import a from"@mui/icons-material/ContentCopy";import c from"@mui/icons-material/Download";import s from"@mui/icons-material/ArrowUpward";import d from"@mui/icons-material/ArrowDownward";import m from"@mui/material/Box";import{Stack as p}from"../../_Primitives/Stack.mjs";import{Table as u,TableHead as f,TableRow as h,TableCell as y,TableBody as x}from"../../_Primitives/Table.mjs";import{ButtonBase as b}from"../../Buttons/ButtonBase.mjs";import{SecondaryButton as w}from"../../Buttons/SecondaryButton.mjs";const S=e=>e.replace(/\s+/g," ").trim(),g=e=>e?Array.from(e.querySelectorAll("table")).map(e=>Array.from(e.querySelectorAll("tr")).map(e=>Array.from(e.querySelectorAll("th, td")).map(e=>(e=>{const t=S(e||"");return/[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t})(e.textContent||"")).join(",")).filter(Boolean).join("\r\n")).filter(Boolean).join("\r\n\r\n"):"",C=(e,t)=>{if(3===e.nodeType)return e.textContent;if(1!==e.nodeType)return null;const r=e,o=r.tagName.toLowerCase();return["br","strong","em","code"].includes(o)?i(o,{key:t},...Array.from(r.childNodes,C)):r.textContent},A=({children:i,table:A,sanitizedHtml:v})=>{const[j,B]=r(!1),[T,q]=r(null),$=o(null),k=n(()=>v?(e=>{if("undefined"==typeof DOMParser)return null;const t=(new DOMParser).parseFromString(e,"text/html").querySelector("table");if(!t)return null;const r=e=>Array.from(e.cells,e=>({content:Array.from(e.childNodes,C),sortText:S(e.textContent||""),colSpan:e.colSpan,rowSpan:e.rowSpan,scope:e.getAttribute("scope")||void 0,header:"TH"===e.tagName})),o=Array.from(t.tHead?.rows||[]),n=[...Array.from(t.tBodies).flatMap(e=>Array.from(e.rows)),...Array.from(t.children).filter(e=>"TR"===e.tagName)],i=!o.length&&n[0]?.querySelector("th")?n.shift():void 0,l=o[0]||i||n.shift();return l?{headers:r(l),rows:[...o.slice(1),...n].map(r),footer:Array.from(t.tFoot?.rows||[],r),caption:t.caption?.textContent||void 0}:null})(v):null,[v]),z=A||k,D=n(()=>z&&T?z.rows.map((e,t)=>({row:e,index:t})).sort((e,t)=>{const r=e.row[T.column]?.sortText||"",o=t.row[T.column]?.sortText||"",n=r.localeCompare(o,void 0,{sensitivity:"base"});return("asc"===T.direction?n:-n)||e.index-t.index}).map(({row:e})=>e):z?.rows||[],[z,T]),L=(e,r)=>e.map((e,o)=>t(y,{colSpan:e.colSpan,rowSpan:e.rowSpan,component:e.header?"th":"td",scope:e.scope,sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:e.content},`${r}-${o}`));return e(m,{sx:{my:1},children:[e(p,{direction:"row",sx:{justifyContent:"flex-end",gap:1,mb:.5},children:[t(w,{size:"small",startIcon:t(j?l:a,{sx:{fontSize:14}}),onClick:async()=>{const e=(t=$.current)?Array.from(t.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?t.map(e=>{const r=null!==e.closest("thead")||e===t[0]&&null!==e.querySelector("th"),o=Array.from(e.querySelectorAll("th, td")).map(e=>S(e.textContent||"")),n="| "+o.join(" | ")+" |";return r?n+"\n| "+o.map(()=>"---").join(" | ")+" |":n}).join("\n"):""}).filter(Boolean).join("\n\n"):"";var t;const r=(e=>e?Array.from(e.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?`<table style="border-collapse:collapse;border:1px solid #d0d7de;">${t.map(e=>`<tr>${Array.from(e.querySelectorAll("th, td")).map(e=>{const t="th"===e.tagName.toLowerCase()?"th":"td";return`<${t} style="border:1px solid #d0d7de;padding:6px 10px;text-align:left;">${S(e.textContent||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</${t}>`}).join("")}</tr>`).join("")}</table>`:""}).filter(Boolean).join("<br>"):"")($.current);await(async(e,t)=>{if(navigator.clipboard?.write&&"undefined"!=typeof ClipboardItem)try{const r={"text/plain":new Blob([t||""],{type:"text/plain"})};return e&&(r["text/html"]=new Blob([e],{type:"text/html"})),void await navigator.clipboard.write([new ClipboardItem(r)])}catch{}t&&await navigator.clipboard.writeText(t)})(r,e),B(!0),setTimeout(()=>B(!1),2e3)},title:j?"Table copied":"Copy table","aria-label":j?"Table copied to clipboard":"Copy table",children:j?"Copied":"Copy table"}),t(w,{size:"small",startIcon:t(c,{sx:{fontSize:14}}),onClick:()=>{const e=g($.current);if(!e)return;((e,t)=>{if(!e)return;const r=new Blob(["\ufeff",e],{type:"text/csv;charset=utf-8;"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)})(e,`nexus-table-${(new Date).toISOString().slice(0,19).replace(/[:T]/g,"-")}.csv`)},title:"Download CSV","aria-label":"Download table as CSV",children:"CSV"})]}),t(m,{ref:$,sx:{overflowX:"auto",width:"100%",maxWidth:"100%"},children:z?e(u,{sx:{width:"100%",minWidth:"max-content",borderCollapse:"collapse"},children:[z.caption?t("caption",{children:z.caption}):null,t(f,{children:t(h,{children:z.headers.map((r,o)=>t(y,{component:"th",scope:"col",colSpan:r.colSpan,rowSpan:r.rowSpan,"aria-sort":T?.column===o?"asc"===T.direction?"ascending":"descending":void 0,sx:{border:"1px solid",borderColor:"divider",bgcolor:"action.hover",px:1.25,py:.75,fontWeight:600,textAlign:"left"},children:e(b,{onClick:()=>{return e=o,q(t=>t?.column!==e?{column:e,direction:"asc"}:"asc"===t.direction?{column:e,direction:"desc"}:null);var e},"aria-label":`Sort by ${r.sortText}${T?.column===o?", "+("asc"===T.direction?"ascending":"descending"):""}`,sx:{width:"100%",justifyContent:"flex-start",textAlign:"left",font:"inherit",fontWeight:"inherit",color:"inherit",gap:.5,"&.Mui-focusVisible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},children:[r.content,t(m,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",flex:"0 0 14px",width:14,height:14,visibility:T?.column===o?"visible":"hidden"},children:T?.column===o&&("asc"===T.direction?t(s,{sx:{fontSize:14}}):t(d,{sx:{fontSize:14}}))})]})},o))})}),e(x,{children:[D.map((e,r)=>t(h,{children:L(e,r)},r)),z.footer?.map((e,r)=>t(h,{children:L(e,r)},`footer-${r}`))]})]}):i})]})};export{A as CopyableTableContainer};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as r}from"../../_Primitives/Box.mjs";import{Stack as i}from"../../_Primitives/Stack.mjs";import{Chip as n}from"../../_Primitives/Chip.mjs";import{H2 as m,H3 as o}from"../../Typography.mjs";import s from"./SuggestedPrompts.mjs";const l=({title:l,description:c,dataSources:p,prompts:a,onSelect:d})=>e(i,{direction:"column",sx:{alignItems:"center",justifyContent:"center",gap:3,p:2,flex:1},children:[e(i,{direction:"column",sx:{alignItems:"center",justifyContent:"center",gap:2},children:[t(m,{children:l}),t(o,{sx:{color:"text.secondary",textAlign:"center"},children:c})]}),p&&p.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:p.map(e=>t(n,{label:e,size:"small"},e))}),a.length>0&&t(r,{sx:{mt:2},children:t(s,{prompts:a,onSelect:d})})]});export{l as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"@mui/material/Box";import{Stack as i}from"../../_Primitives/Stack.mjs";import{Chip as n}from"../../_Primitives/Chip.mjs";import{H2 as m,H3 as o}from"../../Typography.mjs";import s from"./SuggestedPrompts.mjs";const l=({title:l,description:c,dataSources:p,prompts:a,onSelect:d})=>e(i,{direction:"column",sx:{alignItems:"center",justifyContent:"center",gap:3,p:2,flex:1},children:[e(i,{direction:"column",sx:{alignItems:"center",justifyContent:"center",gap:2},children:[t(m,{children:l}),t(o,{sx:{color:"text.secondary",textAlign:"center"},children:c})]}),p&&p.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:p.map(e=>t(n,{label:e,size:"small"},e))}),a.length>0&&t(r,{sx:{mt:2},children:t(s,{prompts:a,onSelect:d})})]});export{l as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t,isValidElement as n,cloneElement as o,createElement as i}from"react";import l from"react-markdown";import c from"remark-gfm";import{Box as d}from"../../_Primitives/Box.mjs";import{Paper as p}from"../../_Primitives/Paper.mjs";import{ChatWindowBody as m,H4 as a,H3 as h}from"../../Typography.mjs";import{Code as s}from"../../Code.mjs";import{CopyableTableContainer as f}from"./CopyableTableContainer.mjs";const g=(r,t)=>{const n=t?.trim();if(!n)return r;const o=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(n)})`,"ig");return r.split(o).map((r,t)=>{if(!r)return null;return r.toLowerCase()===n.toLowerCase()?e(d,{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:r},`${r}-${t}`):r})},u=(e,r)=>{if("string"==typeof e)return g(e,r);if("number"==typeof e)return g(e.toString(),r);if(Array.isArray(e))return e.map(e=>u(e,r));if(n(e)){const t=e.props.children;return void 0===t?e:o(e,void 0,u(t,r))}return e},y=r({}),x=e=>"text"===e.type?e.value:"children"in e?e.children.map(x).join(""):"",b=(e,r,t)=>{if("text"===e.type)return e.value;if("element"!==e.type)return null;const n=r[e.tagName]||e.tagName,o="string"==typeof n?{...e.properties,key:t}:{...e.properties,key:t,node:e};return i(n,o,...e.children.map((e,t)=>b(e,r,t)))},v=e=>"element"===e.type,S=(e,r)=>{const t=e.children.filter(v),n=t.find(e=>"thead"===e.tagName),o=t.find(e=>"tbody"===e.tagName),i=t.find(e=>"tfoot"===e.tagName),l=e=>e?.children.filter(v).filter(e=>"tr"===e.tagName).map(e=>e.children.filter(v).filter(e=>"th"===e.tagName||"td"===e.tagName).map(e=>((e,r)=>({content:e.children.map((e,t)=>b(e,r,t)),sortText:e.children.map(x).join("").replace(/\s+/g," ").trim(),colSpan:"number"==typeof e.properties.colSpan?e.properties.colSpan:void 0,rowSpan:"number"==typeof e.properties.rowSpan?e.properties.rowSpan:void 0}))(e,r)))||[],c=l(n),d=l(o);return{headers:c[0]||d.shift()||[],rows:[...c.slice(1),...d],footer:l(i)}},C=({node:r})=>{const n=t(y);return r?e(f,{table:S(r,n)}):null},w={table:C,p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0}},children:r}),li:({children:r})=>e(m,{component:"li",children:r}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700,fontSize:"inherit",lineHeight:"inherit"},children:r}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic",fontSize:"inherit",lineHeight:"inherit"},children:r})},j=({content:r,highlightQuery:t,compact:n=!1,components:o})=>{const i=e=>u(e,t),f=n?"0.875rem":void 0,g={...{p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0},fontSize:f},children:i(r)}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700},children:i(r)}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic"},children:i(r)}),ul:({children:r})=>e(d,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:i(r)}),ol:({children:r})=>e(d,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:i(r)}),li:({children:r})=>e(m,{component:"li",sx:{fontSize:f},children:i(r)}),h1:({children:r})=>e(h,{sx:{mb:1,mt:.5},children:i(r)}),h2:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),h3:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),code:({children:r})=>e(s,{children:i(r)}),pre:({children:r})=>e(p,{component:"pre",variant:"outlined",sx:{my:2,p:1.5,overflowX:"auto",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',fontSize:"0.75rem",lineHeight:1.5,bgcolor:"action.hover"},children:i(r)}),hr:()=>e(d,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}}),table:C,th:({children:r})=>e(d,{component:"th",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left",bgcolor:"action.hover",fontWeight:600},children:r}),td:({children:r})=>e(d,{component:"td",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:r})},...o};return e(y.Provider,{value:g,children:e(l,{remarkPlugins:[c],components:g,children:r})})};export{w as chatWindowMarkdownComponents,j as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t,isValidElement as n,cloneElement as o,createElement as i}from"react";import l from"react-markdown";import c from"remark-gfm";import d from"@mui/material/Box";import{Paper as p}from"../../_Primitives/Paper.mjs";import{ChatWindowBody as m,H4 as a,H3 as h}from"../../Typography.mjs";import{Code as s}from"../../Code.mjs";import{CopyableTableContainer as f}from"./CopyableTableContainer.mjs";const g=(r,t)=>{const n=t?.trim();if(!n)return r;const o=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(n)})`,"ig");return r.split(o).map((r,t)=>{if(!r)return null;return r.toLowerCase()===n.toLowerCase()?e(d,{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:r},`${r}-${t}`):r})},u=(e,r)=>{if("string"==typeof e)return g(e,r);if("number"==typeof e)return g(e.toString(),r);if(Array.isArray(e))return e.map(e=>u(e,r));if(n(e)){const t=e.props.children;return void 0===t?e:o(e,void 0,u(t,r))}return e},y=r({}),x=e=>"text"===e.type?e.value:"children"in e?e.children.map(x).join(""):"",b=(e,r,t)=>{if("text"===e.type)return e.value;if("element"!==e.type)return null;const n=r[e.tagName]||e.tagName,o="string"==typeof n?{...e.properties,key:t}:{...e.properties,key:t,node:e};return i(n,o,...e.children.map((e,t)=>b(e,r,t)))},v=e=>"element"===e.type,S=(e,r)=>{const t=e.children.filter(v),n=t.find(e=>"thead"===e.tagName),o=t.find(e=>"tbody"===e.tagName),i=t.find(e=>"tfoot"===e.tagName),l=e=>e?.children.filter(v).filter(e=>"tr"===e.tagName).map(e=>e.children.filter(v).filter(e=>"th"===e.tagName||"td"===e.tagName).map(e=>((e,r)=>({content:e.children.map((e,t)=>b(e,r,t)),sortText:e.children.map(x).join("").replace(/\s+/g," ").trim(),colSpan:"number"==typeof e.properties.colSpan?e.properties.colSpan:void 0,rowSpan:"number"==typeof e.properties.rowSpan?e.properties.rowSpan:void 0}))(e,r)))||[],c=l(n),d=l(o);return{headers:c[0]||d.shift()||[],rows:[...c.slice(1),...d],footer:l(i)}},C=({node:r})=>{const n=t(y);return r?e(f,{table:S(r,n)}):null},w={table:C,p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0}},children:r}),li:({children:r})=>e(m,{component:"li",children:r}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700,fontSize:"inherit",lineHeight:"inherit"},children:r}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic",fontSize:"inherit",lineHeight:"inherit"},children:r})},k=({content:r,highlightQuery:t,compact:n=!1,components:o})=>{const i=e=>u(e,t),f=n?"0.875rem":void 0,g={...{p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0},fontSize:f},children:i(r)}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700},children:i(r)}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic"},children:i(r)}),ul:({children:r})=>e(d,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:i(r)}),ol:({children:r})=>e(d,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:i(r)}),li:({children:r})=>e(m,{component:"li",sx:{fontSize:f},children:i(r)}),h1:({children:r})=>e(h,{sx:{mb:1,mt:.5},children:i(r)}),h2:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),h3:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),code:({children:r})=>e(s,{children:i(r)}),pre:({children:r})=>e(p,{component:"pre",variant:"outlined",sx:{my:2,p:1.5,overflowX:"auto",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',fontSize:"0.75rem",lineHeight:1.5,bgcolor:"action.hover"},children:i(r)}),hr:()=>e(d,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}}),table:C,th:({children:r})=>e(d,{component:"th",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left",bgcolor:"action.hover",fontWeight:600},children:r}),td:({children:r})=>e(d,{component:"td",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:r})},...o};return e(y.Provider,{value:g,children:e(l,{remarkPlugins:[c],components:g,children:r})})};export{w as chatWindowMarkdownComponents,k as default};
@@ -1 +1 @@
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"../../_Primitives/Box.mjs";import{Stack as c}from"../../_Primitives/Stack.mjs";import{GhostButton as s}from"../../Buttons/GhostButton.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";import d from"./ChatResponseMarkdown.mjs";import p from"./MessageFeedbackBar.mjs";import{ChatWindowBody as f}from"../../Typography.mjs";import{colours as h}from"../../Theme/tokens.mjs";const g=({block:i})=>{const[a,c]=r(!1),m=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(s,{onClick:()=>c(e=>!e),"aria-expanded":a,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider"},children:[e(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),e(l,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",alignItems:"center",color:"text.secondary"},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-${m}`,children:d})})]})},u=({file:o,onDownloadFile:t})=>{const[n,a]=r(!1);return e(m,{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"})},x=(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})},y=({message:r,highlightQuery:t,showActivity:n=!1,onFeedback:i,onDownloadFile:s,contentRenderer:m,markdownComponents:y,compact:b=!1})=>{const w="user"===r.role,k=!w&&r.codeBlocks&&r.codeBlocks.length>0,v=!w&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:w?"flex-end":"flex-start"},children:o(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...w?{}:{flex:1}},children:[!w&&n&&r.traceEvents&&r.traceEvents.length>0&&e(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),o(l,{sx:{borderRadius:w?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:w?h.jadeLight:"background.default",color:w?h.black:"text.primary",border:"none"},children:[k&&e(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((o,r)=>e(g,{block:o},r))}),w?e(f,{sx:{whiteSpace:"pre-wrap",fontSize:b?"0.875rem":void 0},children:x(r.content,t)}):e("div",{className:"message-content",children:m?m(r.content):e(d,{content:r.content,highlightQuery:t,compact:b,components:y})}),v&&e(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((o,r)=>e(u,{file:o,onDownloadFile:s},`${o.bucket}-${o.key}-${r}`))})]}),!w&&i&&e(p,{message:r,onFeedback:i})]})})};export{y 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 l from"@mui/material/Box";import{Stack as c}from"../../_Primitives/Stack.mjs";import{GhostButton as s}from"../../Buttons/GhostButton.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";import d from"./ChatResponseMarkdown.mjs";import p from"./MessageFeedbackBar.mjs";import{ChatWindowBody as f}from"../../Typography.mjs";import{colours as h}from"../../Theme/tokens.mjs";const u=({block:i})=>{const[a,c]=r(!1),m=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(s,{onClick:()=>c(e=>!e),"aria-expanded":a,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider"},children:[e(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),e(l,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",alignItems:"center",color:"text.secondary"},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-${m}`,children:d})})]})},g=({file:o,onDownloadFile:t})=>{const[n,a]=r(!1);return e(m,{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"})},x=(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})},y=({message:r,highlightQuery:t,showActivity:n=!1,onFeedback:i,onDownloadFile:s,contentRenderer:m,markdownComponents:y,compact:b=!1})=>{const w="user"===r.role,k=!w&&r.codeBlocks&&r.codeBlocks.length>0,v=!w&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:w?"flex-end":"flex-start"},children:o(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...w?{}:{flex:1}},children:[!w&&n&&r.traceEvents&&r.traceEvents.length>0&&e(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),o(l,{sx:{borderRadius:w?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:w?h.jadeLight:"background.default",color:w?h.black:"text.primary",border:"none"},children:[k&&e(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((o,r)=>e(u,{block:o},r))}),w?e(f,{sx:{whiteSpace:"pre-wrap",fontSize:b?"0.875rem":void 0},children:x(r.content,t)}):e("div",{className:"message-content",children:m?m(r.content):e(d,{content:r.content,highlightQuery:t,compact:b,components:y})}),v&&e(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((o,r)=>e(g,{file:o,onDownloadFile:s},`${o.bucket}-${o.key}-${r}`))})]}),!w&&i&&e(p,{message:r,onFeedback:i})]})})};export{y as default};
@@ -1 +1 @@
1
- import{jsxs as i,Fragment as e,jsx as t}from"react/jsx-runtime";import{useState as o}from"react";import r from"@mui/icons-material/ThumbUp";import m from"@mui/icons-material/ThumbDown";import s from"@mui/icons-material/ContentCopy";import a from"@mui/icons-material/Check";import{Box as l}from"../../_Primitives/Box.mjs";import{Stack as n}from"../../_Primitives/Stack.mjs";import{IconButton as c}from"../../Buttons/IconButton.mjs";import{PrimaryButton as p}from"../../Buttons/PrimaryButton.mjs";import{SecondaryButton as d}from"../../Buttons/SecondaryButton.mjs";import{Dialog as h,DialogTitle as u,DialogContent as f,DialogActions as g}from"../../_Primitives/Dialog.mjs";import{TextField as v}from"../../_Primitives/TextField.mjs";import{Caption as x}from"../../Typography.mjs";const C=({message:C,onFeedback:b})=>{const[k,w]=o(!1),[y,j]=o(C.rating??null),[T,B]=o(!1),[z,P]=o(""),[S,F]=o(!1);return i(e,{children:[i(n,{direction:"row",spacing:.5,sx:{alignItems:"center"},children:[t(c,{size:"small",title:k?"Copied":"Copy message",ariaLabel:k?"Copied to clipboard":"Copy message to clipboard",onClick:async()=>{try{await navigator.clipboard.writeText(C.content),w(!0),setTimeout(()=>w(!1),2e3)}catch{}},children:t(k?a:s,{sx:{fontSize:16}})}),t(c,{size:"small",title:"Helpful",ariaLabel:"Mark as helpful",onClick:()=>{b(C.id,"positive"),j("positive"),F(!0),setTimeout(()=>F(!1),3e3)},sx:"positive"===y?{color:"primary.main"}:void 0,children:t(r,{sx:{fontSize:16}})}),t(c,{size:"small",title:"Not helpful",ariaLabel:"Mark as not helpful",onClick:()=>{P(""),B(!0)},sx:"negative"===y?{color:"error.main"}:void 0,children:t(m,{sx:{fontSize:16}})}),S&&t(x,{sx:{color:"text.secondary",ml:.5},children:"Feedback submitted!"})]}),i(h,{open:T,onClose:()=>B(!1),maxWidth:"sm",fullWidth:!0,children:[t(u,{children:"What was the issue with this response?"}),t(f,{children:t(l,{sx:{mt:1},children:t(v,{multiline:!0,rows:4,fullWidth:!0,placeholder:"Please describe what was wrong with this response...",value:z,onChange:i=>P(i.target.value),autoFocus:!0})})}),i(g,{children:[t(d,{onClick:()=>B(!1),children:"Cancel"}),t(p,{onClick:()=>{b(C.id,"negative",z.trim()),j("negative"),B(!1),F(!0),setTimeout(()=>F(!1),3e3)},disabled:!z.trim(),children:"Submit"})]})]})]})};export{C as default};
1
+ import{jsxs as i,Fragment as e,jsx as t}from"react/jsx-runtime";import{useState as o}from"react";import r from"@mui/icons-material/ThumbUp";import m from"@mui/icons-material/ThumbDown";import a from"@mui/icons-material/ContentCopy";import s from"@mui/icons-material/Check";import l from"@mui/material/Box";import{Stack as n}from"../../_Primitives/Stack.mjs";import{IconButton as c}from"../../Buttons/IconButton.mjs";import{PrimaryButton as p}from"../../Buttons/PrimaryButton.mjs";import{SecondaryButton as d}from"../../Buttons/SecondaryButton.mjs";import{Dialog as u,DialogTitle as h,DialogContent as f,DialogActions as g}from"../../_Primitives/Dialog.mjs";import{TextField as x}from"../../_Primitives/TextField.mjs";import{Caption as C}from"../../Typography.mjs";const b=({message:b,onFeedback:v})=>{const[k,w]=o(!1),[y,j]=o(b.rating??null),[T,B]=o(!1),[z,S]=o(""),[P,F]=o(!1);return i(e,{children:[i(n,{direction:"row",spacing:.5,sx:{alignItems:"center"},children:[t(c,{size:"small",title:k?"Copied":"Copy message",ariaLabel:k?"Copied to clipboard":"Copy message to clipboard",onClick:async()=>{try{await navigator.clipboard.writeText(b.content),w(!0),setTimeout(()=>w(!1),2e3)}catch{}},children:t(k?s:a,{sx:{fontSize:16}})}),t(c,{size:"small",title:"Helpful",ariaLabel:"Mark as helpful",onClick:()=>{v(b.id,"positive"),j("positive"),F(!0),setTimeout(()=>F(!1),3e3)},sx:"positive"===y?{color:"primary.main"}:void 0,children:t(r,{sx:{fontSize:16}})}),t(c,{size:"small",title:"Not helpful",ariaLabel:"Mark as not helpful",onClick:()=>{S(""),B(!0)},sx:"negative"===y?{color:"error.main"}:void 0,children:t(m,{sx:{fontSize:16}})}),P&&t(C,{sx:{color:"text.secondary",ml:.5},children:"Feedback submitted!"})]}),i(u,{open:T,onClose:()=>B(!1),maxWidth:"sm",fullWidth:!0,children:[t(h,{children:"What was the issue with this response?"}),t(f,{children:t(l,{sx:{mt:1},children:t(x,{multiline:!0,rows:4,fullWidth:!0,placeholder:"Please describe what was wrong with this response...",value:z,onChange:i=>S(i.target.value),autoFocus:!0})})}),i(g,{children:[t(d,{onClick:()=>B(!1),children:"Cancel"}),t(p,{onClick:()=>{v(b.id,"negative",z.trim()),j("negative"),B(!1),F(!0),setTimeout(()=>F(!1),3e3)},disabled:!z.trim(),children:"Submit"})]})]})]})};export{b as default};
@@ -1 +1 @@
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 c from"./MessageBubble.mjs";import i 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:d=!1,markdownComponents:b,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,"data-agent-chat-scroll-container":"true",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(c,{message:t,highlightQuery:h,showActivity:f,compact:d,markdownComponents:b,onFeedback:x},t.id)),H&&e(i,{text:u||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f,compact:d}),B&&e(l,{traceLabel:g&&g.length>0?s(g):void 0}),e(n,{ref:y})]})};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 n from"@mui/material/Box";import c from"./MessageBubble.mjs";import i 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:d=!1,markdownComponents:b,onFeedback:x})=>{const y=r(null),v=r(null),T=r(!1),w=r(m.length),A=r(!1),j=()=>{const t=v.current;t&&(A.current=!0,t.scrollTop=t.scrollHeight,requestAnimationFrame(()=>{A.current=!1}))};o(()=>{const t=m[m.length-1];m.length>w.current&&"user"===t?.role&&(T.current=!1,j()),w.current=m.length},[m]),o(()=>{T.current||j()},[a,u]);const k=(u||"").trim().length>0,H=a&&(k||f),B=a&&!H;return t(n,{ref:v,"data-agent-chat-scroll-container":"true",onScroll:()=>{A.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(c,{message:t,highlightQuery:h,showActivity:f,compact:d,markdownComponents:b,onFeedback:x},t.id)),H&&e(i,{text:u||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f,compact:d}),B&&e(l,{traceLabel:g&&g.length>0?s(g):void 0}),e(n,{ref:y})]})};export{m as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Box as i}from"../../_Primitives/Box.mjs";import{Chip as o}from"../../_Primitives/Chip.mjs";import{Caption as m}from"../../Typography.mjs";const s=({sources:s})=>s.length?r(i,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.5,px:2,py:1,borderTop:1,borderColor:"divider"},children:[e(m,{sx:{mr:.5},children:"Sources:"}),s.map(r=>e(o,{label:r,size:"small"},r))]}):null;export{s as default};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import o from"@mui/material/Box";import{Chip as i}from"../../_Primitives/Chip.mjs";import{Caption as m}from"../../Typography.mjs";const l=({sources:l})=>l.length?r(o,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.5,px:2,py:1,borderTop:1,borderColor:"divider"},children:[e(m,{sx:{mr:.5},children:"Sources:"}),l.map(r=>e(i,{label:r,size:"small"},r))]}):null;export{l as default};
@@ -1 +1 @@
1
- import{jsxs as i,jsx as t,Fragment as r}from"react/jsx-runtime";import e from"../AgentActivity/AgentActivity.mjs";import{Box as n}from"../../_Primitives/Box.mjs";import{Stack as o}from"../../_Primitives/Stack.mjs";import{Caption as a}from"../../Typography.mjs";import c from"./ChatResponseMarkdown.mjs";import{latestTraceLabel as m}from"./latestTraceLabel.mjs";const s=()=>t(n,{sx:{display:"inline-block",width:"2px",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}}}}),l=({text:l,traceEvents:p,highlightQuery:g,avatarIcon:h,compact:d=!1,showActivity:x=!1})=>i(o,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[h&&t(n,{sx:{mt:.25,flexShrink:0},children:h}),t(o,{spacing:1,sx:{flex:1,minWidth:0},children:x?i(r,{children:[t(e,{isStreaming:!0,traceEvents:p}),l&&i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]})]}):t(r,{children:l?i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]}):t(n,{sx:{bgcolor:"background.default",px:1.75,py:1.25},children:t(o,{direction:"row",spacing:1,sx:{alignItems:"center"},children:i(o,{direction:"row",spacing:.5,children:[t(a,{children:p.length>0?`Agent is working... ${m(p)}`:"Agent is working..."}),[0,150,300].map(i=>t(n,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${i}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},i))]})})})})})]});export{l as default};
1
+ import{jsxs as i,jsx as t,Fragment as r}from"react/jsx-runtime";import e from"../AgentActivity/AgentActivity.mjs";import n from"@mui/material/Box";import{Stack as o}from"../../_Primitives/Stack.mjs";import{Caption as a}from"../../Typography.mjs";import c from"./ChatResponseMarkdown.mjs";import{latestTraceLabel as m}from"./latestTraceLabel.mjs";const s=()=>t(n,{sx:{display:"inline-block",width:"2px",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}}}}),l=({text:l,traceEvents:p,highlightQuery:g,avatarIcon:h,compact:d=!1,showActivity:x=!1})=>i(o,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[h&&t(n,{sx:{mt:.25,flexShrink:0},children:h}),t(o,{spacing:1,sx:{flex:1,minWidth:0},children:x?i(r,{children:[t(e,{isStreaming:!0,traceEvents:p}),l&&i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]})]}):t(r,{children:l?i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]}):t(n,{sx:{bgcolor:"background.default",px:1.75,py:1.25},children:t(o,{direction:"row",spacing:1,sx:{alignItems:"center"},children:i(o,{direction:"row",spacing:.5,children:[t(a,{children:p.length>0?`Agent is working... ${m(p)}`:"Agent is working..."}),[0,150,300].map(i=>t(n,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${i}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},i))]})})})})})]});export{l as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Box as i}from"../../_Primitives/Box.mjs";import{Stack as t}from"../../_Primitives/Stack.mjs";import{Body2 as o}from"../../Typography.mjs";import{useTheme as a}from"@mui/material/styles";import{colours as n}from"../../Theme/tokens.mjs";const m=({traceLabel:m,avatarIcon:s})=>{const c="dark"===a().palette.mode?n.jadeLight:n.jadeDark;return r(t,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[s&&e(i,{sx:{mt:.25,flexShrink:0},children:s}),e(i,{sx:{borderRadius:"1rem 1rem 1rem 0.25rem",border:"1px solid",borderColor:"divider",bgcolor:"background.default",px:1.75,py:1.25},children:r(t,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e(o,{sx:{color:"text.primary",fontWeight:600,opacity:1},children:m?`Agent is working... ${m}`:"Agent is working..."}),e(t,{direction:"row",spacing:.5,children:[0,150,300].map(r=>e(i,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:c,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))})]})})]})};export{m as default};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import{Stack as t}from"../../_Primitives/Stack.mjs";import{Body2 as o}from"../../Typography.mjs";import{useTheme as a}from"@mui/material/styles";import{colours as n}from"../../Theme/tokens.mjs";const m=({traceLabel:m,avatarIcon:s})=>{const c="dark"===a().palette.mode?n.jadeLight:n.jadeDark;return r(t,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[s&&e(i,{sx:{mt:.25,flexShrink:0},children:s}),e(i,{sx:{borderRadius:"1rem 1rem 1rem 0.25rem",border:"1px solid",borderColor:"divider",bgcolor:"background.default",px:1.75,py:1.25},children:r(t,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e(o,{sx:{color:"text.primary",fontWeight:600,opacity:1},children:m?`Agent is working... ${m}`:"Agent is working..."}),e(t,{direction:"row",spacing:.5,children:[0,150,300].map(r=>e(i,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:c,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))})]})})]})};export{m as default};
@@ -1 +1 @@
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};
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 a from"@mui/material/Box";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:M=300,width:P=288,sx:L,formatMessageCount:R=e=>`${e} messages`,isCollapsed:W=!1,onToggleCollapse:$,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:W?_:P,minWidth:W?_:0,flexShrink:0,borderRight:1,borderColor:"divider",overflow:"hidden",transition:"width 0.2s ease, min-width 0.2s ease",display:"flex",flexDirection:"column"},children:W?e(c,{sx:{justifyContent:"center",alignItems:"center",py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:e(d,{onClick:$,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:$,onSearchChange:Q,searchPlaceholder:N,searchDebounceMs:M}),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:R},t.id))})]})]})]})})};export{f as ChatHistory};
@@ -1 +1 @@
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
+ 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 l from"@mui/material/Box";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:y=!1,sx:v})=>{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(v)?v:v?[v]:[]],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)}),y&&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 t}from"react/jsx-runtime";import{useId as o,useState as i}from"react";import r from"@mui/icons-material/Send";import l from"@mui/icons-material/Stop";import{Box as n}from"../_Primitives/Box.mjs";import{IconButton as a}from"../Buttons/IconButton.mjs";import{Paper as s}from"../_Primitives/Paper.mjs";import{TextField as m}from"../_Primitives/TextField.mjs";import{colours as d}from"../Theme/tokens.mjs";const p=({onSend:p,disabled:c=!1,placeholder:u="Ask about campaigns, performance…",maxRows:f=5,sendButtonTitle:h="Send message",isStreaming:b=!1,onStop:x,stopButtonTitle:g="Stop generating",actions:v,value:S,onChange:y,inputRef:j,label:k="Message"})=>{const w=o(),[z,B]=i(""),R=void 0!==S,I=R?S:z,P=e=>{R?y?.(e):B(e)},T=d.jadeLight,C=d.black,D=()=>{const e=I.trim();e&&!c&&(p(e),P(""))};return e(n,{component:"form",onSubmit:e=>{e.preventDefault(),b||D()},sx:{display:"flex",alignItems:"center",gap:1},children:[t("label",{htmlFor:w,style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0},children:k}),e(s,{variant:"outlined",sx:{display:"flex",flex:1,alignItems:"center",gap:1,px:1.5,py:.75,borderRadius:2,borderColor:"text.jades"},children:[t(m,{variant:"standard",fullWidth:!0,multiline:!0,minRows:1,maxRows:f,value:I,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),b||D())},placeholder:u,disabled:c,inputRef:j,slotProps:{htmlInput:{id:w,"aria-label":u},input:{disableUnderline:!0}},sx:{"& .MuiInputBase-input":{p:.5,fontSize:"0.875rem",color:"text.primary",resize:"none","&::placeholder":{color:"text.disabled",opacity:1}}}}),v,t(a,b&&x?{type:"button",title:g,onClick:x,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:"error.main",color:"error.contrastText","&:hover":{bgcolor:"error.dark"}},children:t(l,{sx:{fontSize:13}})}:{type:"submit",title:h,disabled:!I.trim()||c,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:T,color:C,"&:hover":{bgcolor:d.jade},"&.Mui-disabled":{bgcolor:T,color:C,opacity:.4}},children:t(r,{sx:{fontSize:13}})})]})]})};export{p as ChatInput};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useId as o,useState as r}from"react";import i from"@mui/icons-material/Send";import l from"@mui/icons-material/Stop";import n from"@mui/material/Box";import{IconButton as a}from"../Buttons/IconButton.mjs";import{Paper as s}from"../_Primitives/Paper.mjs";import{TextField as m}from"../_Primitives/TextField.mjs";import{colours as d}from"../Theme/tokens.mjs";const p=({onSend:p,disabled:c=!1,placeholder:u="Ask about campaigns, performance…",maxRows:f=5,sendButtonTitle:h="Send message",isStreaming:b=!1,onStop:x,stopButtonTitle:g="Stop generating",actions:v,value:S,onChange:y,inputRef:j,label:k="Message"})=>{const w=o(),[z,B]=r(""),R=void 0!==S,I=R?S:z,T=e=>{R?y?.(e):B(e)},C=d.jadeLight,P=d.black,D=()=>{const e=I.trim();e&&!c&&(p(e),T(""))};return e(n,{component:"form",onSubmit:e=>{e.preventDefault(),b||D()},sx:{display:"flex",alignItems:"center",gap:1},children:[t("label",{htmlFor:w,style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0},children:k}),e(s,{variant:"outlined",sx:{display:"flex",flex:1,alignItems:"center",gap:1,px:1.5,py:.75,borderRadius:2,borderColor:"text.jades"},children:[t(m,{variant:"standard",fullWidth:!0,multiline:!0,minRows:1,maxRows:f,value:I,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),b||D())},placeholder:u,disabled:c,inputRef:j,slotProps:{htmlInput:{id:w,"aria-label":u},input:{disableUnderline:!0}},sx:{"& .MuiInputBase-input":{p:.5,fontSize:"0.875rem",color:"text.primary",resize:"none","&::placeholder":{color:"text.disabled",opacity:1}}}}),v,t(a,b&&x?{type:"button",title:g,onClick:x,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:"error.main",color:"error.contrastText","&:hover":{bgcolor:"error.dark"}},children:t(l,{sx:{fontSize:13}})}:{type:"submit",title:h,disabled:!I.trim()||c,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:C,color:P,"&:hover":{bgcolor:d.jade},"&.Mui-disabled":{bgcolor:C,color:P,opacity:.4}},children:t(i,{sx:{fontSize:13}})})]})]})};export{p as ChatInput};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Box as s}from"../_Primitives/Box.mjs";import{AiButton as i}from"../Buttons/AiButton.mjs";const m=({onOpen:m,fabLabel:o,placement:n="bottom-right"})=>t(s,{sx:{position:"fixed",bottom:{xs:16,sm:24},..."bottom-left"===n?{left:{xs:16,sm:24}}:{right:{xs:16,sm:24}},zIndex:t=>t.zIndex.appBar+50},children:t(i,{onClick:m,"aria-label":o,label:t(s,{component:"span",sx:{display:{xs:"none",sm:"inline"}},children:o}),sx:{"& .MuiButton-startIcon":{marginRight:{xs:0,sm:"8px"},marginLeft:{xs:0,sm:"-4px"}},minWidth:{xs:0,sm:64},width:{xs:"37px",sm:"auto"},height:{xs:"37px",sm:"auto"},padding:{xs:0,sm:"6px 16px"}}})});export{m as FABButton};
1
+ import{jsx as t}from"react/jsx-runtime";import s from"@mui/material/Box";import{AiButton as i}from"../Buttons/AiButton.mjs";const m=({onOpen:m,fabLabel:o,placement:n="bottom-right"})=>t(s,{sx:{position:"fixed",bottom:{xs:16,sm:24},..."bottom-left"===n?{left:{xs:16,sm:24}}:{right:{xs:16,sm:24}},zIndex:t=>t.zIndex.appBar+50},children:t(i,{onClick:m,"aria-label":o,label:t(s,{component:"span",sx:{display:{xs:"none",sm:"inline"}},children:o}),sx:{"& .MuiButton-startIcon":{marginRight:{xs:0,sm:"8px"},marginLeft:{xs:0,sm:"-4px"}},minWidth:{xs:0,sm:64},width:{xs:"37px",sm:"auto"},height:{xs:"37px",sm:"auto"},padding:{xs:0,sm:"6px 16px"}}})});export{m as FABButton};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Box as i}from"../../_Primitives/Box.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../../Theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"../ChatComponents/MarkdownContent.mjs";import"../../../node_modules/dompurify/dist/purify.es.mjs";import"../../Typography.mjs";import"../../MetricStat.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 m from"../ChatComponents/MessageList.mjs";import o from"../ChatComponents/EmptyState.mjs";const e=({avatarIcon:e,isTyping:r,liveTraceEvents:a,messages:s,showActivity:n,streamingText:p,emptyTitle:c,emptyDescription:l,dataSources:u,suggestedPrompts:d,onSend:h})=>{const C=s.length>0||r;return t(i,{sx:{flex:"1 1 0",minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:C?t(m,{messages:s,isTyping:r,streamingText:p,liveTraceEvents:a,avatarIcon:e,showActivity:n,compact:!0}):t(o,{title:c,description:l,dataSources:u,prompts:d.slice(0,4),avatarIcon:e,onSelect:h})})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"@mui/material/Box";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../../Theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"../ChatComponents/MarkdownContent.mjs";import"../../../node_modules/dompurify/dist/purify.es.mjs";import"../../Typography.mjs";import"../../MetricStat.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 m from"../ChatComponents/MessageList.mjs";import o from"../ChatComponents/EmptyState.mjs";const e=({avatarIcon:e,isTyping:r,liveTraceEvents:a,messages:s,showActivity:n,streamingText:p,emptyTitle:c,emptyDescription:l,dataSources:u,suggestedPrompts:d,onSend:h})=>{const C=s.length>0||r;return t(i,{sx:{flex:"1 1 0",minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:C?t(m,{messages:s,isTyping:r,streamingText:p,liveTraceEvents:a,avatarIcon:e,showActivity:n,compact:!0}):t(o,{title:c,description:l,dataSources:u,prompts:d.slice(0,4),avatarIcon:e,onSelect:h})})};export{e as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Box as r}from"../../_Primitives/Box.mjs";import{ChatInput as e}from"../ChatInput.mjs";const i=({placeholder:i,isStreaming:n,onStop:t,onSend:p})=>o(r,{sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",p:1.5,flexShrink:0},children:o(e,{onSend:p,isStreaming:n,onStop:t,placeholder:i})});export{i as default};
1
+ import{jsx as o}from"react/jsx-runtime";import r from"@mui/material/Box";import{ChatInput as e}from"../ChatInput.mjs";const i=({placeholder:i,isStreaming:n,onStop:t,onSend:p})=>o(r,{sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",p:1.5,flexShrink:0},children:o(e,{onSend:p,isStreaming:n,onStop:t,placeholder:i})});export{i as default};
@@ -1 +1 @@
1
- import{jsxs as n,Fragment as r,jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as o,useCallback as d}from"react";import{Root as a,Trigger as i,Portal as s,Content as p}from"../node_modules/@radix-ui/react-popover/dist/index.mjs";import{DayPicker as l}from"react-day-picker";import{startOfDay as m,isAfter as c,isBefore as b,subDays as h,format as y}from"date-fns";import u from"@mui/icons-material/CalendarToday";import g from"@mui/icons-material/ChevronLeft";import f from"@mui/icons-material/ChevronRight";import v from"@mui/material/GlobalStyles";import{Box as k}from"./_Primitives/Box.mjs";import{Caption as x}from"./Typography.mjs";import{Chip as w}from"./_Primitives/Chip.mjs";import{Divider as C}from"./_Primitives/Divider.mjs";import{Paper as j}from"./_Primitives/Paper.mjs";import{SecondaryButton as _}from"./Buttons/SecondaryButton.mjs";import{Stack as M}from"./_Primitives/Stack.mjs";import{useTheme as D,alpha as S}from"@mui/material";import{colours as R}from"./Theme/tokens.mjs";const z=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}],P=({startDate:P,endDate:T,onChange:I,dataAvailableThrough:L,earliestStartDate:G,className:O})=>{const[$,A]=t(!1),B="dark"===D().palette.mode,N=R.brilliantGreen,W=S(N,.2),F=B?R.white:R.black,Y=B?R.lightGrey:R.darkGrey,H=o(()=>L??m(new Date),[L]),q=o(()=>G?m(G):void 0,[G]),E=d(n=>{const r=m(n);return!!c(r,H)||!(!q||!b(r,q))},[H,q]),J=d(n=>{const r=H,e=h(r,n-1),t=q&&b(e,q)?q:e;I({startDate:t,endDate:r})},[H,q,I]),K=d(n=>{I({startDate:n?.from,endDate:n?.to})},[I]),Q=o(()=>{if(!P&&!T)return"Select dates";const n=n=>y(n,"MMM d, yyyy");return P&&T?P.getFullYear()===T.getFullYear()?`${r=P,y(r,"MMM d")} - ${n(T)}`:`${n(P)} - ${n(T)}`:P?n(P):T?n(T):"Select dates";var r},[P,T]),U=o(()=>P||h(H,30),[P,H]);return n(r,{children:[e(v,{styles:{".rdp-nn-root":{padding:16},".rdp-nn-months":{display:"flex",gap:16},"@media (max-width: 899px)":{".rdp-nn-months":{flexDirection:"column"}},".rdp-nn-month":{position:"relative"},".rdp-nn-month-caption":{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:4,minHeight:28},".rdp-nn-caption-label":{fontSize:"0.875rem",fontWeight:500,color:F},".rdp-nn-nav":{display:"flex",alignItems:"center",gap:4},".rdp-nn-weekdays":{display:"flex"},".rdp-nn-weekday":{width:36,borderRadius:6,fontSize:"0.8rem",fontWeight:400,textAlign:"center"},".rdp-nn-week":{display:"flex",width:"100%",marginTop:8},".rdp-nn-day":{position:"relative",width:36,height:36,padding:0,textAlign:"center"},".rdp-nn-day-btn":{width:36,height:36,padding:0,border:0,borderRadius:999,backgroundColor:"transparent",color:F,cursor:"pointer",font:"inherit",transition:"background-color 150ms ease"},".rdp-nn-day-btn:hover":{backgroundColor:W},".rdp-nn-nav-btn":{position:"absolute",top:0,width:28,height:28,padding:0,border:0,backgroundColor:"transparent",color:Y,opacity:.5,cursor:"pointer",transition:"opacity 150ms ease"},".rdp-nn-nav-btn:hover":{opacity:1},".rdp-nn-button-previous":{left:4},".rdp-nn-button-next":{right:4},".rdp-nn-weekday, .rdp-nn-nav-btn":{color:Y},".rdp-nn-outside .rdp-nn-day-btn, .rdp-nn-disabled .rdp-nn-day-btn":{color:Y,opacity:.4},".rdp-nn-disabled .rdp-nn-day-btn:hover":{backgroundColor:"transparent",cursor:"not-allowed"},".rdp-nn-selected":{backgroundColor:N,borderRadius:"50%"},".rdp-nn-selected .rdp-nn-day-btn":{color:R.black},".rdp-nn-selected .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-start":{backgroundColor:N,borderRadius:"50% 0 0 50%"},".rdp-nn-range-start .rdp-nn-day-btn":{color:R.black},".rdp-nn-range-start .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-end":{backgroundColor:N,borderRadius:"0 50% 50% 0"},".rdp-nn-range-end .rdp-nn-day-btn":{color:R.black},".rdp-nn-range-end .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-middle":{backgroundColor:W,borderRadius:0},".rdp-nn-today .rdp-nn-day-btn":{fontWeight:700}}}),n(a,{open:$,onOpenChange:A,children:[e(i,{asChild:!0,children:e(_,{size:"small",startIcon:e(u,{sx:{fontSize:14}}),className:O,children:Q})}),e(s,{children:e(p,{align:"end",sideOffset:8,style:{zIndex:1300},children:n(j,{sx:{p:0,overflow:"hidden",borderRadius:1},children:[e(M,{direction:"row",spacing:1,sx:{p:2},children:z.map(n=>e(w,{label:n.label,size:"small",onClick:()=>J(n.days),variant:"outlined",clickable:!0},n.days))}),e(C,{}),n(M,{direction:"row",spacing:1,sx:{px:2,py:1,alignItems:"center"},children:[e(k,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"primary.main",flexShrink:0}}),n(x,{children:["Data available through ",y(H,"MMM d, yyyy")]})]}),e(l,{mode:"range",numberOfMonths:2,selected:P||T?{from:P,to:T}:void 0,onSelect:K,defaultMonth:U,startMonth:q,endMonth:H,disabled:E,navLayout:"around",showOutsideDays:!0,classNames:{root:"rdp-nn-root",months:"rdp-nn-months",month:"rdp-nn-month",month_caption:"rdp-nn-month-caption",caption_label:"rdp-nn-caption-label",nav:"rdp-nn-nav",button_previous:"rdp-nn-nav-btn rdp-nn-button-previous",button_next:"rdp-nn-nav-btn rdp-nn-button-next",weekdays:"rdp-nn-weekdays",weekday:"rdp-nn-weekday",week:"rdp-nn-week",day:"rdp-nn-day",day_button:"rdp-nn-day-btn",range_start:"rdp-nn-range-start",range_end:"rdp-nn-range-end",range_middle:"rdp-nn-range-middle",selected:"rdp-nn-selected",today:"rdp-nn-today",outside:"rdp-nn-outside",disabled:"rdp-nn-disabled"},components:{Chevron:({orientation:n,...r})=>e("left"===n?g:f,{sx:{fontSize:16},...r})}})]})})})]})]})};export{P as DateRangeFilter};
1
+ import{jsxs as n,Fragment as r,jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as o,useCallback as d}from"react";import{Root as a,Trigger as i,Portal as p,Content as s}from"../node_modules/@radix-ui/react-popover/dist/index.mjs";import{DayPicker as l}from"react-day-picker";import{startOfDay as m,isAfter as c,isBefore as b,subDays as h,format as y}from"date-fns";import u from"@mui/icons-material/CalendarToday";import g from"@mui/icons-material/ChevronLeft";import f from"@mui/icons-material/ChevronRight";import v from"@mui/material/GlobalStyles";import k from"@mui/material/Box";import{Caption as x}from"./Typography.mjs";import{Chip as w}from"./_Primitives/Chip.mjs";import{Divider as C}from"./_Primitives/Divider.mjs";import{Paper as j}from"./_Primitives/Paper.mjs";import{SecondaryButton as M}from"./Buttons/SecondaryButton.mjs";import{Stack as _}from"./_Primitives/Stack.mjs";import{useTheme as D,alpha as S}from"@mui/material";import{colours as R}from"./Theme/tokens.mjs";const z=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}],T=({startDate:T,endDate:I,onChange:L,dataAvailableThrough:P,earliestStartDate:G,className:O})=>{const[$,A]=t(!1),B="dark"===D().palette.mode,N=R.brilliantGreen,W=S(N,.2),F=B?R.white:R.black,Y=B?R.lightGrey:R.darkGrey,H=o(()=>P??m(new Date),[P]),q=o(()=>G?m(G):void 0,[G]),E=d(n=>{const r=m(n);return!!c(r,H)||!(!q||!b(r,q))},[H,q]),J=d(n=>{const r=H,e=h(r,n-1),t=q&&b(e,q)?q:e;L({startDate:t,endDate:r})},[H,q,L]),K=d(n=>{L({startDate:n?.from,endDate:n?.to})},[L]),Q=o(()=>{if(!T&&!I)return"Select dates";const n=n=>y(n,"MMM d, yyyy");return T&&I?T.getFullYear()===I.getFullYear()?`${r=T,y(r,"MMM d")} - ${n(I)}`:`${n(T)} - ${n(I)}`:T?n(T):I?n(I):"Select dates";var r},[T,I]),U=o(()=>T||h(H,30),[T,H]);return n(r,{children:[e(v,{styles:{".rdp-nn-root":{padding:16},".rdp-nn-months":{display:"flex",gap:16},"@media (max-width: 899px)":{".rdp-nn-months":{flexDirection:"column"}},".rdp-nn-month":{position:"relative"},".rdp-nn-month-caption":{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:4,minHeight:28},".rdp-nn-caption-label":{fontSize:"0.875rem",fontWeight:500,color:F},".rdp-nn-nav":{display:"flex",alignItems:"center",gap:4},".rdp-nn-weekdays":{display:"flex"},".rdp-nn-weekday":{width:36,borderRadius:6,fontSize:"0.8rem",fontWeight:400,textAlign:"center"},".rdp-nn-week":{display:"flex",width:"100%",marginTop:8},".rdp-nn-day":{position:"relative",width:36,height:36,padding:0,textAlign:"center"},".rdp-nn-day-btn":{width:36,height:36,padding:0,border:0,borderRadius:999,backgroundColor:"transparent",color:F,cursor:"pointer",font:"inherit",transition:"background-color 150ms ease"},".rdp-nn-day-btn:hover":{backgroundColor:W},".rdp-nn-nav-btn":{position:"absolute",top:0,width:28,height:28,padding:0,border:0,backgroundColor:"transparent",color:Y,opacity:.5,cursor:"pointer",transition:"opacity 150ms ease"},".rdp-nn-nav-btn:hover":{opacity:1},".rdp-nn-button-previous":{left:4},".rdp-nn-button-next":{right:4},".rdp-nn-weekday, .rdp-nn-nav-btn":{color:Y},".rdp-nn-outside .rdp-nn-day-btn, .rdp-nn-disabled .rdp-nn-day-btn":{color:Y,opacity:.4},".rdp-nn-disabled .rdp-nn-day-btn:hover":{backgroundColor:"transparent",cursor:"not-allowed"},".rdp-nn-selected":{backgroundColor:N,borderRadius:"50%"},".rdp-nn-selected .rdp-nn-day-btn":{color:R.black},".rdp-nn-selected .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-start":{backgroundColor:N,borderRadius:"50% 0 0 50%"},".rdp-nn-range-start .rdp-nn-day-btn":{color:R.black},".rdp-nn-range-start .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-end":{backgroundColor:N,borderRadius:"0 50% 50% 0"},".rdp-nn-range-end .rdp-nn-day-btn":{color:R.black},".rdp-nn-range-end .rdp-nn-day-btn:hover":{backgroundColor:R.jade},".rdp-nn-range-middle":{backgroundColor:W,borderRadius:0},".rdp-nn-today .rdp-nn-day-btn":{fontWeight:700}}}),n(a,{open:$,onOpenChange:A,children:[e(i,{asChild:!0,children:e(M,{size:"small",startIcon:e(u,{sx:{fontSize:14}}),className:O,children:Q})}),e(p,{children:e(s,{align:"end",sideOffset:8,style:{zIndex:1300},children:n(j,{sx:{p:0,overflow:"hidden",borderRadius:1},children:[e(_,{direction:"row",spacing:1,sx:{p:2},children:z.map(n=>e(w,{label:n.label,size:"small",onClick:()=>J(n.days),variant:"outlined",clickable:!0},n.days))}),e(C,{}),n(_,{direction:"row",spacing:1,sx:{px:2,py:1,alignItems:"center"},children:[e(k,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"primary.main",flexShrink:0}}),n(x,{children:["Data available through ",y(H,"MMM d, yyyy")]})]}),e(l,{mode:"range",numberOfMonths:2,selected:T||I?{from:T,to:I}:void 0,onSelect:K,defaultMonth:U,startMonth:q,endMonth:H,disabled:E,navLayout:"around",showOutsideDays:!0,classNames:{root:"rdp-nn-root",months:"rdp-nn-months",month:"rdp-nn-month",month_caption:"rdp-nn-month-caption",caption_label:"rdp-nn-caption-label",nav:"rdp-nn-nav",button_previous:"rdp-nn-nav-btn rdp-nn-button-previous",button_next:"rdp-nn-nav-btn rdp-nn-button-next",weekdays:"rdp-nn-weekdays",weekday:"rdp-nn-weekday",week:"rdp-nn-week",day:"rdp-nn-day",day_button:"rdp-nn-day-btn",range_start:"rdp-nn-range-start",range_end:"rdp-nn-range-end",range_middle:"rdp-nn-range-middle",selected:"rdp-nn-selected",today:"rdp-nn-today",outside:"rdp-nn-outside",disabled:"rdp-nn-disabled"},components:{Chevron:({orientation:n,...r})=>e("left"===n?g:f,{sx:{fontSize:16},...r})}})]})})})]})]})};export{T as DateRangeFilter};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as r,Fragment as e}from"react/jsx-runtime";import{useState as i,useMemo as o,useCallback as a}from"react";import{Popover as l}from"@mui/material";import{LocalizationProvider as m,DatePicker as n}from"@mui/x-date-pickers";import{AdapterDateFns as s}from"@mui/x-date-pickers/AdapterDateFns";import d from"@mui/icons-material/CalendarToday";import{startOfDay as c,isAfter as p,subDays as f,isBefore as h,format as u}from"date-fns";import{Box as x}from"./_Primitives/Box.mjs";import{Caption as v}from"./Typography.mjs";import{Chip as y}from"./_Primitives/Chip.mjs";import{Divider as g}from"./_Primitives/Divider.mjs";import{Paper as b}from"./_Primitives/Paper.mjs";import{SecondaryButton as D}from"./Buttons/SecondaryButton.mjs";import{Stack as P}from"./_Primitives/Stack.mjs";const j=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}];function C(t){return t?c(t):void 0}function k(t,r,e){if(!t)return;const i=C(t);return i?r&&h(i,r)?r:e&&p(i,e)?e:i:void 0}const w=({value:w,onChange:z,presets:M=j,minDate:F,maxDate:L,className:S,emptyLabel:W="Select dates",availabilityLabel:_})=>{const[B,$]=i(null),T=o(()=>C(F),[F]),A=o(()=>c(L??new Date),[L]),E=o(()=>k(w.from,T,A),[w.from,T,A]),I=o(()=>k(w.to,T,A),[w.to,T,A]),N=o(()=>{if(!E&&!I)return W;const t=t=>u(t,"MMM d, yyyy");return E&&I?E.getFullYear()===I.getFullYear()?`${r=E,u(r,"MMM d")} - ${t(I)}`:`${t(E)} - ${t(I)}`:t(E||I);var r},[E,I,W]),O=a(t=>{const r=k(t.from,T,A),e=k(t.to,T,A);r&&e&&p(r,e)?z({from:r,to:r}):z({from:r,to:e})},[z,T,A]),Y=a(t=>{$(t.currentTarget)},[]),q=a(()=>{$(null)},[]),G=a(t=>{const r=A,e=f(r,t-1);O({from:T&&h(e,T)?T:e,to:r})},[A,T,O]);return t(m,{dateAdapter:s,children:r(e,{children:[t(D,{size:"small",startIcon:t(d,{sx:{fontSize:14}}),className:S,onClick:Y,children:N}),t(l,{open:Boolean(B),anchorEl:B,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{mt:1}}},children:r(b,{sx:{p:0,minWidth:360,maxWidth:720,overflow:"hidden"},children:[M.length>0&&r(e,{children:[t(P,{direction:"row",spacing:1,sx:{p:2,flexWrap:"wrap"},children:M.map(r=>t(y,{label:r.label,size:"small",variant:"outlined",clickable:!0,onClick:()=>G(r.days)},r.label))}),t(g,{})]}),_&&r(e,{children:[t(v,{sx:{display:"block",px:2,py:1.25},children:_}),t(g,{})]}),r(P,{direction:{xs:"column",md:"row"},spacing:2,sx:{p:2,alignItems:"flex-start"},children:[t(x,{sx:{width:{xs:"100%",md:280}},children:t(n,{label:"Start date",value:E??null,onChange:t=>O({from:t??void 0,to:I}),minDate:T,maxDate:I??A,slotProps:{textField:{size:"small",fullWidth:!0}}})}),t(x,{sx:{width:{xs:"100%",md:280}},children:t(n,{label:"End date",value:I??null,onChange:t=>O({from:E,to:t??void 0}),minDate:E??T,maxDate:A,slotProps:{textField:{size:"small",fullWidth:!0}}})})]})]})})]})})};export{w as DateRangePicker};
1
+ import{jsx as t,jsxs as r,Fragment as e}from"react/jsx-runtime";import{useState as i,useMemo as o,useCallback as a}from"react";import{Popover as l}from"@mui/material";import{LocalizationProvider as m,DatePicker as n}from"@mui/x-date-pickers";import{AdapterDateFns as s}from"@mui/x-date-pickers/AdapterDateFns";import d from"@mui/icons-material/CalendarToday";import{startOfDay as c,isAfter as p,subDays as f,isBefore as h,format as u}from"date-fns";import x from"@mui/material/Box";import{Caption as y}from"./Typography.mjs";import{Chip as v}from"./_Primitives/Chip.mjs";import{Divider as g}from"./_Primitives/Divider.mjs";import{Paper as b}from"./_Primitives/Paper.mjs";import{SecondaryButton as D}from"./Buttons/SecondaryButton.mjs";import{Stack as C}from"./_Primitives/Stack.mjs";const P=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}];function j(t){return t?c(t):void 0}function k(t,r,e){if(!t)return;const i=j(t);return i?r&&h(i,r)?r:e&&p(i,e)?e:i:void 0}const w=({value:w,onChange:z,presets:M=P,minDate:F,maxDate:L,className:S,emptyLabel:W="Select dates",availabilityLabel:B})=>{const[$,_]=i(null),T=o(()=>j(F),[F]),A=o(()=>c(L??new Date),[L]),E=o(()=>k(w.from,T,A),[w.from,T,A]),I=o(()=>k(w.to,T,A),[w.to,T,A]),N=o(()=>{if(!E&&!I)return W;const t=t=>u(t,"MMM d, yyyy");return E&&I?E.getFullYear()===I.getFullYear()?`${r=E,u(r,"MMM d")} - ${t(I)}`:`${t(E)} - ${t(I)}`:t(E||I);var r},[E,I,W]),O=a(t=>{const r=k(t.from,T,A),e=k(t.to,T,A);r&&e&&p(r,e)?z({from:r,to:r}):z({from:r,to:e})},[z,T,A]),Y=a(t=>{_(t.currentTarget)},[]),q=a(()=>{_(null)},[]),G=a(t=>{const r=A,e=f(r,t-1);O({from:T&&h(e,T)?T:e,to:r})},[A,T,O]);return t(m,{dateAdapter:s,children:r(e,{children:[t(D,{size:"small",startIcon:t(d,{sx:{fontSize:14}}),className:S,onClick:Y,children:N}),t(l,{open:Boolean($),anchorEl:$,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{mt:1}}},children:r(b,{sx:{p:0,minWidth:360,maxWidth:720,overflow:"hidden"},children:[M.length>0&&r(e,{children:[t(C,{direction:"row",spacing:1,sx:{p:2,flexWrap:"wrap"},children:M.map(r=>t(v,{label:r.label,size:"small",variant:"outlined",clickable:!0,onClick:()=>G(r.days)},r.label))}),t(g,{})]}),B&&r(e,{children:[t(y,{sx:{display:"block",px:2,py:1.25},children:B}),t(g,{})]}),r(C,{direction:{xs:"column",md:"row"},spacing:2,sx:{p:2,alignItems:"flex-start"},children:[t(x,{sx:{width:{xs:"100%",md:280}},children:t(n,{label:"Start date",value:E??null,onChange:t=>O({from:t??void 0,to:I}),minDate:T,maxDate:I??A,slotProps:{textField:{size:"small",fullWidth:!0}}})}),t(x,{sx:{width:{xs:"100%",md:280}},children:t(n,{label:"End date",value:I??null,onChange:t=>O({from:E,to:t??void 0}),minDate:E??T,maxDate:A,slotProps:{textField:{size:"small",fullWidth:!0}}})})]})]})})]})})};export{w as DateRangePicker};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{GlassPaper as i}from"./GlassPaper.mjs";import{Box as n}from"./_Primitives/Box.mjs";import{H3 as l,Body2 as s}from"./Typography.mjs";import{LoadingSpinnerNexus as t}from"./LoadingSpinnerNexus.mjs";const o=({title:o,description:c,actions:m,isLoading:d,isError:x,errorMessage:h,children:a,...p})=>{if(d)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(t,{})})]});if(x)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(s,{color:"error",sx:{p:2},children:h??`Failed to load ${o}.`})})]});const f=o||c||m;return r(i,{...p,children:[f&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:2.5},children:[r(n,{children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),m&&e(n,{sx:{flexShrink:0},children:m})]}),a]})};export{o as GlassPaperAsync};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{GlassPaper as i}from"./GlassPaper.mjs";import n from"@mui/material/Box";import{H3 as l,Body2 as t}from"./Typography.mjs";import{LoadingSpinnerNexus as s}from"./LoadingSpinnerNexus.mjs";const o=({title:o,description:c,actions:m,isLoading:d,isError:x,errorMessage:h,children:a,...p})=>{if(d)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(t,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(s,{})})]});if(x)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(t,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(t,{color:"error",sx:{p:2},children:h??`Failed to load ${o}.`})})]});const f=o||c||m;return r(i,{...p,children:[f&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:2.5},children:[r(n,{children:[e(l,{children:o}),c&&e(t,{sx:{mt:.5},children:c})]}),m&&e(n,{sx:{flexShrink:0},children:m})]}),a]})};export{o as GlassPaperAsync};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{Box as t}from"./_Primitives/Box.mjs";import{NexusLogoNode as r}from"./Logo/NexusLogoNode.mjs";const s={small:40,large:140},n=({size:t})=>e("svg",{width:t,height:t,viewBox:"42 42 116 116",xmlns:"http://www.w3.org/2000/svg",children:e("g",{transform:"translate(100, 100)",children:e(r,{})})}),i=({variant:r="small"})=>{const i=s[r];return e(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"auto"},children:e(t,{sx:{width:i,height:i,"@keyframes snl-spin":{"0%":{transform:"rotate(0deg) scale(1)"},"25%":{transform:"rotate(90deg) scale(1.12)"},"50%":{transform:"rotate(180deg) scale(1)"},"75%":{transform:"rotate(270deg) scale(0.88)"},"100%":{transform:"rotate(360deg) scale(1)"}},animation:"snl-spin 2.4s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:e(n,{size:i})})})};export{i as LoadingSpinnerNexus};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"@mui/material/Box";import{NexusLogoNode as r}from"./Logo/NexusLogoNode.mjs";const a={small:40,large:140},n=({size:t})=>e("svg",{width:t,height:t,viewBox:"42 42 116 116",xmlns:"http://www.w3.org/2000/svg",children:e("g",{transform:"translate(100, 100)",children:e(r,{})})}),s=({variant:r="small"})=>{const s=a[r];return e(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"auto"},children:e(t,{sx:{width:s,height:s,"@keyframes snl-spin":{"0%":{transform:"rotate(0deg) scale(1)"},"25%":{transform:"rotate(90deg) scale(1.12)"},"50%":{transform:"rotate(180deg) scale(1)"},"75%":{transform:"rotate(270deg) scale(0.88)"},"100%":{transform:"rotate(360deg) scale(1)"}},animation:"snl-spin 2.4s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:e(n,{size:s})})})};export{s as LoadingSpinnerNexus};
@@ -1,7 +1,7 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{keyframes as o,alpha as t}from"@mui/material/styles";import a from"@mui/material/useMediaQuery";import{Box as i}from"./_Primitives/Box.mjs";import{Stack as s}from"./_Primitives/Stack.mjs";import{NexusNodeIcon as n}from"./Logo/NexusNodeIcon.mjs";import{colours as d}from"./Theme/tokens.mjs";import{useTokens as l}from"./Theme/useTokens.mjs";import{Caption as m}from"./Typography.mjs";const b=o`
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{keyframes as o,alpha as t}from"@mui/material/styles";import a from"@mui/material/useMediaQuery";import i from"@mui/material/Box";import{Stack as n}from"./_Primitives/Stack.mjs";import{NexusNodeIcon as s}from"./Logo/NexusNodeIcon.mjs";import{colours as d}from"./Theme/tokens.mjs";import{useTokens as l}from"./Theme/useTokens.mjs";import{Caption as m}from"./Typography.mjs";const b=o`
2
2
  from { transform: rotate(var(--orbit-angle)); }
3
3
  to { transform: rotate(calc(var(--orbit-angle) + 360deg)); }
4
4
  `,c=o`
5
5
  from { transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle))); }
6
6
  to { transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle) - 360deg)); }
7
- `,p=({labels:o,core:p,"aria-label":u,sx:g})=>{const x=l(),f=a("(prefers-reduced-motion: reduce)",{noSsr:!0}),h=o.slice(0,6),j={position:"absolute",borderRadius:"50%",border:`1px solid ${x.border}`};return r(i,{...u?{role:"img","aria-label":`${u}: ${h.join(", ")}`}:{"aria-hidden":!0},sx:[{position:"relative",aspectRatio:"1",width:"100%",maxWidth:450},...Array.isArray(g)?g:g?[g]:[]],children:[e(i,{"data-testid":"nexus-orbit-halo",sx:{position:"absolute",inset:"18%",borderRadius:"50%",backgroundColor:t(d.brilliantGreen,.07),filter:"blur(26px)"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"8%"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"22%",borderStyle:"dashed"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"36%",borderColor:d.jade}}),e(i,{"data-testid":"nexus-orbit-core",sx:{position:"absolute",inset:"41%",display:"grid",placeItems:"center",border:`1px solid ${d.jade}`,borderRadius:"24%",backgroundColor:x.background.paper,boxShadow:x.shadow,transform:"rotate(45deg)"},children:e(i,{sx:{display:"grid",placeItems:"center",transform:"rotate(-45deg)"},children:p??e(n,{size:"lg",tone:"brand"})})}),h.map((o,t)=>{const a=360*t/h.length-35;return e(i,{"data-testid":"nexus-orbit-track",sx:{"--orbit-angle":`${a}deg`,position:"absolute",inset:"8%",transform:"rotate(var(--orbit-angle))",animation:f?"none":`${b} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:e(i,{sx:{position:"absolute",left:"50%",top:0},children:r(s,{direction:"row","data-testid":"nexus-orbit-label",sx:{position:"absolute",alignItems:"center",gap:1,px:1.875,py:1.25,border:`1px solid ${x.border}`,borderRadius:"30px",backgroundColor:x.background.paper,boxShadow:x.shadow,whiteSpace:"nowrap",transform:"translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle)))",animation:f?"none":`${c} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:[e(i,{sx:{width:6,height:6,borderRadius:"50%",backgroundColor:d.jade}}),e(m,{sx:{fontSize:11,letterSpacing:"0.05em"},children:o})]})})},`${t}-${o}`)})]})};p.displayName="NexusOrbit";export{p as NexusOrbit};
7
+ `,p=({labels:o,core:p,"aria-label":u,sx:g})=>{const x=l(),f=a("(prefers-reduced-motion: reduce)",{noSsr:!0}),h=o.slice(0,6),y={position:"absolute",borderRadius:"50%",border:`1px solid ${x.border}`};return r(i,{...u?{role:"img","aria-label":`${u}: ${h.join(", ")}`}:{"aria-hidden":!0},sx:[{position:"relative",aspectRatio:"1",width:"100%",maxWidth:450},...Array.isArray(g)?g:g?[g]:[]],children:[e(i,{"data-testid":"nexus-orbit-halo",sx:{position:"absolute",inset:"18%",borderRadius:"50%",backgroundColor:t(d.brilliantGreen,.07),filter:"blur(26px)"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...y,inset:"8%"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...y,inset:"22%",borderStyle:"dashed"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...y,inset:"36%",borderColor:d.jade}}),e(i,{"data-testid":"nexus-orbit-core",sx:{position:"absolute",inset:"41%",display:"grid",placeItems:"center",border:`1px solid ${d.jade}`,borderRadius:"24%",backgroundColor:x.background.paper,boxShadow:x.shadow,transform:"rotate(45deg)"},children:e(i,{sx:{display:"grid",placeItems:"center",transform:"rotate(-45deg)"},children:p??e(s,{size:"lg",tone:"brand"})})}),h.map((o,t)=>{const a=360*t/h.length-35;return e(i,{"data-testid":"nexus-orbit-track",sx:{"--orbit-angle":`${a}deg`,position:"absolute",inset:"8%",transform:"rotate(var(--orbit-angle))",animation:f?"none":`${b} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:e(i,{sx:{position:"absolute",left:"50%",top:0},children:r(n,{direction:"row","data-testid":"nexus-orbit-label",sx:{position:"absolute",alignItems:"center",gap:1,px:1.875,py:1.25,border:`1px solid ${x.border}`,borderRadius:"30px",backgroundColor:x.background.paper,boxShadow:x.shadow,whiteSpace:"nowrap",transform:"translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle)))",animation:f?"none":`${c} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:[e(i,{sx:{width:6,height:6,borderRadius:"50%",backgroundColor:d.jade}}),e(m,{sx:{fontSize:11,letterSpacing:"0.05em"},children:o})]})})},`${t}-${o}`)})]})};p.displayName="NexusOrbit";export{p as NexusOrbit};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Paper as i}from"./_Primitives/Paper.mjs";import{Box as n}from"./_Primitives/Box.mjs";import{H2 as t,H4 as l,H3 as s,Body2 as o}from"./Typography.mjs";import{LoadingSpinnerNexus as c}from"./LoadingSpinnerNexus.mjs";const m=({title:m,titleComponent:d="h3",titleSx:x,description:h,actions:p,isLoading:a,isError:f,errorMessage:u,children:g,...j})=>{const y="h2"===d?t:"h4"===d?l:s;if(a)return r(i,{...j,children:[r(n,{sx:{mb:2},children:[e(y,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(c,{})})]});if(f)return r(i,{...j,children:[r(n,{sx:{mb:2},children:[e(y,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(o,{color:"error",sx:{p:2},children:u??`Failed to load ${m}.`})})]});const b=m||h||p;return r(i,{...j,children:[b&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:1},children:[r(n,{children:[e(y,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),p&&e(n,{sx:{flexShrink:0},children:p})]}),g]})};export{m as PaperAsync};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Paper as i}from"./_Primitives/Paper.mjs";import n from"@mui/material/Box";import{H2 as t,H4 as l,H3 as s,Body2 as o}from"./Typography.mjs";import{LoadingSpinnerNexus as c}from"./LoadingSpinnerNexus.mjs";const m=({title:m,titleComponent:d="h3",titleSx:x,description:h,actions:a,isLoading:p,isError:f,errorMessage:u,children:g,...y})=>{const j="h2"===d?t:"h4"===d?l:s;if(p)return r(i,{...y,children:[r(n,{sx:{mb:2},children:[e(j,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(c,{})})]});if(f)return r(i,{...y,children:[r(n,{sx:{mb:2},children:[e(j,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(o,{color:"error",sx:{p:2},children:u??`Failed to load ${m}.`})})]});const b=m||h||a;return r(i,{...y,children:[b&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:1},children:[r(n,{children:[e(j,{sx:x,children:m}),h&&e(o,{sx:{mt:.5},children:h})]}),a&&e(n,{sx:{flexShrink:0},children:a})]}),g]})};export{m as PaperAsync};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alpha as r}from"@mui/material/styles";import t from"@mui/icons-material/ArrowDownwardRounded";import a from"@mui/icons-material/ArrowForwardRounded";import{Box as o}from"./_Primitives/Box.mjs";import{Stack as s}from"./_Primitives/Stack.mjs";import{Caption as n,H3 as m,Body2 as d}from"./Typography.mjs";const l=({steps:l,"aria-label":p,headingLevel:c=3,sx:h})=>e(o,{component:"ol","aria-label":p,sx:[e=>({listStyle:"none",m:0,p:0,width:"100%",maxWidth:1100,mx:"auto",display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:`repeat(${l.length}, minmax(0, 1fr))`},columnGap:e.spacing(10),rowGap:{xs:e.spacing(6),md:0},alignItems:"start",textAlign:"left"}),...Array.isArray(h)?h:h?[h]:[]],children:l.map(({icon:p,title:h,description:x},g)=>i(o,{component:"li",sx:{position:"relative",minWidth:0},children:[i(s,{sx:{gap:1},children:[i(s,{direction:"row",sx:{gap:1.25,alignItems:"center"},children:[e(o,{"aria-hidden":"true",sx:e=>({width:40,height:40,display:"grid",placeItems:"center",borderRadius:1.75,flexShrink:0,backgroundColor:r(e.palette.primary.main,"dark"===e.palette.mode?.22:.12)}),children:e(p,{sx:{fontSize:22,color:"primary.main"}})}),i(s,{sx:{minWidth:0},children:[i(n,{children:["Step ",g+1]}),e(m,{component:`h${c}`,sx:{overflowWrap:"anywhere"},children:h})]})]}),e(d,{sx:{overflowWrap:"anywhere"},children:x})]}),g<l.length-1&&i(o,{"aria-hidden":"true","data-testid":"process-steps-connector",sx:e=>({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",color:"primary.main",top:{xs:"100%",md:0},left:{xs:0,md:"100%"},width:{xs:"100%",md:e.spacing(10)},height:{xs:e.spacing(6),md:40}}),children:[e(a,{"data-testid":"process-steps-arrow-right",sx:{display:{xs:"none",md:"block"}}}),e(t,{"data-testid":"process-steps-arrow-down",sx:{display:{xs:"block",md:"none"}}})]})]},g))});l.displayName="ProcessSteps";export{l as ProcessSteps};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{alpha as i}from"@mui/material/styles";import t from"@mui/icons-material/ArrowDownwardRounded";import a from"@mui/icons-material/ArrowForwardRounded";import o from"@mui/material/Box";import{Stack as s}from"./_Primitives/Stack.mjs";import{Caption as n,H3 as m,Body2 as d}from"./Typography.mjs";const l=({steps:l,"aria-label":p,headingLevel:c=3,sx:h})=>e(o,{component:"ol","aria-label":p,sx:[e=>({listStyle:"none",m:0,p:0,width:"100%",maxWidth:1100,mx:"auto",display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:`repeat(${l.length}, minmax(0, 1fr))`},columnGap:e.spacing(10),rowGap:{xs:e.spacing(6),md:0},alignItems:"start",textAlign:"left"}),...Array.isArray(h)?h:h?[h]:[]],children:l.map(({icon:p,title:h,description:x},g)=>r(o,{component:"li",sx:{position:"relative",minWidth:0},children:[r(s,{sx:{gap:1},children:[r(s,{direction:"row",sx:{gap:1.25,alignItems:"center"},children:[e(o,{"aria-hidden":"true",sx:e=>({width:40,height:40,display:"grid",placeItems:"center",borderRadius:1.75,flexShrink:0,backgroundColor:i(e.palette.primary.main,"dark"===e.palette.mode?.22:.12)}),children:e(p,{sx:{fontSize:22,color:"primary.main"}})}),r(s,{sx:{minWidth:0},children:[r(n,{children:["Step ",g+1]}),e(m,{component:`h${c}`,sx:{overflowWrap:"anywhere"},children:h})]})]}),e(d,{sx:{overflowWrap:"anywhere"},children:x})]}),g<l.length-1&&r(o,{"aria-hidden":"true","data-testid":"process-steps-connector",sx:e=>({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",color:"primary.main",top:{xs:"100%",md:0},left:{xs:0,md:"100%"},width:{xs:"100%",md:e.spacing(10)},height:{xs:e.spacing(6),md:40}}),children:[e(a,{"data-testid":"process-steps-arrow-right",sx:{display:{xs:"none",md:"block"}}}),e(t,{"data-testid":"process-steps-arrow-down",sx:{display:{xs:"block",md:"none"}}})]})]},g))});l.displayName="ProcessSteps";export{l as ProcessSteps};
@@ -1 +1 @@
1
- const o="2.9.12";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.9.13";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, Ref, ReactElement, FormEventHandler, RefObject, ComponentType, CSSProperties, PropsWithChildren } from 'react';
3
- import { AlertProps, BoxProps, SxProps as SxProps$1, Theme as Theme$1, TypographyProps, ContainerProps, GridProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1, ToggleButtonGroupProps, SwitchProps, SliderProps as SliderProps$1, AccordionSummaryProps, ButtonProps, ChipProps, CardProps as CardProps$1, PaperProps, CircularProgressProps, CollapseProps, ButtonBaseProps, CheckboxProps, FormControlLabelProps, FormGroupProps, DialogProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogTitleProps, DividerProps, TableProps, TableBodyProps, TableCellProps, TableHeadProps, TableRowProps, IconButtonProps as IconButtonProps$1, SkeletonProps as SkeletonProps$1, StackProps, TabProps, TabsProps, TextFieldProps, TooltipProps as TooltipProps$1 } from '@mui/material';
4
- export { AlertProps, AlertTitle, BoxProps, ButtonBaseProps, CheckboxProps, ChipProps, CircularProgressProps, CollapseProps, ContainerProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogProps, DialogTitleProps, DividerProps, FormControlLabelProps, FormGroupProps, GridProps, MenuItem, PaperProps, StackProps, SwitchProps, TabProps, TableBodyProps, TableCellProps, TableHeadProps, TableProps, TableRowProps, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
3
+ import { AlertProps, SxProps as SxProps$1, Theme as Theme$1, TypographyProps, ContainerProps, GridProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1, ToggleButtonGroupProps, SwitchProps, SliderProps as SliderProps$1, AccordionSummaryProps, ButtonProps, ChipProps, CardProps as CardProps$1, PaperProps, CircularProgressProps, CollapseProps, ButtonBaseProps, CheckboxProps, FormControlLabelProps, FormGroupProps, DialogProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogTitleProps, DividerProps, TableProps, TableBodyProps, TableCellProps, TableHeadProps, TableRowProps, BoxProps as BoxProps$1, IconButtonProps as IconButtonProps$1, SkeletonProps as SkeletonProps$1, StackProps, TabProps, TabsProps, TextFieldProps, TooltipProps as TooltipProps$1 } from '@mui/material';
4
+ export { AlertProps, AlertTitle, ButtonBaseProps, CheckboxProps, ChipProps, CircularProgressProps, CollapseProps, ContainerProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogProps, DialogTitleProps, DividerProps, FormControlLabelProps, FormGroupProps, GridProps, MenuItem, PaperProps, StackProps, SwitchProps, TabProps, TableBodyProps, TableCellProps, TableHeadProps, TableProps, TableRowProps, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
5
+ import { BoxProps } from '@mui/material/Box';
6
+ export { default as Box, BoxProps } from '@mui/material/Box';
5
7
  import { SxProps, Theme } from '@mui/material/styles';
6
8
  import { Components } from 'react-markdown';
7
9
  import SvgIcon from '@mui/material/SvgIcon';
@@ -159,8 +161,6 @@ interface AgentChatWidgetProps {
159
161
  }
160
162
  declare function AgentChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onStop, onExpandToFullPage, hideFab, placement, }: AgentChatWidgetProps): react.JSX.Element | null;
161
163
 
162
- declare const Box: ({ children, ...rest }: BoxProps) => react.JSX.Element;
163
-
164
164
  interface ChatHistoryConversation {
165
165
  id: string;
166
166
  title: string;
@@ -1048,7 +1048,7 @@ type PaperAsyncProps = Omit<PaperProps, "children"> & {
1048
1048
  };
1049
1049
  declare const PaperAsync: ({ title, titleComponent, titleSx, description, actions, isLoading, isError, errorMessage, children, ...rest }: PaperAsyncProps) => react.JSX.Element;
1050
1050
 
1051
- type GreenWaveBackgroundProps = BoxProps;
1051
+ type GreenWaveBackgroundProps = BoxProps$1;
1052
1052
  declare const GreenWaveBackground: ({ sx, children, ...rest }: GreenWaveBackgroundProps) => react.JSX.Element;
1053
1053
 
1054
1054
  type IconButtonVariant = "standard" | "filled" | "outlined";
@@ -1078,7 +1078,7 @@ interface AvatarProps {
1078
1078
  /** Icon or initials to render inside the circle */
1079
1079
  children?: React.ReactNode;
1080
1080
  /** Additional MUI sx overrides — use for layout only (e.g. margins), not visual design */
1081
- sx?: BoxProps["sx"];
1081
+ sx?: BoxProps$1["sx"];
1082
1082
  }
1083
1083
  /**
1084
1084
  * Circular container for an icon or initials.
@@ -1722,5 +1722,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
1722
1722
  declare const leftPipe: SxProps<Theme>;
1723
1723
  declare const expandableText: (isExpanded: boolean) => SxProps<Theme>;
1724
1724
 
1725
- export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatDialog, AgentChatWidget, AgentChatWindow, AgentChatWindowHeader, AiButton, AiButtonTile, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, Breadcrumbs, ButtonBase, ButtonTile, Caption, Card, ChatAvatar, ChatContentFallback, ChatDatapoints, ChatHistory, ChatHistoryAgentItem, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatResponseMarkdown, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, DeltaChip, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormDialog, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NEXUS_THEME_STORAGE_KEY, NexusBarChart, NexusDataGrid, NexusHeatmap, NexusHome, NexusLineChart, NexusLogo, NexusNodeIcon, NexusOrbit, NexusPieChart, NexusScatterChart, NexusiFrame, NotificationBell, NotificationListItem, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, ProcessSteps, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, Slider, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, columnsForItemCount, createSageTheme, deltaColorForPolarity, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDatapointDelta, formatDatapointValue, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, safeChatMarkdownComponents, safeMarkdownUrl, sanitizeRawHtmlTable, splitRawHtmlTables, useThemeMode, useTokens };
1725
+ export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatDialog, AgentChatWidget, AgentChatWindow, AgentChatWindowHeader, AiButton, AiButtonTile, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Breadcrumbs, ButtonBase, ButtonTile, Caption, Card, ChatAvatar, ChatContentFallback, ChatDatapoints, ChatHistory, ChatHistoryAgentItem, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatResponseMarkdown, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, DeltaChip, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormDialog, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NEXUS_THEME_STORAGE_KEY, NexusBarChart, NexusDataGrid, NexusHeatmap, NexusHome, NexusLineChart, NexusLogo, NexusNodeIcon, NexusOrbit, NexusPieChart, NexusScatterChart, NexusiFrame, NotificationBell, NotificationListItem, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, ProcessSteps, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, Slider, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, columnsForItemCount, createSageTheme, deltaColorForPolarity, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDatapointDelta, formatDatapointValue, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, safeChatMarkdownComponents, safeMarkdownUrl, sanitizeRawHtmlTable, splitRawHtmlTables, useThemeMode, useTokens };
1726
1726
  export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatDialogProps, AgentChatWidgetProps, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiButtonTileProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, BreadcrumbItem, BreadcrumbsProps, ButtonTileProps, CardProps, CardTrend, ChartAsyncProps, ChatAvatarProps, ChatContentFallbackProps, ChatDatapointDelta, ChatDatapointItem, ChatDatapointPolarity, ChatDatapointValueFormat, ChatDatapointsData, ChatDatapointsProps, ChatHistoryAgent, ChatHistoryAgentItemProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, ChatResponseMarkdownProps, ChatTableCell, ChatTableData, ChatTablePart, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, DeltaChipProps, DeltaChipTone, EmptyStateProps, FABButtonProps, FileArtifact, FormDialogProps, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, MetricCardProps, MetricStatProps, MetricValueSize, ModeTokens, NexusBarChartProps, NexusHeatmapAxisItem, NexusHeatmapCell, NexusHeatmapProps, NexusHeatmapStatus, NexusLineChartProps, NexusNodeIconProps, NexusNodeIconSize, NexusNodeIconTone, NexusOrbitProps, NexusPieChartProps, NexusScatterChartProps, NexusiFrameProps, NotificationBellProps, NotificationListItemProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, ProcessStep, ProcessStepsProps, SecondaryButtonLinkProps, SecondaryButtonProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SelectableListItem, SelectableListProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SliderMarkOption, SliderProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, ThemeModeContextValue, ThemeModeProviderProps, 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{AgentChatWidget}from"./components/AgentChat/AgentChatWidget.mjs";export{AgentChatDialog}from"./components/AgentChat/AgentChatDialog.mjs";export{FABButton}from"./components/AgentChat/FABButton.mjs";export{AgentChatWindow}from"./components/AgentChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/AgentChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/AgentChat/ChatInput.mjs";export{ChatHistory}from"./components/AgentChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/AgentChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/AgentChat/ChatHistoryButtonBase.mjs";export{ChatHistoryAgentItem}from"./components/AgentChat/ChatHistoryAgentItem.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/AgentChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/AgentChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/AgentChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/AgentChat/ChatComponents/MarkdownContent.mjs";export{default as ChatResponseMarkdown,safeChatMarkdownComponents}from"./components/AgentChat/ChatComponents/ChatResponseMarkdown.mjs";export{default as ChatDatapoints}from"./components/AgentChat/ChatComponents/ChatDatapoints.mjs";export{default as ChatContentFallback}from"./components/AgentChat/ChatComponents/ChatContentFallback.mjs";export{default as MessageBubble}from"./components/AgentChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/AgentChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/AgentChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/AgentChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/AgentChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/AgentChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/AgentChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/AgentChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/AgentChat/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{Slider}from"./components/Slider.mjs";export{NotificationBell}from"./components/NotificationBell.mjs";export{NotificationListItem}from"./components/NotificationListItem.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{AiButtonTile,ButtonTile}from"./components/ButtonTile.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/Forms/Checkbox.mjs";export{FormControlLabel}from"./components/Forms/FormControlLabel.mjs";export{FormGroup}from"./components/Forms/FormGroup.mjs";export{CheckboxGroup}from"./components/Forms/CheckboxGroup.mjs";export{FormDialog}from"./components/Forms/FormDialog.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{DeltaChip}from"./components/DeltaChip.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/Logo/LogoOptions/index.mjs";export{NexusHome}from"./components/Logo/NexusHome.mjs";export{default as NexusLogo}from"./components/Logo/NexusLogo.mjs";export{NexusNodeIcon}from"./components/Logo/NexusNodeIcon.mjs";export{SageLogoSvg}from"./components/Logo/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/Theme/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{NexusHeatmap}from"./components/Charts/NexusHeatmap.mjs";export{ProcessSteps}from"./components/ProcessSteps.mjs";export{NexusOrbit}from"./components/NexusOrbit.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"./components/Theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./components/Theme/tokens.mjs";export{useTokens}from"./components/Theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./components/Theme/MuiAppThemeProvider.mjs";export{NEXUS_THEME_STORAGE_KEY,ThemeModeContext,ThemeModeProvider,useThemeMode}from"./components/Theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{sanitizeRawHtmlTable,splitRawHtmlTables}from"./utils/chatTableHtml.mjs";export{safeMarkdownUrl}from"./utils/safeMarkdownUrl.mjs";export{columnsForItemCount,deltaColorForPolarity,formatDatapointDelta,formatDatapointValue}from"./utils/chatDatapoints.mjs";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./components/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{AgentChatWidget}from"./components/AgentChat/AgentChatWidget.mjs";export{AgentChatDialog}from"./components/AgentChat/AgentChatDialog.mjs";export{FABButton}from"./components/AgentChat/FABButton.mjs";export{AgentChatWindow}from"./components/AgentChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/AgentChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/AgentChat/ChatInput.mjs";export{ChatHistory}from"./components/AgentChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/AgentChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/AgentChat/ChatHistoryButtonBase.mjs";export{ChatHistoryAgentItem}from"./components/AgentChat/ChatHistoryAgentItem.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/AgentChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/AgentChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/AgentChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/AgentChat/ChatComponents/MarkdownContent.mjs";export{default as ChatResponseMarkdown,safeChatMarkdownComponents}from"./components/AgentChat/ChatComponents/ChatResponseMarkdown.mjs";export{default as ChatDatapoints}from"./components/AgentChat/ChatComponents/ChatDatapoints.mjs";export{default as ChatContentFallback}from"./components/AgentChat/ChatComponents/ChatContentFallback.mjs";export{default as MessageBubble}from"./components/AgentChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/AgentChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/AgentChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/AgentChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/AgentChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/AgentChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/AgentChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/AgentChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/AgentChat/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{Slider}from"./components/Slider.mjs";export{NotificationBell}from"./components/NotificationBell.mjs";export{NotificationListItem}from"./components/NotificationListItem.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{default as Box}from"@mui/material/Box";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{AiButtonTile,ButtonTile}from"./components/ButtonTile.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/Forms/Checkbox.mjs";export{FormControlLabel}from"./components/Forms/FormControlLabel.mjs";export{FormGroup}from"./components/Forms/FormGroup.mjs";export{CheckboxGroup}from"./components/Forms/CheckboxGroup.mjs";export{FormDialog}from"./components/Forms/FormDialog.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{DeltaChip}from"./components/DeltaChip.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/Logo/LogoOptions/index.mjs";export{NexusHome}from"./components/Logo/NexusHome.mjs";export{default as NexusLogo}from"./components/Logo/NexusLogo.mjs";export{NexusNodeIcon}from"./components/Logo/NexusNodeIcon.mjs";export{SageLogoSvg}from"./components/Logo/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/Theme/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{NexusHeatmap}from"./components/Charts/NexusHeatmap.mjs";export{ProcessSteps}from"./components/ProcessSteps.mjs";export{NexusOrbit}from"./components/NexusOrbit.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"./components/Theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./components/Theme/tokens.mjs";export{useTokens}from"./components/Theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./components/Theme/MuiAppThemeProvider.mjs";export{NEXUS_THEME_STORAGE_KEY,ThemeModeContext,ThemeModeProvider,useThemeMode}from"./components/Theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{sanitizeRawHtmlTable,splitRawHtmlTables}from"./utils/chatTableHtml.mjs";export{safeMarkdownUrl}from"./utils/safeMarkdownUrl.mjs";export{columnsForItemCount,deltaColorForPolarity,formatDatapointDelta,formatDatapointValue}from"./utils/chatDatapoints.mjs";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./components/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.9.12",
3
+ "version": "2.9.13",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",
@@ -1 +0,0 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Box as i}from"@mui/material";const m=({children:m,...o})=>r(i,{...o,children:m});export{m as Box};