it-data-nexus-ui-library 2.0.1 → 2.1.0

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 (65) hide show
  1. package/dist/components/ActionBar.mjs +1 -1
  2. package/dist/components/AiPaper.mjs +1 -1
  3. package/dist/components/Buttons/GhostButton.mjs +1 -0
  4. package/dist/components/DateRangeFilter.mjs +1 -1
  5. package/dist/components/DateRangePicker.mjs +1 -1
  6. package/dist/components/GlassPaper.mjs +1 -1
  7. package/dist/components/GlassPaperAsync.mjs +1 -1
  8. package/dist/components/LoadingSpinnerNexus.mjs +1 -1
  9. package/dist/components/NexusChat/AgentActivity/ActivityCard.mjs +1 -1
  10. package/dist/components/NexusChat/AgentActivity/ActivityCards.mjs +1 -1
  11. package/dist/components/NexusChat/AgentActivity/AgentActivity.mjs +1 -1
  12. package/dist/components/NexusChat/AgentActivity/AgentActivityHeader.mjs +1 -1
  13. package/dist/components/NexusChat/AgentActivity/SourceLink.mjs +1 -1
  14. package/dist/components/NexusChat/AgentActivity/TokenSummary.mjs +1 -1
  15. package/dist/components/NexusChat/AgentChatWindow.mjs +1 -1
  16. package/dist/components/NexusChat/AgentChatWindowHeader.mjs +1 -1
  17. package/dist/components/NexusChat/ChatComponents/CopyableTableContainer.mjs +1 -1
  18. package/dist/components/NexusChat/ChatComponents/EmptyState.mjs +1 -1
  19. package/dist/components/NexusChat/ChatComponents/MarkdownContent.mjs +1 -1
  20. package/dist/components/NexusChat/ChatComponents/MessageBubble.mjs +1 -1
  21. package/dist/components/NexusChat/ChatComponents/MessageFeedbackBar.mjs +1 -1
  22. package/dist/components/NexusChat/ChatComponents/MessageList.mjs +1 -1
  23. package/dist/components/NexusChat/ChatComponents/SourceCitations.mjs +1 -1
  24. package/dist/components/NexusChat/ChatComponents/StreamingBubble.mjs +1 -1
  25. package/dist/components/NexusChat/ChatComponents/SuggestedPrompts.mjs +1 -1
  26. package/dist/components/NexusChat/ChatComponents/TypingIndicator.mjs +1 -1
  27. package/dist/components/NexusChat/ChatHistory.mjs +1 -1
  28. package/dist/components/NexusChat/ChatHistoryButtonBase.mjs +1 -1
  29. package/dist/components/NexusChat/ChatHistoryHeader.mjs +1 -1
  30. package/dist/components/NexusChat/ChatInput.mjs +1 -1
  31. package/dist/components/NexusChat/FABButton.mjs +1 -1
  32. package/dist/components/NexusChat/NexusChatDialog.mjs +1 -1
  33. package/dist/components/NexusChat/NexusChatWidget.mjs +1 -1
  34. package/dist/components/NexusChat/WidgetParts/WidgetBody.mjs +1 -1
  35. package/dist/components/NexusChat/WidgetParts/WidgetHeader.mjs +1 -1
  36. package/dist/components/NexusChat/WidgetParts/WidgetInput.mjs +1 -1
  37. package/dist/components/NexusLogoNode.mjs +1 -1
  38. package/dist/components/PaperAsync.mjs +1 -1
  39. package/dist/components/RagChip.mjs +1 -1
  40. package/dist/components/SideBlade/SideBladeNavListItem.mjs +1 -0
  41. package/dist/components/Tooltip.mjs +1 -1
  42. package/dist/components/_Primitives/CircularProgress.mjs +1 -0
  43. package/dist/components/_Primitives/Link.mjs +1 -0
  44. package/dist/generated/version.mjs +1 -1
  45. package/dist/index.d.ts +44 -13
  46. package/dist/index.mjs +1 -1
  47. package/package.json +1 -1
  48. package/dist/components/Link.mjs +0 -1
  49. package/dist/components/SideBladeNavListItem.mjs +0 -1
  50. /package/dist/components/{SideBlade.mjs → SideBlade/SideBlade.mjs} +0 -0
  51. /package/dist/components/{SideBladeNavList.mjs → SideBlade/SideBladeNavList.mjs} +0 -0
  52. /package/dist/components/{Alert.mjs → _Primitives/Alert.mjs} +0 -0
  53. /package/dist/components/{Box.mjs → _Primitives/Box.mjs} +0 -0
  54. /package/dist/components/{Chip.mjs → _Primitives/Chip.mjs} +0 -0
  55. /package/dist/components/{Collapse.mjs → _Primitives/Collapse.mjs} +0 -0
  56. /package/dist/components/{Container.mjs → _Primitives/Container.mjs} +0 -0
  57. /package/dist/components/{Divider.mjs → _Primitives/Divider.mjs} +0 -0
  58. /package/dist/components/{Grid.mjs → _Primitives/Grid.mjs} +0 -0
  59. /package/dist/components/{Paper.mjs → _Primitives/Paper.mjs} +0 -0
  60. /package/dist/components/{Skeleton.mjs → _Primitives/Skeleton.mjs} +0 -0
  61. /package/dist/components/{Stack.mjs → _Primitives/Stack.mjs} +0 -0
  62. /package/dist/components/{Switch.mjs → _Primitives/Switch.mjs} +0 -0
  63. /package/dist/components/{Tab.mjs → _Primitives/Tab.mjs} +0 -0
  64. /package/dist/components/{Tabs.mjs → _Primitives/Tabs.mjs} +0 -0
  65. /package/dist/components/{TextField.mjs → _Primitives/TextField.mjs} +0 -0
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as n,jsx as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o}from"@mui/material";import{Box as s}from"./Box.mjs";import{Stack as c}from"./Stack.mjs";import{NexusHome as d}from"./NexusHome.mjs";import{ThemeToggle as x}from"./ThemeToggle.mjs";import f from"./NexusLogo.mjs";import{ActionBarTitle as a}from"./Typography.mjs";import{useRef as h,useState as u,useEffect as m}from"react";const p=({title:p,extraLeft:g,extraRight:w,homeHref:y,showHome:v=!0})=>{const j=i(),C=r(j.breakpoints.up("lg")),I=h(null),[b,B]=u(49),R=h(null),k=h(null),z=h(null),E=h(null),M=h(null),A=h(null),[L,S]=u(null),[H,T]=u(null);return m(()=>{const e=I.current;if(!e)return;const n=()=>B(e.getBoundingClientRect().height);n();const t=window.ResizeObserver;if(!t)return;const i=new t(n);return i.observe(e),()=>i.disconnect()},[]),m(()=>{if(!C)return S(null),void T(null);function e(){const e=k.current,n=z.current,t=R.current,i=E.current,r=M.current,l=A.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);S(l-c.left)}else S(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,d=Math.min(Math.max(t,i),o);T(d-c.left)}else T(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),R.current&&n.observe(R.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[C,g,w]),e(n,{children:[t(l,{position:"sticky",component:"header",color:"inherit",elevation:0,ref:I,sx:{zIndex:{xs:j.zIndex.appBar,sm:j.zIndex.drawer+1},[j.breakpoints.up("sm")]:{position:"fixed"}},children:e(o,{variant:"dense",sx:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{lg:"center"},py:{xs:.5,lg:0}},children:[e(c,{sx:{display:{xs:"flex",sm:"none"},width:"100%"},spacing:.25,children:[e(c,{direction:"row",sx:{justifyContent:"flex-end","& .MuiIconButton-root":{padding:"4px"},"& svg":{fontSize:"1.1rem"}},children:[v&&t(d,{href:y}),t(x,{})]}),t(a,{sx:{textAlign:"center",fontSize:"1.1rem"},children:p})]}),(g||w)&&e(c,{direction:"row",sx:{display:{xs:"flex",sm:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%",mt:1},children:[g,w]}),e(c,{sx:{display:{xs:"none",sm:"flex",lg:"none"},width:"100%"},spacing:.5,children:[e(c,{direction:"row",sx:{alignItems:"center",width:"100%"},children:[t(s,{sx:{flex:1,display:"flex",alignItems:"center"},children:t(s,{sx:{height:"38px",pt:.5},children:t(f,{})})}),t(a,{children:p}),e(c,{direction:"row",sx:{flex:1,justifyContent:"flex-end",alignItems:"center",gap:1},children:[v&&t(d,{href:y}),t(x,{})]})]}),(g||w)&&e(c,{direction:"row",sx:{justifyContent:"center",alignItems:"center",gap:2,pb:.5},children:[g&&t(s,{children:g}),w&&t(s,{children:w})]})]}),t(s,{sx:{display:{xs:"none",lg:"block"},width:"100%"},children:e(s,{sx:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",position:"relative"},ref:R,children:[t(s,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-start"},children:t(s,{sx:{height:"38px",pt:.5},ref:k,children:t(f,{})})}),t(s,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:t(s,{sx:{pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:z,children:t(a,{children:p})})})}),t(s,{sx:{display:g?"block":"none",position:"absolute",left:null!=L?`${L}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:E,children:g})}),t(s,{sx:{display:w?"block":"none",position:"absolute",left:null!=H?`${H}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:M,children:w})}),t(s,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:e(s,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:A,children:[v&&t(d,{href:y}),t(x,{})]})})]})})]})}),t(s,{sx:{display:{xs:"none",sm:"block"},height:`${b}px`,flexShrink:0}})]})};export{p as ActionBar};
1
+ import{jsxs as e,Fragment as n,jsx as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o}from"@mui/material";import{Box as s}from"./_Primitives/Box.mjs";import{Stack as c}from"./_Primitives/Stack.mjs";import{NexusHome as d}from"./NexusHome.mjs";import{ThemeToggle as x}from"./ThemeToggle.mjs";import f from"./NexusLogo.mjs";import{ActionBarTitle as a}from"./Typography.mjs";import{useRef as h,useState as u,useEffect as m}from"react";const p=({title:p,extraLeft:g,extraRight:w,homeHref:y,showHome:v=!0})=>{const j=i(),C=r(j.breakpoints.up("lg")),I=h(null),[b,B]=u(49),R=h(null),k=h(null),z=h(null),E=h(null),M=h(null),A=h(null),[L,S]=u(null),[H,T]=u(null);return m(()=>{const e=I.current;if(!e)return;const n=()=>B(e.getBoundingClientRect().height);n();const t=window.ResizeObserver;if(!t)return;const i=new t(n);return i.observe(e),()=>i.disconnect()},[]),m(()=>{if(!C)return S(null),void T(null);function e(){const e=k.current,n=z.current,t=R.current,i=E.current,r=M.current,l=A.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);S(l-c.left)}else S(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,d=Math.min(Math.max(t,i),o);T(d-c.left)}else T(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),R.current&&n.observe(R.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[C,g,w]),e(n,{children:[t(l,{position:"sticky",component:"header",color:"inherit",elevation:0,ref:I,sx:{zIndex:{xs:j.zIndex.appBar,sm:j.zIndex.drawer+1},[j.breakpoints.up("sm")]:{position:"fixed"}},children:e(o,{variant:"dense",sx:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{lg:"center"},py:{xs:.5,lg:0}},children:[e(c,{sx:{display:{xs:"flex",sm:"none"},width:"100%"},spacing:.25,children:[e(c,{direction:"row",sx:{justifyContent:"flex-end","& .MuiIconButton-root":{padding:"4px"},"& svg":{fontSize:"1.1rem"}},children:[v&&t(d,{href:y}),t(x,{})]}),t(a,{sx:{textAlign:"center",fontSize:"1.1rem"},children:p})]}),(g||w)&&e(c,{direction:"row",sx:{display:{xs:"flex",sm:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%",mt:1},children:[g,w]}),e(c,{sx:{display:{xs:"none",sm:"flex",lg:"none"},width:"100%"},spacing:.5,children:[e(c,{direction:"row",sx:{alignItems:"center",width:"100%"},children:[t(s,{sx:{flex:1,display:"flex",alignItems:"center"},children:t(s,{sx:{height:"38px",pt:.5},children:t(f,{})})}),t(a,{children:p}),e(c,{direction:"row",sx:{flex:1,justifyContent:"flex-end",alignItems:"center",gap:1},children:[v&&t(d,{href:y}),t(x,{})]})]}),(g||w)&&e(c,{direction:"row",sx:{justifyContent:"center",alignItems:"center",gap:2,pb:.5},children:[g&&t(s,{children:g}),w&&t(s,{children:w})]})]}),t(s,{sx:{display:{xs:"none",lg:"block"},width:"100%"},children:e(s,{sx:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",position:"relative"},ref:R,children:[t(s,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-start"},children:t(s,{sx:{height:"38px",pt:.5},ref:k,children:t(f,{})})}),t(s,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:t(s,{sx:{pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:z,children:t(a,{children:p})})})}),t(s,{sx:{display:g?"block":"none",position:"absolute",left:null!=L?`${L}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:E,children:g})}),t(s,{sx:{display:w?"block":"none",position:"absolute",left:null!=H?`${H}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(s,{ref:M,children:w})}),t(s,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:e(s,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:A,children:[v&&t(d,{href:y}),t(x,{})]})})]})})]})}),t(s,{sx:{display:{xs:"none",sm:"block"},height:`${b}px`,flexShrink:0}})]})};export{p as ActionBar};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as e,Fragment as n}from"react/jsx-runtime";import{GlobalStyles as o,Box as r}from"@mui/material";import{Paper as a}from"./Paper.mjs";import{gradients as t}from"../theme/tokens.mjs";const s=i(o,{styles:"\n @property --ai-angle {\n syntax: '<angle>';\n initial-value: 0deg;\n inherits: false;\n }\n @keyframes ai-spin {\n to { --ai-angle: 360deg; }\n }\n "}),d=t.aiConic,l=({sx:o,children:t,...l})=>e(n,{children:[s,i(r,{sx:{position:"relative",isolation:"isolate",borderRadius:"8px",display:"inline-flex","&::after":{content:'""',position:"absolute",inset:-1,zIndex:-1,borderRadius:"8px",background:d,animation:"ai-spin 3s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},"&::before":{content:'""',position:"absolute",inset:-1,zIndex:-1,borderRadius:"8px",background:d,filter:"blur(8px)",opacity:.5,animation:"ai-spin 3s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}}},children:i(a,{...l,sx:[{position:"relative",zIndex:1,border:"none",boxShadow:"none",width:"100%"},...Array.isArray(o)?o:o?[o]:[]],children:t})})]});export{l as AiPaper};
1
+ import{jsx as i,jsxs as e,Fragment as n}from"react/jsx-runtime";import{GlobalStyles as r,Box as o}from"@mui/material";import{Paper as a}from"./_Primitives/Paper.mjs";import{gradients as t}from"../theme/tokens.mjs";const s=i(r,{styles:"\n @property --ai-angle {\n syntax: '<angle>';\n initial-value: 0deg;\n inherits: false;\n }\n @keyframes ai-spin {\n to { --ai-angle: 360deg; }\n }\n "}),d=t.aiConic,l=({sx:r,children:t,...l})=>e(n,{children:[s,i(o,{sx:{position:"relative",isolation:"isolate",borderRadius:"8px",display:"inline-flex","&::after":{content:'""',position:"absolute",inset:-1,zIndex:-1,borderRadius:"8px",background:d,animation:"ai-spin 3s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},"&::before":{content:'""',position:"absolute",inset:-1,zIndex:-1,borderRadius:"8px",background:d,filter:"blur(8px)",opacity:.5,animation:"ai-spin 3s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}}},children:i(a,{...l,sx:[{position:"relative",zIndex:1,border:"none",boxShadow:"none",width:"100%"},...Array.isArray(r)?r:r?[r]:[]],children:t})})]});export{l as AiPaper};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{ButtonBase as i}from"@mui/material";const t=({sx:t,...o})=>r(i,{sx:[{font:"inherit",textAlign:"inherit",color:"inherit"},...Array.isArray(t)?t:t?[t]:[]],...o});export{t as GhostButton};
@@ -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 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 k from"@mui/material/GlobalStyles";import{Box as v}from"./Box.mjs";import{Caption as x}from"./Typography.mjs";import{Chip as w}from"./Chip.mjs";import{Divider as C}from"./Divider.mjs";import{Paper as j}from"./Paper.mjs";import{SecondaryButton as M}from"./Buttons/SecondaryButton.mjs";import{Stack as D}from"./Stack.mjs";import{useTheme as S,alpha as R}from"@mui/material";import{colours as _}from"../theme/tokens.mjs";const z=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}],I=({startDate:I,endDate:L,onChange:T,dataAvailableThrough:G,earliestStartDate:O,className:$})=>{const[A,B]=t(!1),N="dark"===S().palette.mode,W=_.brilliantGreen,F=R(W,.2),Y=N?_.white:_.black,H=N?_.lightGrey:_.darkGrey,P=o(()=>G??m(new Date),[G]),q=o(()=>O?m(O):void 0,[O]),E=d(n=>{const r=m(n);return!!c(r,P)||!(!q||!b(r,q))},[P,q]),J=d(n=>{const r=P,e=h(r,n-1),t=q&&b(e,q)?q:e;T({startDate:t,endDate:r})},[P,q,T]),K=d(n=>{T({startDate:n?.from,endDate:n?.to})},[T]),Q=o(()=>{if(!I&&!L)return"Select dates";const n=n=>y(n,"MMM d, yyyy");return I&&L?I.getFullYear()===L.getFullYear()?`${r=I,y(r,"MMM d")} - ${n(L)}`:`${n(I)} - ${n(L)}`:I?n(I):L?n(L):"Select dates";var r},[I,L]),U=o(()=>I||h(P,30),[I,P]);return n(r,{children:[e(k,{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:Y},".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:Y,cursor:"pointer",font:"inherit",transition:"background-color 150ms ease"},".rdp-nn-day-btn:hover":{backgroundColor:F},".rdp-nn-nav-btn":{position:"absolute",top:0,width:28,height:28,padding:0,border:0,backgroundColor:"transparent",color:H,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:H},".rdp-nn-outside .rdp-nn-day-btn, .rdp-nn-disabled .rdp-nn-day-btn":{color:H,opacity:.4},".rdp-nn-disabled .rdp-nn-day-btn:hover":{backgroundColor:"transparent",cursor:"not-allowed"},".rdp-nn-selected":{backgroundColor:W,borderRadius:"50%"},".rdp-nn-selected .rdp-nn-day-btn":{color:_.black},".rdp-nn-selected .rdp-nn-day-btn:hover":{backgroundColor:_.jade},".rdp-nn-range-start":{backgroundColor:W,borderRadius:"50% 0 0 50%"},".rdp-nn-range-start .rdp-nn-day-btn":{color:_.black},".rdp-nn-range-start .rdp-nn-day-btn:hover":{backgroundColor:_.jade},".rdp-nn-range-end":{backgroundColor:W,borderRadius:"0 50% 50% 0"},".rdp-nn-range-end .rdp-nn-day-btn":{color:_.black},".rdp-nn-range-end .rdp-nn-day-btn:hover":{backgroundColor:_.jade},".rdp-nn-range-middle":{backgroundColor:F,borderRadius:0},".rdp-nn-today .rdp-nn-day-btn":{fontWeight:700}}}),n(a,{open:A,onOpenChange:B,children:[e(i,{asChild:!0,children:e(M,{size:"small",startIcon:e(u,{sx:{fontSize:14}}),className:$,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(D,{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(D,{direction:"row",spacing:1,sx:{px:2,py:1,alignItems:"center"},children:[e(v,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"primary.main",flexShrink:0}}),n(x,{children:["Data available through ",y(P,"MMM d, yyyy")]})]}),e(l,{mode:"range",numberOfMonths:2,selected:I||L?{from:I,to:L}:void 0,onSelect:K,defaultMonth:U,startMonth:q,endMonth:P,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{I 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 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:I,onChange:L,dataAvailableThrough:T,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(()=>T??m(new Date),[T]),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(!P&&!I)return"Select dates";const n=n=>y(n,"MMM d, yyyy");return P&&I?P.getFullYear()===I.getFullYear()?`${r=P,y(r,"MMM d")} - ${n(I)}`:`${n(P)} - ${n(I)}`:P?n(P):I?n(I):"Select dates";var r},[P,I]),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||I?{from:P,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{P as DateRangeFilter};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as r,Fragment as e}from"react/jsx-runtime";import{useState as o,useMemo as a,useCallback as i}from"react";import{Popover as l}from"@mui/material";import{LocalizationProvider as n,DatePicker as m}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"./Box.mjs";import{Caption as y}from"./Typography.mjs";import{Chip as g}from"./Chip.mjs";import{Divider as b}from"./Divider.mjs";import{Paper as v}from"./Paper.mjs";import{SecondaryButton as D}from"./Buttons/SecondaryButton.mjs";import{Stack as j}from"./Stack.mjs";const C=[{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 90 days",days:90}];function k(t){return t?c(t):void 0}function w(t,r,e){if(!t)return;const o=k(t);return o?r&&h(o,r)?r:e&&p(o,e)?e:o:void 0}const z=({value:z,onChange:M,presets:F=C,minDate:L,maxDate:S,className:W,emptyLabel:B="Select dates",availabilityLabel:P})=>{const[$,T]=o(null),A=a(()=>k(L),[L]),E=a(()=>c(S??new Date),[S]),I=a(()=>w(z.from,A,E),[z.from,A,E]),N=a(()=>w(z.to,A,E),[z.to,A,E]),O=a(()=>{if(!I&&!N)return B;const t=t=>u(t,"MMM d, yyyy");return I&&N?I.getFullYear()===N.getFullYear()?`${r=I,u(r,"MMM d")} - ${t(N)}`:`${t(I)} - ${t(N)}`:t(I||N);var r},[I,N,B]),Y=i(t=>{const r=w(t.from,A,E),e=w(t.to,A,E);r&&e&&p(r,e)?M({from:r,to:r}):M({from:r,to:e})},[M,A,E]),q=i(t=>{T(t.currentTarget)},[]),G=i(()=>{T(null)},[]),H=i(t=>{const r=E,e=f(r,t-1);Y({from:A&&h(e,A)?A:e,to:r})},[E,A,Y]);return t(n,{dateAdapter:s,children:r(e,{children:[t(D,{size:"small",startIcon:t(d,{sx:{fontSize:14}}),className:W,onClick:q,children:O}),t(l,{open:Boolean($),anchorEl:$,onClose:G,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{mt:1}}},children:r(v,{sx:{p:0,minWidth:360,maxWidth:720,overflow:"hidden"},children:[F.length>0&&r(e,{children:[t(j,{direction:"row",spacing:1,sx:{p:2,flexWrap:"wrap"},children:F.map(r=>t(g,{label:r.label,size:"small",variant:"outlined",clickable:!0,onClick:()=>H(r.days)},r.label))}),t(b,{})]}),P&&r(e,{children:[t(y,{sx:{display:"block",px:2,py:1.25},children:P}),t(b,{})]}),r(j,{direction:{xs:"column",md:"row"},spacing:2,sx:{p:2,alignItems:"flex-start"},children:[t(x,{sx:{width:{xs:"100%",md:280}},children:t(m,{label:"Start date",value:I??null,onChange:t=>Y({from:t??void 0,to:N}),minDate:A,maxDate:N??E,slotProps:{textField:{size:"small",fullWidth:!0}}})}),t(x,{sx:{width:{xs:"100%",md:280}},children:t(m,{label:"End date",value:N??null,onChange:t=>Y({from:I,to:t??void 0}),minDate:I??A,maxDate:E,slotProps:{textField:{size:"small",fullWidth:!0}}})})]})]})})]})})};export{z 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{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 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Box as e}from"@mui/material";import{Paper as o}from"./Paper.mjs";import{alpha as i}from"@mui/material/styles";import{gradients as t}from"../theme/tokens.mjs";const a=({sx:a,children:n,...m})=>r(o,{...m,sx:[{position:"relative",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",border:`1px solid ${i("#ececec",.2)}`,boxShadow:"none",zIndex:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:t.brand,borderRadius:"inherit",opacity:.1,zIndex:-1,padding:"1px",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude",WebkitMaskComposite:"xor"}},...Array.isArray(a)?a:a?[a]:[]],children:r(e,{sx:{position:"relative",zIndex:1},children:n})});export{a as GlassPaper};
1
+ import{jsx as r}from"react/jsx-runtime";import{Box as e}from"@mui/material";import{Paper as o}from"./_Primitives/Paper.mjs";import{alpha as i}from"@mui/material/styles";import{gradients as t}from"../theme/tokens.mjs";const a=({sx:a,children:n,...m})=>r(o,{...m,sx:[{position:"relative",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",border:`1px solid ${i("#ececec",.2)}`,boxShadow:"none",zIndex:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:t.brand,borderRadius:"inherit",opacity:.1,zIndex:-1,padding:"1px",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude",WebkitMaskComposite:"xor"}},...Array.isArray(a)?a:a?[a]:[]],children:r(e,{sx:{position:"relative",zIndex:1},children:n})});export{a as GlassPaper};
@@ -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"./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:d,isLoading:m,isError:x,errorMessage:h,children:a,...p})=>{if(m)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||d;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})]}),d&&e(n,{sx:{flexShrink:0},children:d})]}),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{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 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{Box as t}from"./Box.mjs";import{NexusLogoNode as r}from"./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,{})})}),a=({variant:r="small"})=>{const a=s[r];return e(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"auto"},children:e(t,{sx:{width:a,height:a,"@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:a})})})};export{a as LoadingSpinnerNexus};
1
+ import{jsx as e}from"react/jsx-runtime";import{Box as t}from"./_Primitives/Box.mjs";import{NexusLogoNode as r}from"./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 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as o}from"react";import r from"./SourceLink.mjs";import{Body1 as i,Body2 as s,Caption as n}from"../../Typography.mjs";import{ButtonBase as l}from"../../Buttons/ButtonBase.mjs";import{Chip as m}from"../../Chip.mjs";import{Code as a}from"../../Code.mjs";import{Stack as c}from"../../Stack.mjs";const p=({activity:p})=>{const[u,d]=o(!1),h=p.sources||[],f=u?h:h.slice(0,3),x=Math.max(0,h.length-3);return t(c,{direction:"row",spacing:1,children:e(c,{sx:{flex:1,minWidth:0},children:[e(c,{direction:"row",spacing:.75,sx:{alignItems:"center",flexWrap:"wrap"},children:[t(i,{children:p.title}),p.status&&t(m,{label:p.status,size:"small"})]}),p.text&&t(s,{children:p.text}),"kb"===p.type&&h.length>0&&e(c,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",mt:.25},children:[f.map((e,o)=>t(r,{source:e.source},o)),x>0&&t(l,{onClick:()=>d(t=>!t),sx:{color:"primary.main"},children:u?"Show less":`+${x} more`})]}),"tool"===p.type&&p.toolName&&t(a,{sx:{display:"inline-flex",alignSelf:"flex-start"},children:p.toolName}),"model"===p.type&&(p.inputTokens||p.outputTokens)&&e(n,{children:[p.inputTokens," in / ",p.outputTokens," out"]})]})})};export{p as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as i}from"react";import r from"./SourceLink.mjs";import{Body1 as o,Body2 as s,Caption as n}from"../../Typography.mjs";import{GhostButton as m}from"../../Buttons/GhostButton.mjs";import{Chip as l}from"../../_Primitives/Chip.mjs";import{Code as a}from"../../Code.mjs";import{Stack as c}from"../../_Primitives/Stack.mjs";const p=({activity:p})=>{const[h,u]=i(!1),d=p.sources||[],f=h?d:d.slice(0,3),x=Math.max(0,d.length-3);return t(c,{direction:"row",spacing:1,children:e(c,{sx:{flex:1,minWidth:0},children:[e(c,{direction:"row",spacing:.75,sx:{alignItems:"center",flexWrap:"wrap"},children:[t(o,{children:p.title}),p.status&&t(l,{label:p.status,size:"small"})]}),p.text&&t(s,{children:p.text}),"kb"===p.type&&d.length>0&&e(c,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",mt:.25},children:[f.map((e,i)=>t(r,{source:e.source},i)),x>0&&t(m,{onClick:()=>u(t=>!t),sx:{color:"primary.main",fontSize:"inherit"},children:h?"Show less":`+${x} more`})]}),"tool"===p.type&&p.toolName&&t(a,{sx:{display:"inline-flex",alignSelf:"flex-start"},children:p.toolName}),"model"===p.type&&(p.inputTokens||p.outputTokens)&&e(n,{children:[p.inputTokens," in / ",p.outputTokens," out"]})]})})};export{p as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import i from"./ActivityCard.mjs";import{Caption as r}from"../../Typography.mjs";import{Stack as o}from"../../Stack.mjs";const c=({activities:c,compact:e=!1})=>0===c.length?t(o,{direction:"row",spacing:1,sx:{alignItems:"center",justifyContent:"center",py:2,color:"text.secondary"},children:t(r,{children:"Waiting for agent activity…"})}):c.map((r,o)=>t(i,{activity:r,compact:e},o));export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"./ActivityCard.mjs";import{Caption as r}from"../../Typography.mjs";import{Stack as o}from"../../_Primitives/Stack.mjs";const c=({activities:c,compact:e=!1})=>0===c.length?t(o,{direction:"row",spacing:1,sx:{alignItems:"center",justifyContent:"center",py:2,color:"text.secondary"},children:t(r,{children:"Waiting for agent activity…"})}):c.map((r,o)=>t(i,{activity:r,compact:e},o));export{c as default};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as r,useMemo as o}from"react";import i from"./AgentActivityHeader.mjs";import a from"./ActivityCards.mjs";import m from"./TokenSummary.mjs";import{parseTraceEvents as n,calculateActivitySummary as s}from"./activityModel.mjs";import{Paper as p}from"../../Paper.mjs";import{Stack as c}from"../../Stack.mjs";const l=({isStreaming:l,traceEvents:d,defaultExpanded:u=!1,latency:f,activitySummary:k,compact:S=!1})=>{const[g,v]=r(u),y=o(()=>n(d),[d]),h=o(()=>s(y),[y]),x=k||h;return 0!==d.length||l?t(p,{variant:"outlined",children:[e(i,{isStreaming:l,thinkingSteps:h.thinkingSteps,kbSearches:h.kbSearches,toolCalls:h.toolCalls,isExpanded:g,setIsExpanded:v}),g&&t(c,{spacing:1.5,sx:{borderTop:1,borderColor:"divider",px:1.5,py:1.25,mt:1,maxHeight:256,overflowY:"auto"},children:[e(a,{activities:y,compact:S}),e(m,{isStreaming:l,inputTokens:x.inputTokens,outputTokens:x.outputTokens,latency:f})]})]}):null};export{l as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useMemo as n}from"react";import o from"./AgentActivityHeader.mjs";import s from"./ActivityCards.mjs";import r from"./TokenSummary.mjs";import{parseTraceEvents as a,calculateActivitySummary as m}from"./activityModel.mjs";import{Stack as p}from"../../_Primitives/Stack.mjs";const c=({isStreaming:c,traceEvents:l,defaultExpanded:d=!1,latency:g,activitySummary:u,compact:h=!1})=>{const[f,S]=i(d),k=n(()=>a(l),[l]),y=n(()=>m(k),[k]),v=u||y;return 0!==l.length||c?t(p,{spacing:0,children:[e("span",{role:"status",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap"},children:c?"Agent is generating a response":k.length>0?"Response generated":""}),e(o,{isStreaming:c,thinkingSteps:y.thinkingSteps,kbSearches:y.kbSearches,toolCalls:y.toolCalls,isExpanded:f,setIsExpanded:S}),f&&t(p,{spacing:1.5,sx:{px:1.5,py:1.25,mt:.5,maxHeight:256,overflowY:"auto"},children:[e(s,{activities:k,compact:h}),e(r,{isStreaming:c,inputTokens:v.inputTokens,outputTokens:v.outputTokens,latency:g})]})]}):null};export{c as default};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as e}from"react/jsx-runtime";import{Body1 as o}from"../../Typography.mjs";import{Box as r}from"../../Box.mjs";import{ButtonBase as n}from"../../Buttons/ButtonBase.mjs";import{Chip as t}from"../../Chip.mjs";import{LoadingSpinnerNexus as s}from"../../LoadingSpinnerNexus.mjs";import{Stack as m}from"../../Stack.mjs";import{colours as l}from"../../../theme/tokens.mjs";import a from"@mui/icons-material/CheckCircle";import c from"@mui/icons-material/ExpandMore";import d from"@mui/icons-material/ExpandLess";const p=({isStreaming:p,thinkingSteps:x,kbSearches:f,toolCalls:h,isExpanded:g,setIsExpanded:u})=>{const j=l.jadeLight;return i(n,{onClick:()=>u(i=>!i),sx:{width:"100%"},children:e(m,{direction:"column",spacing:1,sx:{width:"100%"},children:[e(m,{direction:"row",sx:{justifyContent:"space-between"},children:[e(m,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[p?i(s,{variant:"small"}):i(a,{sx:{color:j,fontSize:16}}),i(o,{children:p?"Agent is working...":"Response generated"})]}),i(r,g?{sx:{display:"inline-flex",color:"text.secondary"},children:i(d,{sx:{fontSize:14}})}:{sx:{display:"inline-flex",color:"text.secondary"},children:i(c,{sx:{fontSize:14}})})]}),e(m,{direction:"row",spacing:1,children:[x>0&&i(t,{size:"small",label:`${x} thinking`}),f>0&&i(t,{size:"small",label:`${f} KB`}),h>0&&i(t,{size:"small",label:`${h} tools`})]})]})})};export{p as default};
1
+ import{jsxs as i,jsx as e}from"react/jsx-runtime";import{Body1 as r}from"../../Typography.mjs";import{GhostButton as t}from"../../Buttons/GhostButton.mjs";import{Chip as o}from"../../_Primitives/Chip.mjs";import{CircularProgress as a}from"../../_Primitives/CircularProgress.mjs";import{Stack as s}from"../../_Primitives/Stack.mjs";import{colours as n}from"../../../theme/tokens.mjs";import m from"@mui/icons-material/CheckCircle";import l from"@mui/icons-material/ExpandMore";import c from"@mui/icons-material/ExpandLess";const d=({isStreaming:d,thinkingSteps:p,kbSearches:h,toolCalls:x,isExpanded:g,setIsExpanded:f})=>{const u=n.jadeLight;return i(t,{onClick:()=>f(i=>!i),"aria-expanded":g,"aria-label":g?"Collapse agent activity":"Expand agent activity",sx:{display:"flex",alignItems:"center",gap:1,width:"100%",minHeight:32,px:0,borderRadius:1,color:"text.secondary","&:hover":{color:"text.primary"}},children:[i(s,{direction:"row",spacing:1,sx:{alignItems:"center",flex:1,minWidth:0},children:[e(s,{direction:"row",spacing:1,sx:{alignItems:"center",color:d?"primary.main":"text.secondary"},children:d?e(a,{size:14,"aria-hidden":"true"}):e(m,{sx:{color:u,fontSize:16},"aria-hidden":"true"})}),e(r,{children:d?"Agent is working...":"Response generated"}),i(s,{direction:"row",spacing:.5,sx:{ml:"auto",pr:.5},children:[p>0&&e(o,{size:"small",label:`${p} thinking`}),h>0&&e(o,{size:"small",label:`${h} KB`}),x>0&&e(o,{size:"small",label:`${x} tools`})]})]}),e(g?c:l,{sx:{fontSize:14,color:"text.secondary"},"aria-hidden":"true"})]})};export{d as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"@mui/icons-material/OpenInNew";import{Code as i}from"../../Code.mjs";import{Link as o}from"../../Link.mjs";const r=({source:r})=>{const p=r.startsWith("http"),s=p?new URL(r).pathname.split("/").pop()||r:r.split("/").pop()||r;return p?e(o,{href:r,openInNewTab:!0,sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.5,py:.125,borderRadius:.5,bgcolor:"action.hover",fontSize:"0.5rem",textDecoration:"none"},children:[t(n,{sx:{fontSize:7}}),s]}):t(i,{sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:"0.5rem"},children:s})};export{r as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import i from"@mui/icons-material/OpenInNew";import{Code as n}from"../../Code.mjs";import{Link as r}from"../../_Primitives/Link.mjs";const o=({source:o})=>{const p=o.startsWith("http"),s=p?new URL(o).pathname.split("/").pop()||o:o.split("/").pop()||o;return p?e(r,{href:o,openInNewTab:!0,sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.5,py:.125,borderRadius:.5,bgcolor:"action.hover",fontSize:"0.5rem",textDecoration:"none"},children:[t(i,{sx:{fontSize:7}}),s]}):t(n,{sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:"0.5rem"},children:s})};export{o as default};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Caption as r}from"../../Typography.mjs";import{Stack as e}from"../../Stack.mjs";const n=({isStreaming:n,inputTokens:i,outputTokens:s,latency:c})=>{if(n)return null;const l=i>0||s>0,d=Boolean(c);return l||d?t(e,{spacing:.5,children:[l&&o(e,{direction:"row",sx:{alignItems:"center",pt:1.5,borderTop:1,borderColor:"divider"},children:t(r,{children:[i," input / ",s," output tokens"]})}),d&&c&&t(r,{children:[c.totalSeconds,"s total",c.ttftSeconds&&` (${c.ttftSeconds}s to first token)`]})]}):null};export{n as default};
1
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Caption as r}from"../../Typography.mjs";import{Stack as e}from"../../_Primitives/Stack.mjs";const n=({isStreaming:n,inputTokens:i,outputTokens:s,latency:c})=>{if(n)return null;const l=i>0||s>0,d=Boolean(c);return l||d?t(e,{spacing:.5,children:[l&&o(e,{direction:"row",sx:{alignItems:"center",pt:1.5,borderTop:1,borderColor:"divider"},children:t(r,{children:[i," input / ",s," output tokens"]})}),d&&c&&t(r,{children:[c.totalSeconds,"s total",c.ttftSeconds&&` (${c.ttftSeconds}s to first token)`]})]}):null};export{n as default};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as e,Fragment as t}from"react/jsx-runtime";import{Box as o}from"../Box.mjs";import{Stack as r}from"../Stack.mjs";import{Caption as m}from"../Typography.mjs";import{Paper as n}from"../Paper.mjs";import{ChatInput as s}from"./ChatInput.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react-markdown";import"remark-gfm";import"../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/StopCircle";import l from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as a}from"./AgentChatWindowHeader.mjs";const p=({title:p="Nexus AI Chat",subtitle:c="Your intelligent assistant",showAiChip:d=!0,headerActions:u,body:h,followUpLabel:x="Suggested follow-ups:",followUpPrompts:f,onSelectFollowUp:y,onSend:C,inputDisabled:b=!1,inputPlaceholder:g="Ask me anything...",isStreaming:w=!1,onStop:A,inputActions:S,inputRef:j,isEmpty:k=!1,inputSx:D,sx:I})=>{const R=Boolean(f&&f.length>0&&y),P=i(s,{onSend:C,disabled:b,placeholder:g,isStreaming:w,onStop:A,actions:S,inputRef:j});return e(o,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],children:[i(a,{title:p,subtitle:c,showAiChip:d,actions:u}),k?e(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[h,i(o,{sx:[{mt:3,width:"100%"},...Array.isArray(D)?D:D?[D]:[]],children:P})]}):e(t,{children:[i(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:h}),R&&e(r,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[i(m,{sx:{display:"block",mb:1},children:x}),i(l,{prompts:f??[],onSelect:y})]}),i(n,{sx:{borderRadius:0,border:"none"},children:i(o,{sx:[{p:2,flexShrink:0},...Array.isArray(D)?D:D?[D]:[]],children:P})})]})]})};export{p as AgentChatWindow};
1
+ import{jsx as i,jsxs as e,Fragment as t}from"react/jsx-runtime";import{Box as r}from"../_Primitives/Box.mjs";import{Stack as o}from"../_Primitives/Stack.mjs";import{Caption as m}from"../Typography.mjs";import{Paper as n}from"../_Primitives/Paper.mjs";import{ChatInput as s}from"./ChatInput.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react-markdown";import"remark-gfm";import"../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import l from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as a}from"./AgentChatWindowHeader.mjs";const p=({title:p="Nexus AI Chat",subtitle:c="Your intelligent assistant",showAiChip:d=!0,headerActions:u,body:h,followUpLabel:x="Suggested follow-ups:",followUpPrompts:f,onSelectFollowUp:y,onSend:C,inputDisabled:b=!1,inputPlaceholder:g="Ask me anything...",isStreaming:w=!1,onStop:A,inputActions:j,inputRef:S,isEmpty:k=!1,inputSx:P,sx:D})=>{const v=Boolean(f&&f.length>0&&y),I=i(s,{onSend:C,disabled:b,placeholder:g,isStreaming:w,onStop:A,actions:j,inputRef:S});return e(r,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(D)?D:D?[D]:[]],children:[i(a,{title:p,subtitle:c,showAiChip:d,actions:u}),k?e(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[h,i(r,{sx:[{mt:3,width:"100%"},...Array.isArray(P)?P:P?[P]:[]],children:I})]}):e(t,{children:[i(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:h}),v&&e(o,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[i(m,{sx:{display:"block",mb:1},children:x}),i(l,{prompts:f??[],onSelect:y})]}),i(n,{sx:{borderRadius:0,border:"none"},children:i(r,{sx:[{p:2,flexShrink:0},...Array.isArray(P)?P:P?[P]:[]],children:I})})]})]})};export{p as AgentChatWindow};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as r}from"react/jsx-runtime";import{Stack as e}from"../Stack.mjs";import{AiChip as i}from"../AiChip.mjs";import{H2 as s,Caption as n}from"../Typography.mjs";const o=({title:o="Nexus AI Chat",subtitle:c="Your intelligent assistant",showAiChip:m=!0,actions:l,sx:a})=>{const p=t(e,{direction:"row",spacing:1,sx:{alignItems:"center"},children:m&&t(i,{})});return r(e,{direction:{xs:"column",sm:"row"},spacing:2,sx:[{alignItems:"center",justifyContent:"space-between",p:1,flexShrink:0,borderBottom:"1px solid",borderColor:"divider"},...Array.isArray(a)?a:a?[a]:[]],children:[r(e,{sx:{alignItems:{xs:"center",sm:"flex-start"},textAlign:{xs:"center",sm:"left"}},children:[t(s,{children:o}),t(n,{children:c})]}),l??p]})};export{o as AgentChatWindowHeader};
1
+ import{jsx as t,jsxs as r}from"react/jsx-runtime";import{Stack as e}from"../_Primitives/Stack.mjs";import{AiChip as i}from"../AiChip.mjs";import{H2 as s,Caption as n}from"../Typography.mjs";const o=({title:o="Nexus AI Chat",subtitle:m="Your intelligent assistant",showAiChip:c=!0,actions:l,sx:a})=>{const p=t(e,{direction:"row",spacing:1,sx:{alignItems:"center"},children:c&&t(i,{})});return r(e,{direction:{xs:"column",sm:"row"},spacing:2,sx:[{alignItems:"center",justifyContent:"space-between",p:1,flexShrink:0,borderBottom:"1px solid",borderColor:"divider"},...Array.isArray(a)?a:a?[a]:[]],children:[r(e,{sx:{alignItems:{xs:"center",sm:"flex-start"},textAlign:{xs:"center",sm:"left"}},children:[t(s,{children:o}),t(n,{children:m})]}),l??p]})};export{o as AgentChatWindowHeader};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o}from"react";import l from"@mui/icons-material/Check";import n from"@mui/icons-material/ContentCopy";import a from"@mui/icons-material/Download";import{Box as i}from"../../Box.mjs";import{Stack as c}from"../../Stack.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";const p=e=>e.replace(/\s+/g," ").trim(),d=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=p(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"):"",s=({children:s})=>{const[u,f]=r(!1),y=o(null);return e(i,{sx:{my:1},children:[e(c,{direction:"row",sx:{justifyContent:"flex-end",gap:1,mb:.5},children:[t(m,{size:"small",startIcon:t(u?l:n,{sx:{fontSize:14}}),onClick:async()=>{const e=(t=y.current)?Array.from(t.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?t.map(e=>{const t=e.querySelectorAll("th").length>0,r=Array.from(e.querySelectorAll("th, td")).map(e=>p(e.textContent||"")),o="| "+r.join(" | ")+" |";return t?o+"\n| "+r.map(()=>"---").join(" | ")+" |":o}).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;">${p(e.textContent||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</${t}>`}).join("")}</tr>`).join("")}</table>`:""}).filter(Boolean).join("<br>"):"")(y.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),f(!0),setTimeout(()=>f(!1),2e3)},title:u?"Table copied":"Copy table","aria-label":u?"Table copied to clipboard":"Copy table",children:u?"Copied":"Copy table"}),t(m,{size:"small",startIcon:t(a,{sx:{fontSize:14}}),onClick:()=>{const e=d(y.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),l=document.createElement("a");l.href=o,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),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(i,{ref:y,sx:{overflowX:"auto"},children:s})]})};export{s as CopyableTableContainer};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o}from"react";import l from"@mui/icons-material/Check";import n from"@mui/icons-material/ContentCopy";import a from"@mui/icons-material/Download";import{Box as i}from"../../_Primitives/Box.mjs";import{Stack as c}from"../../_Primitives/Stack.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";const p=e=>e.replace(/\s+/g," ").trim(),s=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=p(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"):"",d=({children:d})=>{const[u,f]=r(!1),y=o(null);return e(i,{sx:{my:1},children:[e(c,{direction:"row",sx:{justifyContent:"flex-end",gap:1,mb:.5},children:[t(m,{size:"small",startIcon:t(u?l:n,{sx:{fontSize:14}}),onClick:async()=>{const e=(t=y.current)?Array.from(t.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?t.map(e=>{const t=e.querySelectorAll("th").length>0,r=Array.from(e.querySelectorAll("th, td")).map(e=>p(e.textContent||"")),o="| "+r.join(" | ")+" |";return t?o+"\n| "+r.map(()=>"---").join(" | ")+" |":o}).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;">${p(e.textContent||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</${t}>`}).join("")}</tr>`).join("")}</table>`:""}).filter(Boolean).join("<br>"):"")(y.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),f(!0),setTimeout(()=>f(!1),2e3)},title:u?"Table copied":"Copy table","aria-label":u?"Table copied to clipboard":"Copy table",children:u?"Copied":"Copy table"}),t(m,{size:"small",startIcon:t(a,{sx:{fontSize:14}}),onClick:()=>{const e=s(y.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),l=document.createElement("a");l.href=o,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),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(i,{ref:y,sx:{overflowX:"auto"},children:d})]})};export{d as CopyableTableContainer};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as r}from"../../Box.mjs";import{Chip as i}from"../../Chip.mjs";import{H3 as l,Body1 as n}from"../../Typography.mjs";import o from"./ChatAvatar.mjs";import m from"./SuggestedPrompts.mjs";const s=({title:s,description:p,dataSources:a,prompts:c,avatarIcon:x,onSelect:f})=>e(r,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,py:6},children:[t(o,{size:"lg",icon:x}),e(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",gap:.5},children:[t(l,{children:s}),t(n,{children:p})]}),a&&a.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:a.map(e=>t(i,{label:e,size:"small"},e))}),c.length>0&&e(r,{sx:{mt:2},children:[t(n,{sx:{mb:1},children:"Try asking:"}),t(m,{prompts:c,onSelect:f})]})]});export{s as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as r}from"../../_Primitives/Box.mjs";import{Chip as i}from"../../_Primitives/Chip.mjs";import{H3 as l,Body1 as n}from"../../Typography.mjs";import m from"./ChatAvatar.mjs";import s from"./SuggestedPrompts.mjs";const o=({title:o,description:p,dataSources:a,prompts:c,avatarIcon:x,onSelect:f})=>e(r,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,py:6},children:[t(m,{size:"lg",icon:x}),e(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",gap:.5},children:[t(l,{children:o}),t(n,{children:p})]}),a&&a.length>0&&t(r,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:.75,mt:1},children:a.map(e=>t(i,{label:e,size:"small"},e))}),c.length>0&&e(r,{sx:{mt:2},children:[t(n,{sx:{mb:1},children:"Try asking:"}),t(s,{prompts:c,onSelect:f})]})]});export{o as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{isValidElement as e,cloneElement as o}from"react";import n from"react-markdown";import i from"remark-gfm";import{Box as t}from"../../Box.mjs";import{Paper as l}from"../../Paper.mjs";import{ChatWindowBody as c,H4 as d,H3 as m}from"../../Typography.mjs";import{Code as h}from"../../Code.mjs";const p=(e,o)=>{const n=o?.trim();if(!n)return e;const i=new RegExp(`(${(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(n)})`,"ig");return e.split(i).map((e,o)=>{if(!e)return null;return e.toLowerCase()===n.toLowerCase()?r(t,{component:"mark",sx:{backgroundColor:r=>"dark"===r.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${o}`):e})},s=(r,n)=>{if("string"==typeof r)return p(r,n);if("number"==typeof r)return p(r.toString(),n);if(Array.isArray(r))return r.map(r=>s(r,n));if(e(r)){const e=r.props.children;return void 0===e?r:o(r,void 0,s(e,n))}return r},a={p:({children:e})=>r(c,{sx:{mb:1,"&:last-child":{mb:0}},children:e}),li:({children:e})=>r(c,{component:"li",children:e}),strong:({children:e})=>r(t,{component:"strong",sx:{fontWeight:700,fontSize:"inherit",lineHeight:"inherit"},children:e}),em:({children:e})=>r(t,{component:"em",sx:{fontStyle:"italic",fontSize:"inherit",lineHeight:"inherit"},children:e})},g=({content:e,highlightQuery:o,components:p})=>{const a=r=>s(r,o),g={p:({children:e})=>r(c,{sx:{mb:1,"&:last-child":{mb:0}},children:a(e)}),strong:({children:e})=>r(t,{component:"strong",sx:{fontWeight:700},children:a(e)}),em:({children:e})=>r(t,{component:"em",sx:{fontStyle:"italic"},children:a(e)}),ul:({children:e})=>r(t,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:a(e)}),ol:({children:e})=>r(t,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:a(e)}),li:({children:e})=>r(c,{component:"li",children:a(e)}),h1:({children:e})=>r(m,{sx:{mb:1,mt:.5},children:a(e)}),h2:({children:e})=>r(d,{sx:{mb:.5,mt:.5},children:a(e)}),h3:({children:e})=>r(d,{sx:{mb:.5,mt:.5},children:a(e)}),code:({children:e})=>r(h,{children:a(e)}),pre:({children:e})=>r(l,{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:a(e)}),hr:()=>r(t,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}}),table:({children:e})=>r(t,{component:"table",sx:{width:"100%",borderCollapse:"collapse",my:1},children:e}),th:({children:e})=>r(t,{component:"th",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left",bgcolor:"action.hover",fontWeight:600},children:e}),td:({children:e})=>r(t,{component:"td",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:e})};return r(n,{remarkPlugins:[i],components:{...g,...p},children:e})};export{a as chatWindowMarkdownComponents,g as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{isValidElement as e,cloneElement as o}from"react";import i from"react-markdown";import n from"remark-gfm";import{Box as t}from"../../_Primitives/Box.mjs";import{Paper as l}from"../../_Primitives/Paper.mjs";import{ChatWindowBody as c,H4 as d,H3 as m}from"../../Typography.mjs";import{Code as h}from"../../Code.mjs";const p=(e,o)=>{const i=o?.trim();if(!i)return e;const n=new RegExp(`(${(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(i)})`,"ig");return e.split(n).map((e,o)=>{if(!e)return null;return e.toLowerCase()===i.toLowerCase()?r(t,{component:"mark",sx:{backgroundColor:r=>"dark"===r.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${o}`):e})},s=(r,i)=>{if("string"==typeof r)return p(r,i);if("number"==typeof r)return p(r.toString(),i);if(Array.isArray(r))return r.map(r=>s(r,i));if(e(r)){const e=r.props.children;return void 0===e?r:o(r,void 0,s(e,i))}return r},a={p:({children:e})=>r(c,{sx:{mb:1,"&:last-child":{mb:0}},children:e}),li:({children:e})=>r(c,{component:"li",children:e}),strong:({children:e})=>r(t,{component:"strong",sx:{fontWeight:700,fontSize:"inherit",lineHeight:"inherit"},children:e}),em:({children:e})=>r(t,{component:"em",sx:{fontStyle:"italic",fontSize:"inherit",lineHeight:"inherit"},children:e})},f=({content:e,highlightQuery:o,compact:p=!1,components:a})=>{const f=r=>s(r,o),g=p?"0.875rem":void 0,x={p:({children:e})=>r(c,{sx:{mb:1,"&:last-child":{mb:0},fontSize:g},children:f(e)}),strong:({children:e})=>r(t,{component:"strong",sx:{fontWeight:700},children:f(e)}),em:({children:e})=>r(t,{component:"em",sx:{fontStyle:"italic"},children:f(e)}),ul:({children:e})=>r(t,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:f(e)}),ol:({children:e})=>r(t,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:f(e)}),li:({children:e})=>r(c,{component:"li",sx:{fontSize:g},children:f(e)}),h1:({children:e})=>r(m,{sx:{mb:1,mt:.5},children:f(e)}),h2:({children:e})=>r(d,{sx:{mb:.5,mt:.5},children:f(e)}),h3:({children:e})=>r(d,{sx:{mb:.5,mt:.5},children:f(e)}),code:({children:e})=>r(h,{children:f(e)}),pre:({children:e})=>r(l,{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:f(e)}),hr:()=>r(t,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}}),table:({children:e})=>r(t,{component:"table",sx:{width:"100%",borderCollapse:"collapse",my:1},children:e}),th:({children:e})=>r(t,{component:"th",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left",bgcolor:"action.hover",fontWeight:600},children:e}),td:({children:e})=>r(t,{component:"td",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:e})};return r(i,{remarkPlugins:[n],components:{...x,...a},children:e})};export{a as chatWindowMarkdownComponents,f 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"../../Box.mjs";import{Stack as c}from"../../Stack.mjs";import{IconButton as s}from"../../Buttons/IconButton.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";import d from"./MarkdownContent.mjs";import p from"./MessageFeedbackBar.mjs";import{ChatWindowBody as f}from"../../Typography.mjs";import{colours as u}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(l,{onClick:()=>c(e=>!e),sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider",cursor:"pointer",userSelect:"none"},children:[e(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),e(s,{size:"small",ariaLabel:a?"Collapse":"Expand",children:e(a?n:t,{sx:{fontSize:16}})})]}),(!p||a)&&e(l,{component:"pre",sx:{m:0,p:1.5,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"0.8125rem",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',lineHeight:1.5,bgcolor:"action.hover"},children:e(l,{component:"code",className:`language-${m}`,children:d})})]})},h=({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})},b=({message:r,highlightQuery:t,showActivity:n=!1,onFeedback:i,onDownloadFile:s,contentRenderer:m,markdownComponents:b})=>{const y="user"===r.role,w=!y&&r.codeBlocks&&r.codeBlocks.length>0,k=!y&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:y?"flex-end":"flex-start"},children:o(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...y?{}:{flex:1}},children:[o(l,{sx:{borderRadius:y?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:y?u.jadeLight:"background.default",color:y?u.black:"text.primary",border:"none"},children:[w&&e(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((o,r)=>e(g,{block:o},r))}),y?e(f,{sx:{whiteSpace:"pre-wrap"},children:x(r.content,t)}):e("div",{className:"message-content",children:m?m(r.content):e(d,{content:r.content,highlightQuery:t,components:b})}),k&&e(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((o,r)=>e(h,{file:o,onDownloadFile:s},`${o.bucket}-${o.key}-${r}`))})]}),!y&&n&&r.traceEvents&&r.traceEvents.length>0&&e(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),!y&&i&&e(p,{message:r,onFeedback:i})]})})};export{b as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../_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"./MarkdownContent.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 +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 a from"@mui/icons-material/ThumbDown";import m from"@mui/icons-material/ContentCopy";import l from"@mui/icons-material/Check";import{Box as s}from"../../Box.mjs";import{Stack as n}from"../../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"../../Dialog.mjs";import{TextField as x}from"../../TextField.mjs";import{Caption as C}from"../../Typography.mjs";const b=({message:b,onFeedback:k})=>{const[v,w]=o(!1),[y,j]=o(b.rating??null),[T,B]=o(!1),[z,S]=o(""),[F,W]=o(!1);return i(e,{children:[i(n,{direction:"row",spacing:.5,sx:{alignItems:"center"},children:[t(c,{size:"small",title:v?"Copied":"Copy message",ariaLabel:v?"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(v?l:m,{sx:{fontSize:16}})}),t(c,{size:"small",title:"Helpful",ariaLabel:"Mark as helpful",onClick:()=>{k(b.id,"positive"),j("positive"),W(!0),setTimeout(()=>W(!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(a,{sx:{fontSize:16}})}),F&&t(C,{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(s,{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:()=>{k(b.id,"negative",z.trim()),j("negative"),B(!1),W(!0),setTimeout(()=>W(!1),3e3)},disabled:!z.trim(),children:"Submit"})]})]})]})};export{b 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 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"../../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?a:s,{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(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(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 r,jsx as t}from"react/jsx-runtime";import{useRef as e,useEffect as o}from"react";import{Box as n}from"../../Box.mjs";import i from"./MessageBubble.mjs";import l from"./StreamingBubble.mjs";import s from"./TypingIndicator.mjs";import{latestTraceLabel as c}from"./latestTraceLabel.mjs";const m=({messages:m,isTyping:u,streamingText:a,liveTraceEvents:g,highlightQuery:h,onAbort:p,showActivity:f=!1,markdownComponents:x})=>{const y=e(null),b=e(null),d=e(!1),v=e(m.length),T=e(!1),j=()=>{const r=b.current;r&&(T.current=!0,r.scrollTop=r.scrollHeight,requestAnimationFrame(()=>{T.current=!1}))};o(()=>{const r=m[m.length-1];m.length>v.current&&"user"===r?.role&&(d.current=!1,j()),v.current=m.length},[m]),o(()=>{d.current||j()},[u,a]);const w=(a||"").trim().length>0,A=u&&w,H=u&&!A;return r(n,{ref:b,onScroll:()=>{T.current||(d.current=!(()=>{const r=b.current;return!r||r.scrollHeight-r.scrollTop-r.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[m.filter(r=>"user"===r.role||r.content).map(r=>t(i,{message:r,highlightQuery:h,showActivity:f,markdownComponents:x},r.id)),A&&t(l,{text:a||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f}),H&&t(s,{traceLabel:g&&g.length>0?c(g):void 0}),t(n,{ref:y})]})};export{m as default};
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as e,useEffect as o}from"react";import{Box as n}from"../../_Primitives/Box.mjs";import i from"./MessageBubble.mjs";import c from"./StreamingBubble.mjs";import l from"./TypingIndicator.mjs";import{latestTraceLabel as s}from"./latestTraceLabel.mjs";const m=({messages:m,isTyping:a,streamingText:u,liveTraceEvents:g,highlightQuery:h,onAbort:p,showActivity:f=!1,compact:x=!1,markdownComponents:y})=>{const v=e(null),b=e(null),d=e(!1),T=e(m.length),j=e(!1),w=()=>{const t=b.current;t&&(j.current=!0,t.scrollTop=t.scrollHeight,requestAnimationFrame(()=>{j.current=!1}))};o(()=>{const t=m[m.length-1];m.length>T.current&&"user"===t?.role&&(d.current=!1,w()),T.current=m.length},[m]),o(()=>{d.current||w()},[a,u]);const A=(u||"").trim().length>0,H=a&&(A||f),B=a&&!H;return t(n,{ref:b,onScroll:()=>{j.current||(d.current=!(()=>{const t=b.current;return!t||t.scrollHeight-t.scrollTop-t.clientHeight<80})())},sx:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1.5,px:2,py:1.5},children:[m.filter(t=>"user"===t.role||t.content).map(t=>r(i,{message:t,highlightQuery:h,showActivity:f,compact:x,markdownComponents:y},t.id)),H&&r(c,{text:u||"",traceEvents:g||[],highlightQuery:h,onAbort:p,showActivity:f,compact:x}),B&&r(l,{traceLabel:g&&g.length>0?s(g):void 0}),r(n,{ref:v})]})};export{m as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Box as o}from"../../Box.mjs";import{Chip as m}from"../../Chip.mjs";import{Caption as p}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(p,{sx:{mr:.5},children:"Sources:"}),l.map(r=>e(m,{label:r,size:"small"},r))]}):null;export{l as default};
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 +1 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";import e from"@mui/icons-material/StopCircle";import o from"../AgentActivity/AgentActivity.mjs";import{Box as r}from"../../Box.mjs";import{Stack as n}from"../../Stack.mjs";import{ButtonBase as a}from"../../Buttons/ButtonBase.mjs";import{Caption as s}from"../../Typography.mjs";import{NexusLogoNodeSvg as m}from"../../NexusLogoNode.mjs";import c from"./MarkdownContent.mjs";import{latestTraceLabel as l}from"./latestTraceLabel.mjs";const p=({text:p,traceEvents:g,highlightQuery:d,avatarIcon:f,onAbort:x,showActivity:h=!1})=>t(n,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[i(r,{sx:{mt:.25,flexShrink:0},children:f??i(m,{size:28})}),t(n,{spacing:1,children:[p?t(r,{sx:{bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[i(c,{content:p,highlightQuery:d}),i(r,{sx:{display:"inline-block",height:16,bgcolor:"primary.main",verticalAlign:"text-bottom",animation:"pulse 1.2s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.35},"50%":{opacity:1}}}})]}):i(r,{sx:{bgcolor:"background.default",px:1.75,py:1.25},children:i(n,{direction:"row",spacing:1,sx:{alignItems:"center"},children:t(n,{direction:"row",spacing:.5,children:[" ",i(s,{children:g.length>0?`Agent is working... ${l(g)}`:"Agent is working..."}),[0,150,300].map(t=>i(r,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${t}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},t))]})})}),h&&i(o,{isStreaming:!0,traceEvents:g,defaultExpanded:!0}),x&&t(a,{onClick:x,sx:{display:"inline-flex",alignItems:"center",gap:.5,fontSize:"0.625rem",color:"text.secondary","&:hover":{color:"error.main"},borderRadius:.5,px:.5},children:[i(e,{sx:{fontSize:11}}),"Stop generating"]})]})]});export{p as default};
1
+ 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"./MarkdownContent.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{jsx as r}from"react/jsx-runtime";import{Stack as o}from"../../Stack.mjs";import{Chip as e}from"../../Chip.mjs";const t=({prompts:t,onSelect:i})=>r(o,{direction:"row",spacing:1,sx:{flexWrap:"wrap",gap:1,justifyContent:"center",alignItems:"center"},children:t.map(o=>r(e,{label:o,onClick:()=>i(o),size:"medium",sx:{cursor:"pointer",backgroundColor:"background.greys",color:"text.primary"}},o))});export{t as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{Stack as e}from"../../_Primitives/Stack.mjs";import{Chip as t}from"../../_Primitives/Chip.mjs";const i=({prompts:i,onSelect:o})=>r(e,{direction:"row",spacing:1,sx:{flexWrap:"wrap",gap:1,justifyContent:"center",alignItems:"center"},children:i.map(e=>r(t,{label:e,onClick:()=>o(e),size:"medium",sx:{cursor:"pointer",backgroundColor:"background.greys",color:"text.primary"}},e))});export{i as default};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Box as o}from"../../Box.mjs";import{Stack as t}from"../../Stack.mjs";import{Body2 as i}from"../../Typography.mjs";import{useTheme as a}from"@mui/material/styles";import{colours as n}from"../../../theme/tokens.mjs";import{NexusLogoNodeSvg as m}from"../../NexusLogoNode.mjs";const s=({traceLabel:s,avatarIcon:c})=>{const d="dark"===a().palette.mode?n.jadeLight:n.jadeDark;return r(t,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[e(o,{sx:{mt:.25,flexShrink:0},children:c??e(m,{size:28})}),e(o,{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(i,{sx:{color:"text.primary",fontWeight:600,opacity:1},children:s?`Agent is working... ${s}`:"Agent is working..."}),e(t,{direction:"row",spacing:.5,children:[0,150,300].map(r=>e(o,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:d,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{s as default};
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 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as t,useCallback as r}from"react";import i from"@mui/icons-material/ChevronRight";import{Caption as n}from"../Typography.mjs";import{Box as s}from"../Box.mjs";import{Stack as a}from"../Stack.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{ChatHistoryHeader as h}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as c}from"./ChatHistoryButtonBase.mjs";const m=({conversations:m,activeConversationId:d,onSelectConversation:C,onDeleteConversation:p,onNewConversation:f,onClose:v,onSearchChange:x,title:g="Chat history",emptyText:y="No conversations yet",newChatTitle:u="New chat",deleteConversationTitle:w="Delete conversation",searchPlaceholder:b="Search chat histories",searchDebounceMs:S=300,width:j=288,sx:T,formatMessageCount:B=e=>`${e} messages`,isCollapsed:D=!1,onToggleCollapse:k,collapsedWidth:A=40})=>{const[H,M]=t(""),N=r(e=>{M(e),x?.(e)},[x]);return e(s,{sx:{width:D?A:j,minWidth:D?A:0,flexShrink:0,borderRight:1,borderColor:"divider",overflow:"hidden",transition:"width 0.2s ease, min-width 0.2s ease",display:"flex",flexDirection:"column"},children:D?e(a,{sx:{justifyContent:"center",alignItems:"center",py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:e(l,{onClick:k,title:"Expand history",ariaLabel:"expand-history",sx:{width:36,height:36},children:e(i,{sx:{fontSize:18}})})}):o(a,{direction:"column",sx:[{flex:1,minHeight:0},...Array.isArray(T)?T:T?[T]:[]],children:[e(h,{title:g,newChatTitle:u,onNewConversation:f,onClose:v,onToggleCollapse:k,onSearchChange:N,searchPlaceholder:b,searchDebounceMs:S}),e(s,{component:"nav","aria-label":g,sx:{flex:1,overflowY:"auto",p:1},children:0===m.length?e(n,{sx:{display:"block",textAlign:"center",py:4},children:y}):m.map(o=>{const t=o.id===d;return e(c,{conversation:o,isActive:t,highlightQuery:H,onSelectConversation:C,onDeleteConversation:p,deleteConversationTitle:w,formatMessageCount:B},o.id)})})]})})};export{m as ChatHistory};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as t,useCallback as i}from"react";import r from"@mui/icons-material/ChevronRight";import{Caption as n}from"../Typography.mjs";import{Box as s}from"../_Primitives/Box.mjs";import{Stack as a}from"../_Primitives/Stack.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{ChatHistoryHeader as h}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as c}from"./ChatHistoryButtonBase.mjs";const m=({conversations:m,activeConversationId:d,onSelectConversation:C,onDeleteConversation:p,onNewConversation:v,onClose:f,onSearchChange:x,title:g="Chat history",emptyText:y="No conversations yet",newChatTitle:u="New chat",deleteConversationTitle:w="Delete conversation",searchPlaceholder:b="Search chat histories",searchDebounceMs:S=300,width:j=288,sx:T,formatMessageCount:B=e=>`${e} messages`,isCollapsed:D=!1,onToggleCollapse:k,collapsedWidth:A=40})=>{const[H,M]=t(""),N=i(e=>{M(e),x?.(e)},[x]);return e(s,{sx:{width:D?A:j,minWidth:D?A:0,flexShrink:0,borderRight:1,borderColor:"divider",overflow:"hidden",transition:"width 0.2s ease, min-width 0.2s ease",display:"flex",flexDirection:"column"},children:D?e(a,{sx:{justifyContent:"center",alignItems:"center",py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:e(l,{onClick:k,title:"Expand history",ariaLabel:"expand-history",sx:{width:36,height:36},children:e(r,{sx:{fontSize:18}})})}):o(a,{direction:"column",sx:[{flex:1,minHeight:0},...Array.isArray(T)?T:T?[T]:[]],children:[e(h,{title:g,newChatTitle:u,onNewConversation:v,onClose:f,onToggleCollapse:k,onSearchChange:N,searchPlaceholder:b,searchDebounceMs:S}),e(s,{component:"nav","aria-label":g,sx:{flex:1,overflowY:"auto",p:1},children:0===m.length?e(n,{sx:{display:"block",textAlign:"center",py:4},children:y}):m.map(o=>{const t=o.id===d;return e(c,{conversation:o,isActive:t,highlightQuery:H,onSelectConversation:C,onDeleteConversation:p,deleteConversationTitle:w,formatMessageCount:B},o.id)})})]})})};export{m as ChatHistory};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import r from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as i,Caption as n}from"../Typography.mjs";import{Box as a}from"../Box.mjs";import{IconButton as s}from"../Buttons/IconButton.mjs";import{colours as l}from"../../theme/tokens.mjs";const d=(e,r)=>{const t=r?.trim();if(!t)return e;const i=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(i).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(a,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},m=({conversation:m,isActive:p,highlightQuery:c,onSelectConversation:u,onDeleteConversation:b,deleteConversationTitle:x,formatMessageCount:g,showMessageCount:h=!1,sx:y})=>{const f=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(m);return e(a,{component:"div",role:"button",tabIndex:0,onClick:()=>u(m.id),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(m.id))},sx:[{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,textAlign:"left",backgroundColor:p?e=>"dark"===e.palette.mode?l.black:l.white:"transparent",backgroundImage:"none",opacity:1,position:"relative",zIndex:1,border:"1px solid",borderColor:p?l.primaryGreenActive:"transparent",cursor:"pointer",outline:"none","&:hover":{backgroundColor:p?e=>"dark"===e.palette.mode?l.black:l.white:"action.hover",backgroundImage:"none","& .delete-button":{visibility:"visible"}},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`},mb:.25},...Array.isArray(y)?y:y?[y]:[]],children:[o(r,{sx:{fontSize:14,color:p?l.primaryGreenActive:"text.disabled"}}),e(a,{sx:{flex:1,minWidth:0},children:[o(i,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:p?"text.primary":"text.secondary"},children:d(m.title,c)}),h&&o(n,{noWrap:!0,sx:{display:"block"},children:g(f)})]}),o(s,{className:"delete-button",title:x,ariaLabel:x,onClick:e=>{e.stopPropagation(),b&&Promise.resolve(b(m.id))},disabled:!b,sx:{visibility:"hidden"},children:o(t,{sx:{fontSize:14,color:p?"error.main":"text.disabled"}})})]})};export{m as ChatHistoryButtonBase};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import r from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as i,Caption as n}from"../Typography.mjs";import{GhostButton as a}from"../Buttons/GhostButton.mjs";import{Box as s}from"../_Primitives/Box.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{colours as m}from"../../theme/tokens.mjs";const d=(e,r)=>{const t=r?.trim();if(!t)return e;const i=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(i).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(s,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},p=({conversation:p,isActive:c,highlightQuery:u,onSelectConversation:b,onDeleteConversation:h,deleteConversationTitle:g,formatMessageCount:x,showMessageCount:y=!1,sx:f})=>{const v=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(p);return e(a,{onClick:()=>b(p.id),sx:[{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,backgroundColor:c?e=>"dark"===e.palette.mode?m.black:m.white:"transparent",backgroundImage:"none",opacity:1,position:"relative",zIndex:1,border:"1px solid",borderColor:c?m.primaryGreenActive:"transparent","&:hover":{backgroundColor:c?e=>"dark"===e.palette.mode?m.black:m.white:"action.hover",backgroundImage:"none","& .delete-button":{visibility:"visible"}},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`},mb:.25},...Array.isArray(f)?f:f?[f]:[]],children:[o(r,{sx:{fontSize:14,color:c?m.primaryGreenActive:"text.disabled"}}),e(s,{sx:{flex:1,minWidth:0},children:[o(i,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:c?"text.primary":"text.secondary"},children:d(p.title,u)}),y&&o(n,{noWrap:!0,sx:{display:"block"},children:x(v)})]}),o(l,{className:"delete-button",title:g,ariaLabel:g,onClick:e=>{e.stopPropagation(),h&&Promise.resolve(h(p.id))},disabled:!h,sx:{visibility:"hidden"},children:o(t,{sx:{fontSize:14,color:c?"error.main":"text.disabled"}})})]})};export{p as ChatHistoryButtonBase};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import r from"@mui/icons-material/Add";import o from"@mui/icons-material/ChevronLeft";import t from"@mui/icons-material/Clear";import a from"@mui/icons-material/Search";import{InputAdornment as l}from"@mui/material";import{useState as n,useEffect as s}from"react";import{Box as c}from"../Box.mjs";import{H3 as m}from"../Typography.mjs";import{IconButton as h}from"../Buttons/IconButton.mjs";import{Stack as d}from"../Stack.mjs";import{TextField as p}from"../TextField.mjs";const f=({title:f,newChatTitle:u,onNewConversation:x,onClose:C,onToggleCollapse:b,onSearchChange:g,searchPlaceholder:w="Search chat histories",searchDebounceMs:S=300})=>{const[y,j]=n("");return s(()=>{if(!g)return;const e=window.setTimeout(()=>{g(y)},S);return()=>window.clearTimeout(e)},[g,S,y]),e(d,{direction:"column",spacing:1,sx:{px:2,py:2,borderBottom:1,borderColor:"divider"},children:[e(d,{direction:"row",spacing:2,sx:{alignItems:"center",justifyContent:"space-between"},children:[i(m,{noWrap:!0,children:f}),e(d,{direction:"row",sx:{alignItems:"center"},children:[i(h,{onClick:x,title:u,ariaLabel:u,disabled:!x,children:i(r,{sx:{fontSize:16}})}),i(h,{onClick:b,title:"Collapse history",ariaLabel:"collapse-history",disabled:!b,sx:{width:36,height:36},children:i(o,{sx:{fontSize:18}})}),C&&i(h,{onClick:C,title:"Close history",ariaLabel:"close-history",children:i(o,{sx:{fontSize:16}})})]})]}),e(c,{sx:{display:"flex",alignItems:"center",gap:.75},children:[i(p,{fullWidth:!0,size:"small",value:y,onChange:e=>j(e.target.value),placeholder:w,slotProps:{htmlInput:{"aria-label":"Search chat histories"},input:{startAdornment:i(l,{position:"start",children:i(a,{sx:{fontSize:16,color:"text.disabled"}})})}}}),i(h,{title:"Clear search",ariaLabel:"clear-search",onClick:()=>j(""),disabled:!y,children:i(t,{sx:{fontSize:14}})})]})]})};export{f as ChatHistoryHeader};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import r from"@mui/icons-material/Add";import t from"@mui/icons-material/ChevronLeft";import o from"@mui/icons-material/Clear";import a from"@mui/icons-material/Search";import{InputAdornment as l}from"@mui/material";import{useState as n,useEffect as s}from"react";import{Box as c}from"../_Primitives/Box.mjs";import{H3 as m}from"../Typography.mjs";import{IconButton as h}from"../Buttons/IconButton.mjs";import{Stack as d}from"../_Primitives/Stack.mjs";import{TextField as p}from"../_Primitives/TextField.mjs";const f=({title:f,newChatTitle:u,onNewConversation:x,onClose:C,onToggleCollapse:b,onSearchChange:g,searchPlaceholder:w="Search chat histories",searchDebounceMs:S=300})=>{const[y,v]=n("");return s(()=>{if(!g)return;const e=window.setTimeout(()=>{g(y)},S);return()=>window.clearTimeout(e)},[g,S,y]),e(d,{direction:"column",spacing:1,sx:{px:2,py:2,borderBottom:1,borderColor:"divider"},children:[e(d,{direction:"row",spacing:2,sx:{alignItems:"center",justifyContent:"space-between"},children:[i(m,{noWrap:!0,children:f}),e(d,{direction:"row",sx:{alignItems:"center"},children:[i(h,{onClick:x,title:u,ariaLabel:u,disabled:!x,children:i(r,{sx:{fontSize:16}})}),i(h,{onClick:b,title:"Collapse history",ariaLabel:"collapse-history",disabled:!b,sx:{width:36,height:36},children:i(t,{sx:{fontSize:18}})}),C&&i(h,{onClick:C,title:"Close history",ariaLabel:"close-history",children:i(t,{sx:{fontSize:16}})})]})]}),e(c,{sx:{display:"flex",alignItems:"center",gap:.75},children:[i(p,{fullWidth:!0,size:"small",value:y,onChange:e=>v(e.target.value),placeholder:w,slotProps:{htmlInput:{"aria-label":"Search chat histories"},input:{startAdornment:i(l,{position:"start",children:i(a,{sx:{fontSize:16,color:"text.disabled"}})})}}}),i(h,{title:"Clear search",ariaLabel:"clear-search",onClick:()=>v(""),disabled:!y,children:i(o,{sx:{fontSize:14}})})]})]})};export{f as ChatHistoryHeader};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as t}from"react";import r from"@mui/icons-material/Send";import i from"@mui/icons-material/Stop";import{Box as n}from"../Box.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{Paper as a}from"../Paper.mjs";import{TextField as s}from"../TextField.mjs";import{colours as m}from"../../theme/tokens.mjs";const p=({onSend:p,disabled:d=!1,placeholder:c="Ask about campaigns, competitors, performance…",maxRows:u=5,sendButtonTitle:f="Send message",isStreaming:x=!1,onStop:b,stopButtonTitle:g="Stop generating",actions:h,value:S,onChange:v,inputRef:y})=>{const[j,k]=t(""),z=void 0!==S,B=z?S:j,R=e=>{z?v?.(e):k(e)},I=m.jadeLight,w=m.black,C=()=>{const e=B.trim();e&&!d&&(p(e),R(""))};return e(n,{component:"form",onSubmit:e=>{e.preventDefault(),x||C()},sx:{display:"flex",alignItems:"center",gap:1},children:o(a,{variant:"outlined",sx:{display:"flex",flex:1,alignItems:"center",gap:1,px:1.5,py:.75,borderRadius:2,borderColor:"text.jades"},children:[e(s,{variant:"standard",fullWidth:!0,multiline:!0,minRows:1,maxRows:u,value:B,onChange:e=>R(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),x||C())},placeholder:c,disabled:d,inputRef:y,slotProps:{htmlInput:{"aria-label":c},input:{disableUnderline:!0}},sx:{"& .MuiInputBase-input":{p:.5,fontSize:"0.875rem",color:"text.primary",resize:"none","&::placeholder":{color:"text.disabled",opacity:1}}}}),h,e(l,x&&b?{type:"button",title:g,onClick:b,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:"error.main",color:"error.contrastText","&:hover":{bgcolor:"error.dark"}},children:e(i,{sx:{fontSize:13}})}:{type:"submit",title:f,disabled:!B.trim()||d,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:I,color:w,"&:hover":{bgcolor:m.jade},"&.Mui-disabled":{bgcolor:I,color:w,opacity:.4}},children:e(r,{sx:{fontSize:13}})})]})})};export{p as ChatInput};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as o}from"react";import r from"@mui/icons-material/Send";import i from"@mui/icons-material/Stop";import{Box as n}from"../_Primitives/Box.mjs";import{IconButton as l}from"../Buttons/IconButton.mjs";import{Paper as a}from"../_Primitives/Paper.mjs";import{TextField as s}from"../_Primitives/TextField.mjs";import{colours as m}from"../../theme/tokens.mjs";const p=({onSend:p,disabled:d=!1,placeholder:c="Ask about campaigns, competitors, performance…",maxRows:u=5,sendButtonTitle:f="Send message",isStreaming:x=!1,onStop:b,stopButtonTitle:g="Stop generating",actions:h,value:v,onChange:S,inputRef:y})=>{const[j,k]=o(""),z=void 0!==v,B=z?v:j,R=e=>{z?S?.(e):k(e)},I=m.jadeLight,P=m.black,w=()=>{const e=B.trim();e&&!d&&(p(e),R(""))};return e(n,{component:"form",onSubmit:e=>{e.preventDefault(),x||w()},sx:{display:"flex",alignItems:"center",gap:1},children:t(a,{variant:"outlined",sx:{display:"flex",flex:1,alignItems:"center",gap:1,px:1.5,py:.75,borderRadius:2,borderColor:"text.jades"},children:[e(s,{variant:"standard",fullWidth:!0,multiline:!0,minRows:1,maxRows:u,value:B,onChange:e=>R(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),x||w())},placeholder:c,disabled:d,inputRef:y,slotProps:{htmlInput:{"aria-label":c},input:{disableUnderline:!0}},sx:{"& .MuiInputBase-input":{p:.5,fontSize:"0.875rem",color:"text.primary",resize:"none","&::placeholder":{color:"text.disabled",opacity:1}}}}),h,e(l,x&&b?{type:"button",title:g,onClick:b,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:"error.main",color:"error.contrastText","&:hover":{bgcolor:"error.dark"}},children:e(i,{sx:{fontSize:13}})}:{type:"submit",title:f,disabled:!B.trim()||d,variant:"filled",size:"small",sx:{flexShrink:0,bgcolor:I,color:P,"&:hover":{bgcolor:m.jade},"&.Mui-disabled":{bgcolor:I,color:P,opacity:.4}},children:e(r,{sx:{fontSize:13}})})]})})};export{p as ChatInput};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Box as s}from"../Box.mjs";import{AiButton as o}from"../Buttons/AiButton.mjs";const m=({onOpen:m,fabLabel:i,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(o,{onClick:m,"aria-label":i,label:t(s,{component:"span",sx:{display:{xs:"none",sm:"inline"}},children:i}),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{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 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as n}from"react";import{useTheme as t,useMediaQuery as r,Popover as l}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import m from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import c from"@mui/icons-material/GridView";import p from"@mui/icons-material/History";import{ChatHistory as d}from"./ChatHistory.mjs";import{ChatInput as h}from"./ChatInput.mjs";import{Dialog as f}from"../Dialog.mjs";import{Box as x}from"../Box.mjs";import{Stack as u}from"../Stack.mjs";import{Paper as C}from"../Paper.mjs";import{IconButton as g}from"../Buttons/IconButton.mjs";import{AiChip as v}from"../AiChip.mjs";import{Caption as b,H1 as w,H2 as y}from"../Typography.mjs";import{AgentChatWindowHeader as S}from"./AgentChatWindowHeader.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import{chatWindowMarkdownComponents as j}from"./ChatComponents/MarkdownContent.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/StopCircle";import k from"./ChatComponents/SuggestedPrompts.mjs";import z from"./ChatComponents/MessageList.mjs";import I from"./WidgetParts/WidgetInput.mjs";function D({open:D,onClose:T,title:A="Ask Nexus",subtitle:H="Ready to help",placeholder:E,suggestedPrompts:O=[],showAiChip:N=!0,isTyping:P,messages:W,streamingText:B,liveTraceEvents:L,showActivity:R=!1,onSend:M,onAbort:U,background:X,followUpPrompts:$,followUpLabel:F="Suggested follow-ups:",topOffset:G,conversations:V,activeConversationId:Y,onSelectConversation:q,onDeleteConversation:J,onNewConversation:K}){const Q=t(),Z=r(Q.breakpoints.down("md")),[_,ee]=n(!0),[oe,ie]=n(!1),[ne,te]=n(!1),[re,le]=n(null),se=W.length>0||P,me=se&&$&&$.length>0,ae=!Z||_,ce=void 0!==V;return e(f,{open:D,fullScreen:!0,onClose:T,sx:G?{top:`${G}px`}:void 0,children:o(x,{sx:{display:"flex",flexDirection:"column",height:G?`calc(100vh - ${G}px)`:"100vh",overflow:"hidden"},children:[o(x,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[ce&&e(x,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(d,{conversations:V,activeConversationId:Y??null,onSelectConversation:q??(()=>{}),onDeleteConversation:J,onNewConversation:K,isCollapsed:ne,onToggleCollapse:()=>te(e=>!e)})}),o(x,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(x,{sx:{position:"relative",flexShrink:0},children:[e(S,{title:A,subtitle:H,showAiChip:!1,actions:Z?e(u,{}):o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[N&&e(v,{}),e(g,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})}),Z&&o(u,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[ce&&e(g,{title:"Chat history",size:"small",onClick:()=>ie(e=>!e),children:e(p,{sx:{fontSize:18}})}),e(g,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})]}),o(x,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[X&&e(x,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:X}),se?o(x,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e(C,{sx:{borderRadius:0,border:"none",flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:e(z,{messages:W,isTyping:P,streamingText:B,liveTraceEvents:L,onAbort:U,showActivity:R,markdownComponents:j})}),me&&o(x,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:ae?.5:1,flexShrink:0},children:[o(u,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:ae?.75:0},children:[e(b,{children:F}),Z&&e(g,{size:"small",onClick:()=>ee(e=>!e),title:_?"Collapse suggestions":"Expand suggestions",children:e(_?a:m,{sx:{fontSize:16}})})]}),ae&&e(k,{prompts:$,onSelect:M})]}),e(C,{sx:{borderRadius:0,border:"none"},children:e(I,{placeholder:E,isTyping:P,onSend:M})})]}):o(C,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(w,{children:A}),e(y,{sx:{color:"text.secondary"},children:H})]}),e(x,{sx:{mt:10,width:"70%",minWidth:"min(40vw, 100%)"},children:e(h,{onSend:M,disabled:P,placeholder:E,actions:O.length>0?o(i,{children:[e(g,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:e=>le(e.currentTarget),children:e(c,{sx:{fontSize:18}})}),e(l,{open:Boolean(re),anchorEl:re,onClose:()=>le(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(x,{sx:{p:2,maxWidth:360},children:e(k,{prompts:O,onSelect:e=>{le(null),M(e)}})})})]}):void 0})})]})]})]})]}),ce&&Z&&o(i,{children:[oe&&e(x,{onClick:()=>ie(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(x,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:oe?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(d,{conversations:V,activeConversationId:Y??null,onSelectConversation:e=>{q?.(e),ie(!1)},onDeleteConversation:J,onNewConversation:K?()=>{K(),ie(!1)}:void 0,onClose:()=>ie(!1)})})]})]})})}export{D as NexusChatDialog};
1
+ import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as n}from"react";import{useTheme as t,useMediaQuery as r,Popover as l}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import m from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import c from"@mui/icons-material/GridView";import p from"@mui/icons-material/History";import{ChatHistory as d}from"./ChatHistory.mjs";import{ChatInput as h}from"./ChatInput.mjs";import{Dialog as f}from"../Dialog.mjs";import{Box as x}from"../_Primitives/Box.mjs";import{Stack as u}from"../_Primitives/Stack.mjs";import{Paper as g}from"../_Primitives/Paper.mjs";import{IconButton as C}from"../Buttons/IconButton.mjs";import{AiChip as v}from"../AiChip.mjs";import{Caption as w,H1 as b,H2 as y}from"../Typography.mjs";import{AgentChatWindowHeader as S}from"./AgentChatWindowHeader.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material/styles";import"../../theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import{chatWindowMarkdownComponents as j}from"./ChatComponents/MarkdownContent.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import k from"./ChatComponents/SuggestedPrompts.mjs";import z from"./ChatComponents/MessageList.mjs";import I from"./WidgetParts/WidgetInput.mjs";function D({open:D,onClose:T,title:H="Ask Nexus",subtitle:A="Ready to help",placeholder:P,suggestedPrompts:E=[],showAiChip:O=!0,isTyping:N,messages:W,streamingText:B,liveTraceEvents:L,showActivity:R=!1,onSend:M,onStop:U,background:_,followUpPrompts:X,followUpLabel:$="Suggested follow-ups:",topOffset:F,conversations:G,activeConversationId:V,onSelectConversation:Y,onDeleteConversation:q,onNewConversation:J}){const K=t(),Q=r(K.breakpoints.down("md")),[Z,ee]=n(!0),[oe,ie]=n(!1),[ne,te]=n(!1),[re,le]=n(null),se=W.length>0||N,me=se&&X&&X.length>0,ae=!Q||Z,ce=void 0!==G;return e(f,{open:D,fullScreen:!0,onClose:T,sx:F?{top:`${F}px`}:void 0,children:o(x,{sx:{display:"flex",flexDirection:"column",height:F?`calc(100vh - ${F}px)`:"100vh",overflow:"hidden"},children:[o(x,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[ce&&e(x,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(d,{conversations:G,activeConversationId:V??null,onSelectConversation:Y??(()=>{}),onDeleteConversation:q,onNewConversation:J,isCollapsed:ne,onToggleCollapse:()=>te(e=>!e)})}),o(x,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(x,{sx:{position:"relative",flexShrink:0},children:[e(S,{title:H,subtitle:A,showAiChip:!1,actions:Q?e(u,{}):o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[O&&e(v,{}),e(C,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})}),Q&&o(u,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[ce&&e(C,{title:"Chat history",size:"small",onClick:()=>ie(e=>!e),children:e(p,{sx:{fontSize:18}})}),e(C,{title:"Close full view",size:"small",onClick:T,children:e(s,{sx:{fontSize:16}})})]})]}),o(x,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[_&&e(x,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:_}),se?o(x,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e(g,{sx:{borderRadius:0,border:"none",flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:e(z,{messages:W,isTyping:N,streamingText:B,liveTraceEvents:L,showActivity:R,markdownComponents:j})}),me&&o(x,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:ae?.5:1,flexShrink:0},children:[o(u,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:ae?.75:0},children:[e(w,{children:$}),Q&&e(C,{size:"small",onClick:()=>ee(e=>!e),title:Z?"Collapse suggestions":"Expand suggestions",children:e(Z?a:m,{sx:{fontSize:16}})})]}),ae&&e(k,{prompts:X,onSelect:M})]}),e(g,{sx:{borderRadius:0,border:"none"},children:e(I,{placeholder:P,isStreaming:N,onStop:U,onSend:M})})]}):o(g,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(b,{children:H}),e(y,{sx:{color:"text.secondary"},children:A})]}),e(x,{sx:{mt:10,width:"70%",minWidth:"min(40vw, 100%)"},children:e(h,{onSend:M,isStreaming:N,onStop:U,placeholder:P,actions:E.length>0?o(i,{children:[e(C,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:e=>le(e.currentTarget),children:e(c,{sx:{fontSize:18}})}),e(l,{open:Boolean(re),anchorEl:re,onClose:()=>le(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(x,{sx:{p:2,maxWidth:360},children:e(k,{prompts:E,onSelect:e=>{le(null),M(e)}})})})]}):void 0})})]})]})]})]}),ce&&Q&&o(i,{children:[oe&&e(x,{onClick:()=>ie(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(x,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:oe?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(d,{conversations:G,activeConversationId:V??null,onSelectConversation:e=>{Y?.(e),ie(!1)},onDeleteConversation:q,onNewConversation:J?()=>{J(),ie(!1)}:void 0,onClose:()=>ie(!1)})})]})]})})}export{D as NexusChatDialog};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import{FABButton as o}from"./FABButton.mjs";import{GlassPaper as i}from"../GlassPaper.mjs";import a from"./WidgetParts/WidgetBody.mjs";import n from"./WidgetParts/WidgetHeader.mjs";import r from"./WidgetParts/WidgetInput.mjs";const m=["Summarise my latest data","What changed this week?","Show me the key trends","Help me understand my metrics"];function l({title:l="Ask Nexus",subtitle:d="Ready to help",fabLabel:p="Ask Nexus",avatarIcon:c,placeholder:x,emptyTitle:u="Ask Nexus",emptyDescription:g="Ask me anything about your data and I'll help you find answers.",dataSources:h,suggestedPrompts:f=m,isOpen:y,isTyping:b,messages:v,streamingText:T,liveTraceEvents:w,showActivity:A=!1,onOpen:P,onClose:S,onSend:I,onAbort:W,onExpandToFullPage:j,hideFab:k=!1,placement:B="bottom-right"}){if(k)return null;return e(t,{children:[y&&e(i,{elevation:8,sx:{boxShadow:e=>e.shadows[2],borderRadius:3,position:"fixed",bottom:{xs:16,sm:24},..."bottom-left"===B?{left:{xs:16,sm:24}}:{right:{xs:16,sm:24}},zIndex:e=>e.zIndex.appBar+50,display:"flex",flexDirection:"column",width:{xs:"calc(100vw - 32px)",sm:380},maxHeight:{xs:"min(560px, calc(100dvh - 88px))",sm:"min(520px, calc(100dvh - 104px))"},overflow:"hidden",p:0,"& > div":{display:"flex",flexDirection:"column",flex:1,minHeight:0}},children:[s(n,{title:l,subtitle:d,onExpandToFullPage:j,onClose:S,avatarIcon:c}),s(a,{avatarIcon:c,isTyping:b,liveTraceEvents:w,messages:v,onAbort:W,showActivity:A,streamingText:T,emptyTitle:u,emptyDescription:g,dataSources:h,suggestedPrompts:f,onSend:I}),s(r,{placeholder:x,isTyping:b,onSend:I})]}),!y&&s(o,{onOpen:P,fabLabel:p,placement:B})]})}export{l as NexusChatWidget};
1
+ import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import{FABButton as o}from"./FABButton.mjs";import{GlassPaper as i}from"../GlassPaper.mjs";import a from"./WidgetParts/WidgetBody.mjs";import n from"./WidgetParts/WidgetHeader.mjs";import r from"./WidgetParts/WidgetInput.mjs";const m=["Summarise my latest data","What changed this week?","Show me the key trends","Help me understand my metrics"];function l({title:l="Ask Nexus",subtitle:d="Ready to help",fabLabel:p="Ask Nexus",avatarIcon:c,placeholder:x,emptyTitle:u="Ask Nexus",emptyDescription:g="Ask me anything about your data and I'll help you find answers.",dataSources:h,suggestedPrompts:f=m,isOpen:y,isTyping:v,messages:b,streamingText:S,liveTraceEvents:w,showActivity:T=!1,onOpen:P,onClose:A,onSend:I,onStop:W,onExpandToFullPage:j,hideFab:k=!1,placement:B="bottom-right"}){if(k)return null;return e(t,{children:[y&&e(i,{elevation:8,sx:{boxShadow:e=>e.shadows[2],borderRadius:3,position:"fixed",bottom:{xs:16,sm:24},..."bottom-left"===B?{left:{xs:16,sm:24}}:{right:{xs:16,sm:24}},zIndex:e=>e.zIndex.appBar+50,display:"flex",flexDirection:"column",width:{xs:"calc(100vw - 32px)",sm:380},maxHeight:{xs:"min(560px, calc(100dvh - 88px))",sm:"min(520px, calc(100dvh - 104px))"},overflow:"hidden",p:0,"& > div":{display:"flex",flexDirection:"column",flex:1,minHeight:0}},children:[s(n,{title:l,subtitle:d,onExpandToFullPage:j,onClose:A,avatarIcon:c}),s(a,{avatarIcon:c,isTyping:v,liveTraceEvents:w,messages:b,showActivity:T,streamingText:S,emptyTitle:u,emptyDescription:g,dataSources:h,suggestedPrompts:f,onSend:I}),s(r,{placeholder:x,isStreaming:v,onStop:W,onSend:I})]}),!y&&s(o,{onOpen:P,fabLabel:p,placement:B})]})}export{l as NexusChatWidget};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Box as i}from"../../Box.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material";import"@mui/material/styles";import"../../../theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"react-markdown";import"remark-gfm";import"../../Typography.mjs";import"../../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/StopCircle";import o from"../ChatComponents/MessageList.mjs";import m from"../ChatComponents/EmptyState.mjs";const e=({avatarIcon:e,isTyping:r,liveTraceEvents:a,messages:s,onAbort:n,showActivity:p,streamingText:c,emptyTitle:l,emptyDescription:u,dataSources:h,suggestedPrompts:C,onSend:d})=>{const g=s.length>0||r;return t(i,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:g?t(o,{messages:s,isTyping:r,streamingText:c,liveTraceEvents:a,onAbort:n,avatarIcon:e,showActivity:p}):t(m,{title:l,description:u,dataSources:h,prompts:C.slice(0,4),avatarIcon:e,onSelect:d})})};export{e as default};
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/material";import"@mui/material/styles";import"../../../theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"react-markdown";import"remark-gfm";import"../../Typography.mjs";import"../../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import m from"../ChatComponents/MessageList.mjs";import e from"../ChatComponents/EmptyState.mjs";const o=({avatarIcon:o,isTyping:r,liveTraceEvents:a,messages:s,showActivity:n,streamingText:p,emptyTitle:c,emptyDescription:l,dataSources:u,suggestedPrompts:h,onSend:d})=>{const g=s.length>0||r;return t(i,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto"},children:g?t(m,{messages:s,isTyping:r,streamingText:p,liveTraceEvents:a,avatarIcon:o,showActivity:n,compact:!0}):t(e,{title:c,description:l,dataSources:u,prompts:h.slice(0,4),avatarIcon:o,onSelect:d})})};export{o as default};
@@ -1 +1 @@
1
- import{jsxs as o,jsx as i}from"react/jsx-runtime";import r from"../ChatComponents/ChatAvatar.mjs";import{Body1 as e,Caption as t}from"../../Typography.mjs";import{Stack as n}from"../../Stack.mjs";import{IconButton as l}from"../../Buttons/IconButton.mjs";import m from"@mui/icons-material/ArrowDropDown";import s from"@mui/icons-material/OpenInFull";const a=({onClose:a,onExpandToFullPage:c,avatarIcon:p,subtitle:d,title:f})=>o(n,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",px:2,py:1.5,flexShrink:0,alignItems:"center"},children:[i(r,{size:"sm",icon:p}),o(n,{direction:"column",spacing:0,sx:{flex:1,minWidth:0},children:[i(e,{sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),d&&i(t,{children:d})]}),i(l,{title:"Open full view",size:"small",onClick:c,disabled:!c,children:i(s,{sx:{fontSize:18}})}),i(l,{title:"Minimise",size:"small",onClick:a,children:i(m,{})})]});export{a as default};
1
+ import{jsxs as i,jsx as o}from"react/jsx-runtime";import r from"../ChatComponents/ChatAvatar.mjs";import{Body1 as e,Caption as t}from"../../Typography.mjs";import{Stack as n}from"../../_Primitives/Stack.mjs";import{IconButton as l}from"../../Buttons/IconButton.mjs";import m from"@mui/icons-material/ArrowDropDown";import s from"@mui/icons-material/OpenInFull";const a=({onClose:a,onExpandToFullPage:c,avatarIcon:p,subtitle:d,title:f})=>i(n,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",px:2,py:1.5,flexShrink:0,alignItems:"center"},children:[o(r,{size:"sm",icon:p}),i(n,{direction:"column",spacing:0,sx:{flex:1,minWidth:0},children:[o(e,{sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),d&&o(t,{children:d})]}),o(l,{title:"Open full view",size:"small",onClick:c,disabled:!c,children:o(s,{sx:{fontSize:18}})}),o(l,{title:"Minimise",size:"small",onClick:a,children:o(m,{})})]});export{a as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Box as r}from"../../Box.mjs";import{ChatInput as e}from"../ChatInput.mjs";const d=({placeholder:d,isTyping:p,onSend:i})=>o(r,{sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",p:1.5,flexShrink:0},children:o(e,{onSend:i,disabled:p,placeholder:d})});export{d as default};
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 +1 @@
1
- import{jsxs as r,Fragment as e,jsx as t}from"react/jsx-runtime";import{colours as i}from"../theme/tokens.mjs";const o=[0,60,120,180,240,300],l=({strokeColor:l=i.brilliantGreen,fillColor:n=i.brilliantGreen,strokeWidth:s=4.5,centerRadius:c=12})=>r(e,{children:[t("g",{stroke:l,strokeWidth:s,strokeLinecap:"round",children:o.map(e=>r("g",{transform:`rotate(${e})`,children:[t("line",{x1:"10",y1:"0",x2:"36",y2:"0"}),t("circle",{cx:"44",cy:"0",r:"10",fill:n,stroke:"none"})]},e))}),t("circle",{cx:"0",cy:"0",r:c,fill:n})]}),n=({size:r=200})=>t("svg",{width:r,height:r,viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",children:t("g",{transform:"translate(100, 100)",children:t(l,{})})});export{l as NexusLogoNode,n as NexusLogoNodeSvg};
1
+ import{jsxs as r,Fragment as e,jsx as t}from"react/jsx-runtime";import{colours as o}from"../theme/tokens.mjs";const i=[0,60,120,180,240,300],l=({strokeColor:l=o.brilliantGreen,fillColor:n=o.brilliantGreen,strokeWidth:c=4.5,centerRadius:s=12})=>r(e,{children:[t("g",{stroke:l,strokeWidth:c,strokeLinecap:"round",children:i.map(e=>r("g",{transform:`rotate(${e})`,children:[t("line",{x1:"10",y1:"0",x2:"36",y2:"0"}),t("circle",{cx:"44",cy:"0",r:"10",fill:n,stroke:"none"})]},e))}),t("circle",{cx:"0",cy:"0",r:s,fill:n})]});export{l as NexusLogoNode};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Paper as i}from"./Paper.mjs";import{Box as n}from"./Box.mjs";import{H3 as l,Body2 as t}from"./Typography.mjs";import{LoadingSpinnerNexus as o}from"./LoadingSpinnerNexus.mjs";const s=({title:s,description:c,actions:d,isLoading:m,isError:x,errorMessage:h,children:p,...a})=>{if(m)return r(i,{...a,children:[r(n,{sx:{mb:2},children:[e(l,{children:s}),c&&e(t,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(o,{})})]});if(x)return r(i,{...a,children:[r(n,{sx:{mb:2},children:[e(l,{children:s}),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 ${s}.`})})]});const f=s||c||d;return r(i,{...a,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:s}),c&&e(t,{sx:{mt:.5},children:c})]}),d&&e(n,{sx:{flexShrink:0},children:d})]}),p]})};export{s as PaperAsync};
1
+ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{Paper as e}from"./_Primitives/Paper.mjs";import{Box as n}from"./_Primitives/Box.mjs";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:p,...a})=>{if(d)return r(e,{...a,children:[r(n,{sx:{mb:2},children:[i(l,{children:o}),c&&i(t,{sx:{mt:.5},children:c})]}),i(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:i(s,{})})]});if(x)return r(e,{...a,children:[r(n,{sx:{mb:2},children:[i(l,{children:o}),c&&i(t,{sx:{mt:.5},children:c})]}),i(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:i(t,{color:"error",sx:{p:2},children:h??`Failed to load ${o}.`})})]});const f=o||c||m;return r(e,{...a,children:[f&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:2.5},children:[r(n,{children:[i(l,{children:o}),c&&i(t,{sx:{mt:.5},children:c})]}),m&&i(n,{sx:{flexShrink:0},children:m})]}),p]})};export{o as PaperAsync};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Tooltip as a}from"@mui/material";import{useTheme as i,alpha as e}from"@mui/material/styles";import{Chip as t}from"./Chip.mjs";import{RagDot as o}from"./RagDot.mjs";const m=r=>"jade"===r?"On Track":"amber"===r?"At Risk":"cherry"===r?"Off Track":void 0,l=({label:l,status:n,colour:s,size:c="small",variant:u="outlined",sx:d,...p})=>{const f=i(),k=s||(r=>{if(r)return"On Track"===r?"jade":"At Risk"===r?"amber":"Off Track"===r?"cherry":void 0})(n)||"jade",b="jade"===k?f.palette.success.main:"amber"===k?f.palette.warning.main:"cherry"===k?f.palette.error.main:k,h=l??n??m(k)??"On Track",j=n??m(k)??"On Track";return r(a,{title:h,arrow:!0,children:r(t,{label:h,icon:r(o,{status:j}),size:c,variant:u,sx:[{color:b,px:1,borderColor:"outlined"===u?b:void 0,backgroundColor:e(b,"filled"===u?.2:.12),"& .MuiChip-label":{color:b},"& .MuiChip-icon":{marginLeft:.75,marginRight:0}},...Array.isArray(d)?d:d?[d]:[]],...p})})};export{l as RagChip};
1
+ import{jsx as r}from"react/jsx-runtime";import{Tooltip as i}from"@mui/material";import{useTheme as a,alpha as e}from"@mui/material/styles";import{Chip as t}from"./_Primitives/Chip.mjs";import{RagDot as o}from"./RagDot.mjs";const m=r=>"jade"===r?"On Track":"amber"===r?"At Risk":"cherry"===r?"Off Track":void 0,l=({label:l,status:n,colour:s,size:c="small",variant:u="outlined",sx:d,...p})=>{const f=a(),k=s||(r=>{if(r)return"On Track"===r?"jade":"At Risk"===r?"amber":"Off Track"===r?"cherry":void 0})(n)||"jade",b="jade"===k?f.palette.success.main:"amber"===k?f.palette.warning.main:"cherry"===k?f.palette.error.main:k,h=l??n??m(k)??"On Track",j=n??m(k)??"On Track";return r(i,{title:h,arrow:!0,children:r(t,{label:h,icon:r(o,{status:j}),size:c,variant:u,sx:[{color:b,px:1,borderColor:"outlined"===u?b:void 0,backgroundColor:e(b,"filled"===u?.2:.12),"& .MuiChip-label":{color:b},"& .MuiChip-icon":{marginLeft:.75,marginRight:0}},...Array.isArray(d)?d:d?[d]:[]],...p})})};export{l as RagChip};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{SecondaryButton as o}from"../Buttons/SecondaryButton.mjs";import{alpha as t}from"@mui/material";import{useTheme as e}from"@mui/material/styles";import{colours as i}from"../../theme/tokens.mjs";const n=({item:n,isActive:d,collapsed:a,linkComponent:l,onSelect:m})=>{const s="dark"===e().palette.mode?i.jadeLight:i.jadeDark,c=n.icon;return r(o,{startIcon:r(c,{}),fullWidth:!0,...l?{component:l}:{},...l?{href:n.href}:{},title:a?n.label:void 0,"aria-current":d?"page":void 0,onClick:m?()=>m(n):void 0,sx:[{justifyContent:a?"center":"flex-start",px:1,borderRadius:1,minWidth:0,color:s,borderColor:a?"transparent":s,borderWidth:a?0:"1.5px",borderStyle:"solid",backgroundColor:"transparent","&:hover":{color:s,borderColor:a?"transparent":s,borderWidth:a?0:"1.5px",backgroundColor:t(s,.15)},"&.Mui-disabled":{color:t(s,.6),borderColor:a?"transparent":t(s,.6),borderWidth:a?0:"1.5px"},"& .MuiButton-startIcon":{marginRight:a?0:void 0,marginLeft:0}},d&&{backgroundColor:t(s,.35),borderLeftColor:s,borderLeftWidth:"3px",borderLeftStyle:"solid",fontWeight:700,"&:hover":{backgroundColor:t(s,.28)}}],children:!a&&r("span",{children:n.label})},n.href)};export{n as SideBladeNavListItem};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Tooltip as o}from"@mui/material";import{Paper as r}from"./Paper.mjs";import{useTheme as e}from"@mui/material/styles";const i=({title:i,children:n,...l})=>{const a=e(),m="light"===a.palette.mode?a.palette.common.black:a.palette.common.white;return function(t){return"string"==typeof t||"number"==typeof t}(i)?t(o,{title:i,...l,children:n}):t(o,{...l,title:t(r,{sx:{backgroundColor:a.palette.background.paper,color:a.palette.text.primary,border:`1px solid ${m}`,boxShadow:a.shadows[4],p:1,minWidth:180},children:i}),slotProps:{tooltip:{sx:{backgroundColor:"transparent",boxShadow:"none",p:0,border:"none",color:"inherit",minWidth:0}}},children:n})};export{i as Tooltip};
1
+ import{jsx as t}from"react/jsx-runtime";import{Tooltip as o}from"@mui/material";import{Paper as r}from"./_Primitives/Paper.mjs";import{useTheme as e}from"@mui/material/styles";const i=({title:i,children:n,...l})=>{const m=e(),a="light"===m.palette.mode?m.palette.common.black:m.palette.common.white;return function(t){return"string"==typeof t||"number"==typeof t}(i)?t(o,{title:i,...l,children:n}):t(o,{...l,title:t(r,{sx:{backgroundColor:m.palette.background.paper,color:m.palette.text.primary,border:`1px solid ${a}`,boxShadow:m.shadows[4],p:1,minWidth:180},children:i}),slotProps:{tooltip:{sx:{backgroundColor:"transparent",boxShadow:"none",p:0,border:"none",color:"inherit",minWidth:0}}},children:n})};export{i as Tooltip};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{CircularProgress as m}from"@mui/material";const o=o=>r(m,{...o});export{o as CircularProgress};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{Link as o}from"@mui/material";import{useTokens as e}from"../../theme/useTokens.mjs";const t=({openInNewTab:t=!1,children:n,sx:i,...a})=>{const m=e().text.blues;return r(o,{target:t?"_blank":void 0,rel:t?"noopener noreferrer":void 0,sx:[{color:m,textDecorationColor:m,"&:hover":{color:m,opacity:.8}},...Array.isArray(i)?i:i?[i]:[]],...a,children:n})};export{t as Link};
@@ -1 +1 @@
1
- const o="2.0.1";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.1.0";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, ReactElement, 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, SwitchProps, AccordionSummaryProps, ButtonProps, ChipProps, CardProps as CardProps$1, PaperProps, CollapseProps, ButtonBaseProps, CheckboxProps, FormControlLabelProps, FormGroupProps, DialogProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogTitleProps, DividerProps, 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, CollapseProps, ContainerProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogProps, DialogTitleProps, DividerProps, FormControlLabelProps, FormGroupProps, GridProps, MenuItem, PaperProps, StackProps, SwitchProps, TabProps, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
3
+ import { AlertProps, BoxProps, SxProps as SxProps$1, Theme as Theme$1, TypographyProps, ContainerProps, GridProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1, SwitchProps, AccordionSummaryProps, ButtonProps, ChipProps, CardProps as CardProps$1, PaperProps, CircularProgressProps, CollapseProps, ButtonBaseProps, CheckboxProps, FormControlLabelProps, FormGroupProps, DialogProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogTitleProps, DividerProps, 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, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
5
5
  import { SxProps, Theme } from '@mui/material/styles';
6
6
  import { Components } from 'react-markdown';
7
7
  import { DataGridProps } from '@mui/x-data-grid';
@@ -146,7 +146,7 @@ interface NexusChatWidgetProps {
146
146
  onOpen: () => void;
147
147
  onClose: () => void;
148
148
  onSend: (message: string) => void;
149
- onAbort?: () => void;
149
+ onStop?: () => void;
150
150
  onExpandToFullPage?: () => void;
151
151
  /** hideFab - Pass true to hide the FAB (e.g. when on the full-page chat route).
152
152
  * Consumer computes this: hideFab={pathname === ROUTES.AGENT} */
@@ -154,7 +154,7 @@ interface NexusChatWidgetProps {
154
154
  /** Anchor corner for the floating widget and FAB. Defaults to 'bottom-right'. */
155
155
  placement?: "bottom-right" | "bottom-left";
156
156
  }
157
- declare function NexusChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onAbort, onExpandToFullPage, hideFab, placement, }: NexusChatWidgetProps): react.JSX.Element | null;
157
+ declare function NexusChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onStop, onExpandToFullPage, hideFab, placement, }: NexusChatWidgetProps): react.JSX.Element | null;
158
158
 
159
159
  declare const Box: ({ children, ...rest }: BoxProps) => react.JSX.Element;
160
160
 
@@ -200,7 +200,7 @@ interface NexusChatDialogProps {
200
200
  liveTraceEvents?: TraceEvent[];
201
201
  showActivity?: boolean;
202
202
  onSend: (message: string) => void;
203
- onAbort?: () => void;
203
+ onStop?: () => void;
204
204
  /** Rendered as an absolute-fill layer behind the glass body, e.g. <GreenWaveBackground /> */
205
205
  background?: React.ReactNode;
206
206
  /** Prompt chips shown in a paper strip directly above the input during an active conversation */
@@ -217,7 +217,7 @@ interface NexusChatDialogProps {
217
217
  onDeleteConversation?: (id: string) => void | Promise<boolean>;
218
218
  onNewConversation?: () => void;
219
219
  }
220
- declare function NexusChatDialog({ open, onClose, title, subtitle, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react.JSX.Element;
220
+ declare function NexusChatDialog({ open, onClose, title, subtitle, placeholder, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onStop, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react.JSX.Element;
221
221
 
222
222
  interface FABButtonProps {
223
223
  onOpen: () => void;
@@ -318,11 +318,12 @@ declare const ChatAvatar: ({ size, icon, sx }: ChatAvatarProps) => react.JSX.Ele
318
318
  interface MarkdownContentProps {
319
319
  content: string;
320
320
  highlightQuery?: string;
321
+ compact?: boolean;
321
322
  /** Override or extend the default markdown component renderers */
322
323
  components?: Partial<Components>;
323
324
  }
324
325
  declare const chatWindowMarkdownComponents: Partial<Components>;
325
- declare const MarkdownContent: ({ content, highlightQuery, components: extraComponents }: MarkdownContentProps) => react.JSX.Element;
326
+ declare const MarkdownContent: ({ content, highlightQuery, compact, components: extraComponents, }: MarkdownContentProps) => react.JSX.Element;
326
327
 
327
328
  interface MessageBubbleProps {
328
329
  message: ChatMessage;
@@ -336,8 +337,9 @@ interface MessageBubbleProps {
336
337
  contentRenderer?: (content: string) => React.ReactNode;
337
338
  /** Override or extend individual markdown element renderers */
338
339
  markdownComponents?: Partial<Components>;
340
+ compact?: boolean;
339
341
  }
340
- declare const MessageBubble: ({ message, highlightQuery, showActivity, onFeedback, onDownloadFile, contentRenderer, markdownComponents, }: MessageBubbleProps) => react.JSX.Element;
342
+ declare const MessageBubble: ({ message, highlightQuery, showActivity, onFeedback, onDownloadFile, contentRenderer, markdownComponents, compact, }: MessageBubbleProps) => react.JSX.Element;
341
343
 
342
344
  interface MessageFeedbackBarProps {
343
345
  message: ChatMessage;
@@ -350,10 +352,12 @@ interface StreamingBubbleProps {
350
352
  traceEvents: TraceEvent[];
351
353
  highlightQuery?: string;
352
354
  avatarIcon?: React.ReactNode;
355
+ /** @deprecated Stop is now handled by ChatInput — this prop is ignored */
353
356
  onAbort?: () => void;
354
357
  showActivity?: boolean;
358
+ compact?: boolean;
355
359
  }
356
- declare const StreamingBubble: ({ text, traceEvents, highlightQuery, avatarIcon, onAbort, showActivity, }: StreamingBubbleProps) => react.JSX.Element;
360
+ declare const StreamingBubble: ({ text, traceEvents, highlightQuery, avatarIcon, compact, showActivity, }: StreamingBubbleProps) => react.JSX.Element;
357
361
 
358
362
  interface TypingIndicatorProps {
359
363
  traceLabel?: string;
@@ -376,9 +380,10 @@ interface MessageListProps {
376
380
  onAbort?: () => void;
377
381
  avatarIcon?: React.ReactNode;
378
382
  showActivity?: boolean;
383
+ compact?: boolean;
379
384
  markdownComponents?: Partial<Components>;
380
385
  }
381
- declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, showActivity, markdownComponents, }: MessageListProps) => react.JSX.Element;
386
+ declare const MessageList: ({ messages, isTyping, streamingText, liveTraceEvents, highlightQuery, onAbort, showActivity, compact, markdownComponents, }: MessageListProps) => react.JSX.Element;
382
387
 
383
388
  interface EmptyStateProps {
384
389
  title: string;
@@ -591,12 +596,38 @@ declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react.
591
596
  type AiGlassPaperProps = GlassPaperProps;
592
597
  declare const AiGlassPaper: ({ sx, children, ...rest }: AiGlassPaperProps) => react.JSX.Element;
593
598
 
599
+ declare const CircularProgress: (props: CircularProgressProps) => react.JSX.Element;
600
+
594
601
  declare const Collapse: ({ children, ...rest }: CollapseProps) => react.JSX.Element;
595
602
 
596
603
  declare const NexusDataGrid: ({ sx, ...rest }: DataGridProps) => react.JSX.Element;
597
604
 
598
605
  declare const ButtonBase: (props: ButtonBaseProps) => react.JSX.Element;
599
606
 
607
+ type GhostButtonProps = ButtonBaseProps;
608
+ /**
609
+ * Invisible interactive button — no background, border, or padding.
610
+ * Use for interactive regions where sighted users rely on layout or iconography
611
+ * to understand clickability (collapsible headers, clickable cards, row expanders).
612
+ * Inherits font and text alignment from context; all other button chrome is stripped.
613
+ *
614
+ * Always supply `aria-label` or visible text content so the action is announced
615
+ * to screen reader users. Add `aria-expanded` for toggle controls.
616
+ *
617
+ * ```tsx
618
+ * <GhostButton
619
+ * onClick={handleToggle}
620
+ * aria-expanded={isOpen}
621
+ * aria-label="Toggle section"
622
+ * sx={{ display: "flex", width: "100%", alignItems: "center", gap: 1 }}
623
+ * >
624
+ * <span>{label}</span>
625
+ * <ChevronDownIcon aria-hidden="true" />
626
+ * </GhostButton>
627
+ * ```
628
+ */
629
+ declare const GhostButton: React.FC<GhostButtonProps>;
630
+
600
631
  declare const Checkbox: (props: CheckboxProps) => react.JSX.Element;
601
632
 
602
633
  declare const FormControlLabel: (props: FormControlLabelProps) => react.JSX.Element;
@@ -704,7 +735,7 @@ interface LocationMultiSelectProps {
704
735
  menuSx?: SxProps$1<Theme>;
705
736
  selectSx?: SxProps$1<Theme>;
706
737
  }
707
- declare const LocationMultiSelect: react__default.FC<LocationMultiSelectProps>;
738
+ declare const LocationMultiSelect: React.FC<LocationMultiSelectProps>;
708
739
 
709
740
  type NodeShimmerMode = {
710
741
  shimmer: "text";
@@ -1077,5 +1108,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
1077
1108
  declare const leftPipe: SxProps<Theme>;
1078
1109
  declare const expandableText: (isExpanded: boolean) => SxProps<Theme>;
1079
1110
 
1080
- export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatWindow, AgentChatWindowHeader, AiButton, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, ButtonBase, Caption, Card, ChatAvatar, ChatHistory, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatWindowBody, Checkbox, CheckboxGroup, Chip, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormGroup, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MuiAppThemeProvider, NexusBarChart, NexusChatDialog, NexusChatWidget, NexusDataGrid, NexusHome, NexusLineChart, NexusLogo, NexusPieChart, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, RagChip, RagDot, SearchInput, SecondaryButton, SecondaryButtonLink, Select, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, useThemeMode, useTokens };
1081
- export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, CardProps, CardTrend, ChatAvatarProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, EmptyStateProps, FABButtonProps, FileArtifact, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, ModeTokens, NexusBarChartProps, NexusChatDialogProps, NexusChatWidgetProps, NexusLineChartProps, NexusPieChartProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SelectOption, SelectProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, TooltipProps, TraceEvent, TypingIndicatorProps };
1111
+ export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatWindow, AgentChatWindowHeader, AiButton, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, ButtonBase, Caption, Card, ChatAvatar, ChatHistory, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MuiAppThemeProvider, NexusBarChart, NexusChatDialog, NexusChatWidget, NexusDataGrid, NexusHome, NexusLineChart, NexusLogo, NexusPieChart, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, RagChip, RagDot, SearchInput, SecondaryButton, SecondaryButtonLink, Select, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, useThemeMode, useTokens };
1112
+ export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, CardProps, CardTrend, ChatAvatarProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, EmptyStateProps, FABButtonProps, FileArtifact, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, ModeTokens, NexusBarChartProps, NexusChatDialogProps, NexusChatWidgetProps, NexusLineChartProps, NexusPieChartProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SelectOption, SelectProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, TooltipProps, TraceEvent, TypingIndicatorProps };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/Alert.mjs";export{NexusChatWidget}from"./components/NexusChat/NexusChatWidget.mjs";export{NexusChatDialog}from"./components/NexusChat/NexusChatDialog.mjs";export{FABButton}from"./components/NexusChat/FABButton.mjs";export{AgentChatWindow}from"./components/NexusChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/NexusChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/NexusChat/ChatInput.mjs";export{ChatHistory}from"./components/NexusChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/NexusChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/NexusChat/ChatHistoryButtonBase.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/NexusChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/NexusChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/NexusChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/NexusChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/NexusChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/NexusChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/NexusChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/NexusChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/NexusChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/NexusChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/NexusChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/NexusChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/Container.mjs";export{Grid}from"./components/Grid.mjs";export{Link}from"./components/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{Switch}from"./components/Switch.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,Span}from"./components/Typography.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/Box.mjs";export{Collapse}from"./components/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/FormControls/Checkbox.mjs";export{FormControlLabel}from"./components/FormControls/FormControlLabel.mjs";export{FormGroup}from"./components/FormControls/FormGroup.mjs";export{CheckboxGroup}from"./components/FormControls/CheckboxGroup.mjs";export{Chip}from"./components/Chip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/Dialog.mjs";export{Divider}from"./components/Divider.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/LogoOptions/index.mjs";export{NexusHome}from"./components/NexusHome.mjs";export{default as NexusLogo}from"./components/NexusLogo.mjs";export{Paper}from"./components/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{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBladeNavListItem.mjs";export{Skeleton}from"./components/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/Tab.mjs";export{Tabs}from"./components/Tabs.mjs";export{TextField}from"./components/TextField.mjs";export{ThemeToggle}from"./components/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./theme/tokens.mjs";export{useTokens}from"./theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./theme/MuiAppThemeProvider.mjs";export{ThemeModeContext,ThemeModeProvider,useThemeMode}from"./theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./theme/sxHelpers.mjs";
1
+ export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/_Primitives/Alert.mjs";export{NexusChatWidget}from"./components/NexusChat/NexusChatWidget.mjs";export{NexusChatDialog}from"./components/NexusChat/NexusChatDialog.mjs";export{FABButton}from"./components/NexusChat/FABButton.mjs";export{AgentChatWindow}from"./components/NexusChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/NexusChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/NexusChat/ChatInput.mjs";export{ChatHistory}from"./components/NexusChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/NexusChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/NexusChat/ChatHistoryButtonBase.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/NexusChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/NexusChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/NexusChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/NexusChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/NexusChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/NexusChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/NexusChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/NexusChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/NexusChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/NexusChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/NexusChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/NexusChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/_Primitives/Container.mjs";export{Grid}from"./components/_Primitives/Grid.mjs";export{Link}from"./components/_Primitives/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{Switch}from"./components/_Primitives/Switch.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,Span}from"./components/Typography.mjs";export{ActionBar}from"./components/ActionBar.mjs";export{AccordionGroup,AccordionGroupItem}from"./components/AccordionGroup.mjs";export{AccordionSingle}from"./components/AccordionSingle.mjs";export{AiButton}from"./components/Buttons/AiButton.mjs";export{AiChip}from"./components/AiChip.mjs";export{AiCard}from"./components/AiCard.mjs";export{AiGlassCard}from"./components/AiGlassCard.mjs";export{AiPaper}from"./components/AiPaper.mjs";export{AiGlassPaper}from"./components/AiGlassPaper.mjs";export{Box}from"./components/_Primitives/Box.mjs";export{CircularProgress}from"./components/_Primitives/CircularProgress.mjs";export{Collapse}from"./components/_Primitives/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{GhostButton}from"./components/Buttons/GhostButton.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/FormControls/Checkbox.mjs";export{FormControlLabel}from"./components/FormControls/FormControlLabel.mjs";export{FormGroup}from"./components/FormControls/FormGroup.mjs";export{CheckboxGroup}from"./components/FormControls/CheckboxGroup.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/Dialog.mjs";export{Divider}from"./components/_Primitives/Divider.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/LogoOptions/index.mjs";export{NexusHome}from"./components/NexusHome.mjs";export{default as NexusLogo}from"./components/NexusLogo.mjs";export{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{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBlade/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBlade/SideBladeNavListItem.mjs";export{Skeleton}from"./components/_Primitives/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/_Primitives/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/_Primitives/Tab.mjs";export{Tabs}from"./components/_Primitives/Tabs.mjs";export{TextField}from"./components/_Primitives/TextField.mjs";export{ThemeToggle}from"./components/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./theme/tokens.mjs";export{useTokens}from"./theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./theme/MuiAppThemeProvider.mjs";export{ThemeModeContext,ThemeModeProvider,useThemeMode}from"./theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./theme/sxHelpers.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
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{Link as o}from"@mui/material";import{useTokens as e}from"../theme/useTokens.mjs";const t=({openInNewTab:t=!1,children:n,sx:i,...a})=>{const m=e().text.blues;return r(o,{target:t?"_blank":void 0,rel:t?"noopener noreferrer":void 0,sx:[{color:m,textDecorationColor:m,"&:hover":{color:m,opacity:.8}},...Array.isArray(i)?i:i?[i]:[]],...a,children:n})};export{t as Link};
@@ -1 +0,0 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SecondaryButton as o}from"./Buttons/SecondaryButton.mjs";import{alpha as t}from"@mui/material";import{useTheme as e}from"@mui/material/styles";import{colours as i}from"../theme/tokens.mjs";const n=({item:n,isActive:a,collapsed:d,linkComponent:l,onSelect:m})=>{const s="dark"===e().palette.mode?i.jadeLight:i.jadeDark,c=n.icon;return r(o,{startIcon:r(c,{}),fullWidth:!0,...l?{component:l}:{},...l?{href:n.href}:{},title:d?n.label:void 0,"aria-current":a?"page":void 0,onClick:m?()=>m(n):void 0,sx:[{justifyContent:d?"center":"flex-start",px:1,borderRadius:1,minWidth:0,color:s,borderColor:d?"transparent":s,borderWidth:d?0:"1.5px",borderStyle:"solid",backgroundColor:"transparent","&:hover":{color:s,borderColor:d?"transparent":s,borderWidth:d?0:"1.5px",backgroundColor:t(s,.15)},"&.Mui-disabled":{color:t(s,.6),borderColor:d?"transparent":t(s,.6),borderWidth:d?0:"1.5px"},"& .MuiButton-startIcon":{marginRight:d?0:void 0,marginLeft:0}}],children:!d&&r("span",{children:n.label})},n.href)};export{n as SideBladeNavListItem};