sage-nexus-ui 1.13.21 → 1.13.23
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.
- package/dist/_virtual/index.mjs +1 -1
- package/dist/_virtual/index2.mjs +1 -1
- package/dist/components/NexusChat/AgentChatWindow.mjs +1 -1
- package/dist/components/NexusChat/ChatComponents/MarkdownContent.mjs +1 -1
- package/dist/components/NexusChat/ChatComponents/MessageBubble.mjs +1 -1
- package/dist/components/NexusChat/ChatComponents/MessageFeedbackBar.mjs +1 -0
- package/dist/components/NexusChat/ChatInput.mjs +1 -1
- package/dist/components/NexusChat/NexusChatDialog.mjs +1 -1
- package/dist/components/NexusChat/WidgetParts/WidgetBody.mjs +1 -1
- package/dist/generated/version.mjs +1 -1
- package/dist/index.d.ts +38 -5
- package/dist/index.mjs +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.mjs +1 -1
- package/dist/node_modules/unified/lib/index.mjs +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getDefaultExportFromCjs as e}from"./_commonjsHelpers.mjs";import{__require as
|
|
1
|
+
import{getDefaultExportFromCjs as e}from"./_commonjsHelpers.mjs";import{__require as m}from"../node_modules/extend/index.mjs";var o=e(m());export{o as default};
|
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getDefaultExportFromCjs as e}from"./_commonjsHelpers.mjs";import{__require as
|
|
1
|
+
import{getDefaultExportFromCjs as e}from"./_commonjsHelpers.mjs";import{__require as o}from"../node_modules/style-to-js/cjs/index.mjs";var s=e(o());export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,
|
|
1
|
+
import{jsx as i,jsxs as e,Fragment as t}from"react/jsx-runtime";import{Box as o}from"../Box.mjs";import{Stack as r}from"../Stack.mjs";import{Caption as m}from"../Typography.mjs";import{GlassPaper as n}from"../GlassPaper.mjs";import{Paper as s}from"../Paper.mjs";import{ChatInput as l}from"./ChatInput.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react";import"../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/Download";import"@mui/material";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import a from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as p}from"./AgentChatWindowHeader.mjs";const c=({title:c="Nexus AI Chat",subtitle:d="Your intelligent assistant",showAiChip:u=!0,headerActions:h,body:x,followUpLabel:f="Suggested follow-ups:",followUpPrompts:C,onSelectFollowUp:b,onSend:g,inputDisabled:y=!1,inputPlaceholder:j="Ask me anything...",isStreaming:w=!1,onStop:S,inputActions:A,inputRef:k,isEmpty:D=!1,sx:I})=>{const P=Boolean(C&&C.length>0&&b),R=i(l,{onSend:g,disabled:y,placeholder:j,isStreaming:w,onStop:S,actions:A,inputRef:k});return e(o,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],children:[i(p,{title:c,subtitle:d,showAiChip:u,actions:h}),D?e(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[x,i(o,{sx:{mt:3,width:"100%",maxWidth:700},children:R})]}):e(t,{children:[i(n,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:x}),P&&e(r,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[i(m,{sx:{display:"block",mb:1},children:f}),i(a,{prompts:C??[],onSelect:b})]}),i(s,{sx:{borderRadius:0,border:"none"},children:i(o,{sx:{p:2,flexShrink:0},children:R})})]})]})};export{c as AgentChatWindow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{isValidElement as e,cloneElement as o}from"react";import{Box as n}from"../../Box.mjs";import{Paper as i}from"../../Paper.mjs";import{H4 as t,H3 as l,Body1 as m}from"../../Typography.mjs";import{Code as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{isValidElement as e,cloneElement as o}from"react";import{Box as n}from"../../Box.mjs";import{Paper as i}from"../../Paper.mjs";import{H4 as t,H3 as l,Body1 as m}from"../../Typography.mjs";import{Code as c}from"../../Code.mjs";import{Markdown as d}from"../../../node_modules/react-markdown/lib/index.mjs";import p from"../../../node_modules/remark-gfm/lib/index.mjs";const s=(e,o)=>{const i=o?.trim();if(!i)return e;const t=new RegExp(`(${(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(i)})`,"ig");return e.split(t).map((e,o)=>{if(!e)return null;return e.toLowerCase()===i.toLowerCase()?r(n,{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})},a=(r,n)=>{if("string"==typeof r)return s(r,n);if("number"==typeof r)return s(r.toString(),n);if(Array.isArray(r))return r.map(r=>a(r,n));if(e(r)){const e=r.props.children;return void 0===e?r:o(r,void 0,a(e,n))}return r},h=({content:e,highlightQuery:o,components:s})=>{const h=r=>a(r,o),u={p:({children:e})=>r(m,{sx:{mb:1,"&:last-child":{mb:0}},children:h(e)}),strong:({children:e})=>r(n,{component:"strong",sx:{fontWeight:700},children:h(e)}),em:({children:e})=>r(n,{component:"em",sx:{fontStyle:"italic"},children:h(e)}),ul:({children:e})=>r(n,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:h(e)}),ol:({children:e})=>r(n,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:h(e)}),li:({children:e})=>r(n,{component:"li",children:h(e)}),h1:({children:e})=>r(l,{sx:{mb:1,mt:.5},children:h(e)}),h2:({children:e})=>r(t,{sx:{mb:.5,mt:.5},children:h(e)}),h3:({children:e})=>r(t,{sx:{mb:.5,mt:.5},children:h(e)}),code:({children:e})=>r(c,{children:h(e)}),pre:({children:e})=>r(i,{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:h(e)}),hr:()=>r(n,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}})};return r(d,{remarkPlugins:[p],components:{...u,...s},children:e})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../Box.mjs";import{Stack as c}from"../../Stack.mjs";import{NexusLogoNodeSvg as s}from"../../NexusLogoNode.mjs";import{IconButton as m}from"../../IconButton.mjs";import{SecondaryButton as d}from"../../SecondaryButton.mjs";import p from"./MarkdownContent.mjs";import f from"./MessageFeedbackBar.mjs";import{colours as u}from"../../../theme/tokens.mjs";const g=({block:i})=>{const[a,c]=r(!1),s=i.language?.trim()||"text",d=i.content||"";if(!d.trim())return null;const p=Boolean(i.title);return e(l,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden",mb:1,"&:last-child":{mb:0}},children:[p&&e(l,{onClick:()=>c(e=>!e),sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider",cursor:"pointer",userSelect:"none"},children:[o(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),o(m,{size:"small",ariaLabel:a?"Collapse":"Expand",children:o(a?n:t,{sx:{fontSize:16}})})]}),(!p||a)&&o(l,{component:"pre",sx:{m:0,p:1.5,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"0.8125rem",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',lineHeight:1.5,bgcolor:"action.hover"},children:o(l,{component:"code",className:`language-${s}`,children:d})})]})},h=({file:e,onDownloadFile:t})=>{const[n,a]=r(!1);return o(d,{size:"small",startIcon:o(i,{}),onClick:async()=>{if(t){a(!0);try{await t(e)}finally{a(!1)}}},disabled:n||!t,children:n?"Preparing…":e.downloadLabel||e.displayName||"Download file"})},x=(e,r)=>{const t=r?.trim();if(!t)return e;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(n).map((e,r)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?o(l,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${r}`):e})},b=({message:r,highlightQuery:t,avatarIcon:n,showActivity:i=!1,onFeedback:m,onDownloadFile:d,contentRenderer:b,markdownComponents:y})=>{const k="user"===r.role,w=!k&&r.codeBlocks&&r.codeBlocks.length>0,v=!k&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:k?"flex-end":"flex-start"},children:[!k&&o(l,{sx:{mt:.25,flexShrink:0},children:n??o(s,{size:36})}),e(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...k?{}:{flex:1}},children:[e(l,{sx:{borderRadius:k?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:k?u.jadeLight:"background.default",color:k?u.black:"text.primary",border:k?"none":"1px solid",borderColor:"divider",whiteSpace:k?"pre-wrap":"normal",lineHeight:1.6},children:[w&&o(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((e,r)=>o(g,{block:e},r))}),k?x(r.content,t):b?b(r.content):o(p,{content:r.content,highlightQuery:t,components:y}),v&&o(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((e,r)=>o(h,{file:e,onDownloadFile:d},`${e.bucket}-${e.key}-${r}`))})]}),!k&&i&&r.traceEvents&&r.traceEvents.length>0&&o(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),!k&&m&&o(f,{message:r,onFeedback:m})]})]})};export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as i,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as t}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"../../IconButton.mjs";import{PrimaryButton as p}from"../../PrimaryButton.mjs";import{SecondaryButton as d}from"../../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]=t(!1),[y,j]=t(b.rating??null),[T,z]=t(!1),[S,B]=t(""),[F,W]=t(!1);return i(e,{children:[i(n,{direction:"row",spacing:.5,sx:{alignItems:"center"},children:[o(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:o(v?l:m,{sx:{fontSize:16}})}),o(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:o(r,{sx:{fontSize:16}})}),o(c,{size:"small",title:"Not helpful",ariaLabel:"Mark as not helpful",onClick:()=>{B(""),z(!0)},sx:"negative"===y?{color:"error.main"}:void 0,children:o(a,{sx:{fontSize:16}})}),F&&o(C,{sx:{color:"text.secondary",ml:.5},children:"Feedback submitted!"})]}),i(h,{open:T,onClose:()=>z(!1),maxWidth:"sm",fullWidth:!0,children:[o(u,{children:"What was the issue with this response?"}),o(f,{children:o(s,{sx:{mt:1},children:o(x,{multiline:!0,rows:4,fullWidth:!0,placeholder:"Please describe what was wrong with this response...",value:S,onChange:i=>B(i.target.value),autoFocus:!0})})}),i(g,{children:[o(d,{onClick:()=>z(!1),children:"Cancel"}),o(p,{onClick:()=>{k(b.id,"negative",S.trim()),j("negative"),z(!1),W(!0),setTimeout(()=>W(!1),3e3)},disabled:!S.trim(),children:"Submit"})]})]})]})};export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
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"../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,R=z?S:j,B=e=>{z?v?.(e):k(e)},I=m.jadeLight,w=m.black,C=()=>{const e=R.trim();e&&!d&&(p(e),B(""))};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:R,onChange:e=>B(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:!R.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 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as t}from"react";import{useTheme as n,useMediaQuery as r}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import l from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import m from"@mui/icons-material/History";import{ChatHistory as p}from"./ChatHistory.mjs";import{Dialog as c}from"../Dialog.mjs";import{Box as d}from"../Box.mjs";import{Stack as h}from"../Stack.mjs";import{IconButton as f}from"../IconButton.mjs";import{AiChip as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as t}from"react";import{useTheme as n,useMediaQuery as r}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import l from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import m from"@mui/icons-material/History";import{ChatHistory as p}from"./ChatHistory.mjs";import{Dialog as c}from"../Dialog.mjs";import{Box as d}from"../Box.mjs";import{Stack as h}from"../Stack.mjs";import{IconButton as f}from"../IconButton.mjs";import{AiChip as u}from"../AiChip.mjs";import{Caption as x}from"../Typography.mjs";import{AgentChatWindowHeader as C}from"./AgentChatWindowHeader.mjs";import"./ChatComponents/ChatAvatar.mjs";import"../Code.mjs";import"@mui/icons-material/Download";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import v from"./ChatComponents/SuggestedPrompts.mjs";import g from"./ChatComponents/MessageList.mjs";import b from"./ChatComponents/EmptyState.mjs";import w from"./WidgetParts/WidgetInput.mjs";function y({open:y,onClose:k,title:S="Ask Nexus",subtitle:j="Ready to help",avatarIcon:I,placeholder:z,emptyTitle:A="Ask Nexus",emptyDescription:D="Ask me anything about your data and I'll help you find answers.",dataSources:T,suggestedPrompts:H=[],showAiChip:E=!0,isTyping:N,messages:P,streamingText:W,liveTraceEvents:B,showActivity:F=!1,onSend:L,onAbort:U,background:M,followUpPrompts:O,followUpLabel:X="Suggested follow-ups:",topOffset:$,conversations:R,activeConversationId:Y,onSelectConversation:q,onDeleteConversation:G,onNewConversation:J}){const K=n(),Q=r(K.breakpoints.down("md")),[V,Z]=t(!0),[_,ee]=t(!1),oe=P.length>0||N,ie=oe&&O&&O.length>0,te=!Q||V,ne=void 0!==R;return e(c,{open:y,fullScreen:!0,onClose:k,sx:$?{top:`${$}px`}:void 0,children:o(d,{sx:{display:"flex",flexDirection:"column",height:$?`calc(100vh - ${$}px)`:"100vh",overflow:"hidden"},children:[o(d,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[ne&&e(d,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(p,{conversations:R,activeConversationId:Y??null,onSelectConversation:q??(()=>{}),onDeleteConversation:G,onNewConversation:J})}),o(d,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(d,{sx:{position:"relative",flexShrink:0},children:[e(C,{title:S,subtitle:j,showAiChip:!1,actions:Q?e(h,{}):o(h,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[E&&e(u,{}),e(f,{title:"Close full view",size:"small",onClick:k,children:e(s,{sx:{fontSize:16}})})]})}),Q&&o(h,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[ne&&e(f,{title:"Chat history",size:"small",onClick:()=>ee(e=>!e),children:e(m,{sx:{fontSize:18}})}),e(f,{title:"Close full view",size:"small",onClick:k,children:e(s,{sx:{fontSize:16}})})]})]}),o(d,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[M&&e(d,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:M}),e(d,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,overflowY:"auto",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:oe?e(g,{messages:P,isTyping:N,streamingText:W,liveTraceEvents:B,onAbort:U,avatarIcon:I,showActivity:F}):e(b,{title:A,description:D,dataSources:T,prompts:H.slice(0,4),avatarIcon:I,onSelect:L})})]}),ie&&o(d,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:te?.5:1,flexShrink:0},children:[o(h,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:te?.75:0},children:[e(x,{children:X}),Q&&e(f,{size:"small",onClick:()=>Z(e=>!e),title:V?"Collapse suggestions":"Expand suggestions",children:e(V?a:l,{sx:{fontSize:16}})})]}),te&&e(v,{prompts:O,onSelect:L})]}),e(w,{placeholder:z,isTyping:N,onSend:L})]})]}),ne&&Q&&o(i,{children:[_&&e(d,{onClick:()=>ee(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(d,{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:_?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(p,{conversations:R,activeConversationId:Y??null,onSelectConversation:e=>{q?.(e),ee(!1)},onDeleteConversation:G,onNewConversation:J?()=>{J(),ee(!1)}:void 0,onClose:()=>ee(!1)})})]})]})})}export{y as NexusChatDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Box as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Box as i}from"../../Box.mjs";import"../ChatComponents/ChatAvatar.mjs";import"react";import"@mui/material";import"../../Typography.mjs";import"../../Code.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/Download";import"../../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Check";import"@mui/icons-material/StopCircle";import o from"../ChatComponents/MessageList.mjs";import e from"../ChatComponents/EmptyState.mjs";const m=({avatarIcon:m,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:m,showActivity:p}):t(e,{title:l,description:u,dataSources:h,prompts:C.slice(0,4),avatarIcon:m,onSelect:d})})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="1.13.
|
|
1
|
+
const o="1.13.23";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { AlertProps, BoxProps, TypographyProps, ContainerProps, GridProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1, SxProps as SxProps$1, SwitchProps, Theme as Theme$1, AccordionSummaryProps, ButtonProps, ChipProps, CardProps as CardProps$1, PaperProps, CollapseProps, ButtonBaseProps, 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';
|
|
3
3
|
export { AlertProps, AlertTitle, BoxProps, ButtonBaseProps, ChipProps, CollapseProps, ContainerProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogProps, DialogTitleProps, DividerProps, GridProps, MenuItem, PaperProps, StackProps, SwitchProps, TabProps, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
|
|
4
4
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
5
|
+
import { Components } from 'react-markdown';
|
|
5
6
|
import * as react from 'react';
|
|
6
7
|
import react__default, { ReactNode, ReactElement, ComponentType, CSSProperties, PropsWithChildren } from 'react';
|
|
7
8
|
import { DataGridProps } from '@mui/x-data-grid';
|
|
@@ -65,6 +66,17 @@ interface LatencyMetrics {
|
|
|
65
66
|
totalSeconds: string;
|
|
66
67
|
ttftSeconds: string | null;
|
|
67
68
|
}
|
|
69
|
+
interface FileArtifact {
|
|
70
|
+
bucket: string;
|
|
71
|
+
key: string;
|
|
72
|
+
downloadLabel?: string;
|
|
73
|
+
displayName?: string;
|
|
74
|
+
}
|
|
75
|
+
interface CodeBlock {
|
|
76
|
+
language?: string;
|
|
77
|
+
title?: string;
|
|
78
|
+
content: string;
|
|
79
|
+
}
|
|
68
80
|
interface ChatMessage {
|
|
69
81
|
id: string;
|
|
70
82
|
role: "user" | "assistant";
|
|
@@ -72,6 +84,10 @@ interface ChatMessage {
|
|
|
72
84
|
timestamp: Date;
|
|
73
85
|
sources?: string[];
|
|
74
86
|
isThinking?: boolean;
|
|
87
|
+
isStreaming?: boolean;
|
|
88
|
+
rating?: "positive" | "negative" | null;
|
|
89
|
+
files?: FileArtifact[];
|
|
90
|
+
codeBlocks?: CodeBlock[];
|
|
75
91
|
/** Trace events attached to a completed assistant message */
|
|
76
92
|
traceEvents?: TraceEvent[];
|
|
77
93
|
/** Activity summary produced after stream completion */
|
|
@@ -230,9 +246,10 @@ interface AgentChatWindowProps {
|
|
|
230
246
|
onStop?: () => void;
|
|
231
247
|
inputActions?: React.ReactNode;
|
|
232
248
|
inputRef?: React.Ref<HTMLTextAreaElement>;
|
|
249
|
+
isEmpty?: boolean;
|
|
233
250
|
sx?: SxProps<Theme>;
|
|
234
251
|
}
|
|
235
|
-
declare const AgentChatWindow: ({ title, subtitle, showAiChip, headerActions, body, followUpLabel, followUpPrompts, onSelectFollowUp, onSend, inputDisabled, inputPlaceholder, isStreaming, onStop, inputActions, inputRef, sx, }: AgentChatWindowProps) => react_jsx_runtime.JSX.Element;
|
|
252
|
+
declare const AgentChatWindow: ({ title, subtitle, showAiChip, headerActions, body, followUpLabel, followUpPrompts, onSelectFollowUp, onSend, inputDisabled, inputPlaceholder, isStreaming, onStop, inputActions, inputRef, isEmpty, sx, }: AgentChatWindowProps) => react_jsx_runtime.JSX.Element;
|
|
236
253
|
|
|
237
254
|
interface AgentChatWindowHeaderProps {
|
|
238
255
|
title?: string;
|
|
@@ -297,16 +314,32 @@ declare const ChatAvatar: ({ size, icon, sx }: ChatAvatarProps) => react_jsx_run
|
|
|
297
314
|
interface MarkdownContentProps {
|
|
298
315
|
content: string;
|
|
299
316
|
highlightQuery?: string;
|
|
317
|
+
/** Override or extend the default markdown component renderers */
|
|
318
|
+
components?: Partial<Components>;
|
|
300
319
|
}
|
|
301
|
-
declare const MarkdownContent: ({ content, highlightQuery }: MarkdownContentProps) => react_jsx_runtime.JSX.Element;
|
|
320
|
+
declare const MarkdownContent: ({ content, highlightQuery, components: extraComponents }: MarkdownContentProps) => react_jsx_runtime.JSX.Element;
|
|
302
321
|
|
|
303
322
|
interface MessageBubbleProps {
|
|
304
323
|
message: ChatMessage;
|
|
305
324
|
highlightQuery?: string;
|
|
306
325
|
avatarIcon?: React.ReactNode;
|
|
307
326
|
showActivity?: boolean;
|
|
327
|
+
/** Called when the user submits thumbs-up/down feedback */
|
|
328
|
+
onFeedback?: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
|
|
329
|
+
/** Called when the user clicks a file download button */
|
|
330
|
+
onDownloadFile?: (file: FileArtifact) => Promise<void>;
|
|
331
|
+
/** Replaces the default MarkdownContent renderer — use for custom chart/rich content */
|
|
332
|
+
contentRenderer?: (content: string) => React.ReactNode;
|
|
333
|
+
/** Override or extend individual markdown element renderers */
|
|
334
|
+
markdownComponents?: Partial<Components>;
|
|
335
|
+
}
|
|
336
|
+
declare const MessageBubble: ({ message, highlightQuery, avatarIcon, showActivity, onFeedback, onDownloadFile, contentRenderer, markdownComponents, }: MessageBubbleProps) => react_jsx_runtime.JSX.Element;
|
|
337
|
+
|
|
338
|
+
interface MessageFeedbackBarProps {
|
|
339
|
+
message: ChatMessage;
|
|
340
|
+
onFeedback: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
|
|
308
341
|
}
|
|
309
|
-
declare const
|
|
342
|
+
declare const MessageFeedbackBar: ({ message, onFeedback }: MessageFeedbackBarProps) => react_jsx_runtime.JSX.Element;
|
|
310
343
|
|
|
311
344
|
interface StreamingBubbleProps {
|
|
312
345
|
text: string;
|
|
@@ -1034,5 +1067,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
|
|
|
1034
1067
|
declare const leftPipe: SxProps<Theme>;
|
|
1035
1068
|
declare const expandableText: (isExpanded: boolean) => SxProps<Theme>;
|
|
1036
1069
|
|
|
1037
|
-
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, CheckboxGroup, Chip, Code, Collapse, Container, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageList, MuiAppThemeProvider, NexusBarChart, NexusChatDialog, NexusChatWidget, NexusDataGrid, NexusHome, NexusLineChart, NexusLogo, 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, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, useThemeMode, useTokens };
|
|
1038
|
-
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, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, EmptyStateProps, FABButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageListProps, ModeTokens, NexusBarChartProps, NexusChatDialogProps, NexusChatWidgetProps, NexusLineChartProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SelectOption, SelectProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, TooltipProps, TraceEvent, TypingIndicatorProps };
|
|
1070
|
+
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, CheckboxGroup, Chip, Code, Collapse, Container, DateRangeFilter, DateRangePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, 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, 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, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, useThemeMode, useTokens };
|
|
1071
|
+
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, 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, 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{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent}from"./components/NexusChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/NexusChat/ChatComponents/MessageBubble.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,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/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/ButtonBase.mjs";export{Card}from"./components/Card.mjs";export{CheckboxGroup}from"./components/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/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/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{SecondaryButtonLink}from"./components/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/NexusLineChart.mjs";export{NexusBarChart}from"./components/NexusBarChart.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/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{default as ChatAvatar}from"./components/NexusChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent}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,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/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/ButtonBase.mjs";export{Card}from"./components/Card.mjs";export{CheckboxGroup}from"./components/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/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/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{SecondaryButtonLink}from"./components/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/NexusLineChart.mjs";export{NexusBarChart}from"./components/NexusBarChart.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 +1 @@
|
|
|
1
|
-
import{stringify as e}from"../../comma-separated-tokens/index.mjs";import{ok as t}from"../../devlop/lib/default.mjs";import{svg as n,html as r}from"../../property-information/index.mjs";import{stringify as o}from"../../space-separated-tokens/index.mjs";import s from"../../../_virtual/
|
|
1
|
+
import{stringify as e}from"../../comma-separated-tokens/index.mjs";import{ok as t}from"../../devlop/lib/default.mjs";import{svg as n,html as r}from"../../property-information/index.mjs";import{stringify as o}from"../../space-separated-tokens/index.mjs";import s from"../../../_virtual/index2.mjs";import{whitespace as a}from"../../hast-util-whitespace/lib/index.mjs";import{name as i}from"../../estree-util-is-identifier-name/lib/index.mjs";import{VFileMessage as l}from"../../vfile-message/lib/index.mjs";import{find as p}from"../../property-information/lib/find.mjs";import{hastToReact as c}from"../../property-information/lib/hast-to-react.mjs";import{pointStart as u}from"../../unist-util-position/lib/index.mjs";const m={}.hasOwnProperty,f=new Map,d=/[A-Z]/g,y=new Set(["table","tbody","thead","tfoot","tr"]),x=new Set(["td","th"]),v="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function h(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const o=t.filePath||void 0;let s;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=function(e,t){return n;function n(n,r,o,s){const a=Array.isArray(o.children),i=u(n);return t(r,o,s,a,{columnNumber:i?i.column-1:void 0,fileName:e,lineNumber:i?i.line:void 0},void 0)}}(o,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");s=function(e,t,n){return r;function r(e,r,o,s){const a=Array.isArray(o.children)?n:t;return s?a(r,o,s):a(r,o)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:o,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?n:r,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=g(a,e,void 0);return i&&"string"!=typeof i?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function g(e,r,o){return"element"===r.type?function(e,t,r){const o=e.schema;let s=o;"svg"===t.tagName.toLowerCase()&&"html"===o.space&&(s=n,e.schema=s);e.ancestors.push(t);const i=N(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&m.call(t.properties,o)){const s=w(e,o,t.properties[o]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&x.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let p=j(e,t);y.has(t.tagName)&&(p=p.filter(function(e){return"string"!=typeof e||!a(e)}));return b(e,l,i,t),E(l,p),e.ancestors.pop(),e.schema=o,e.create(t,i,l,r)}(e,r,o):"mdxFlowExpression"===r.type||"mdxTextExpression"===r.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return t("ExpressionStatement"===r.type),e.evaluater.evaluateExpression(r.expression)}A(e,n.position)}(e,r):"mdxJsxFlowElement"===r.type||"mdxJsxTextElement"===r.type?function(e,r,o){const s=e.schema;let a=s;"svg"===r.name&&"html"===s.space&&(a=n,e.schema=a);e.ancestors.push(r);const i=null===r.name?e.Fragment:N(e,r.name,!0),l=function(e,n){const r={};for(const o of n.attributes)if("mdxJsxExpressionAttribute"===o.type)if(o.data&&o.data.estree&&e.evaluater){const n=o.data.estree.body[0];t("ExpressionStatement"===n.type);const s=n.expression;t("ObjectExpression"===s.type);const a=s.properties[0];t("SpreadElement"===a.type),Object.assign(r,e.evaluater.evaluateExpression(a.argument))}else A(e,n.position);else{const s=o.name;let a;if(o.value&&"object"==typeof o.value)if(o.value.data&&o.value.data.estree&&e.evaluater){const n=o.value.data.estree.body[0];t("ExpressionStatement"===n.type),a=e.evaluater.evaluateExpression(n.expression)}else A(e,n.position);else a=null===o.value||o.value;r[s]=a}return r}(e,r),p=j(e,r);return b(e,l,i,r),E(l,p),e.ancestors.pop(),e.schema=s,e.create(r,i,l,o)}(e,r,o):"mdxjsEsm"===r.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);A(e,t.position)}(e,r):"root"===r.type?function(e,t,n){const r={};return E(r,j(e,t)),e.create(t,e.Fragment,r,n)}(e,r,o):"text"===r.type?function(e,t){return t.value}(0,r):void 0}function b(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function E(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function j(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:f;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const e="element"===s.type?s.tagName:"mdxJsxFlowElement"===s.type||"mdxJsxTextElement"===s.type?s.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const i=g(e,s,a);void 0!==i&&n.push(i)}return n}function w(t,n,r){const a=p(t.schema,n);if(!(null==r||"number"==typeof r&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?e(r):o(r)),"style"===a.property){let e="object"==typeof r?r:function(e,t){try{return s(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new l("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=v+"#cannot-parse-style-attribute",r}}(t,String(r));return"css"===t.stylePropertyNameCase&&(e=function(e){const t={};let n;for(n in e)m.call(e,n)&&(t[C(n)]=e[n]);return t}(e)),["style",e]}return["react"===t.elementAttributeNameCase&&a.space?c[a.property]||a.property:a.attribute,r]}}function N(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=i(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=i(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return m.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);A(e)}function A(e,t){const n=new l("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=v+"#cannot-handle-mdx-estrees-without-createevaluater",n}function C(e){let t=e.replace(d,S);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function S(e){return"-"+e.toLowerCase()}export{h as toJsxRuntime};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bail as e}from"../../bail/index.mjs";import t from"../../../_virtual/
|
|
1
|
+
import{bail as e}from"../../bail/index.mjs";import t from"../../../_virtual/index.mjs";import s from"../../is-plain-obj/index.mjs";import{CallableInstance as r}from"./callable-instance.mjs";import{trough as n}from"../../trough/lib/index.mjs";import{VFile as i}from"../../vfile/lib/index.mjs";const o={}.hasOwnProperty;class c extends r{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=n()}copy(){const e=new c;let s=-1;for(;++s<this.attachers.length;){const t=this.attachers[s];e.use(...t)}return e.data(t(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(p("data",this.frozen),this.namespace[e]=t,this):o.call(this.namespace,e)&&this.namespace[e]||void 0:e?(p("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...s]=this.attachers[this.freezeIndex];if(!1===s[0])continue;!0===s[0]&&(s[0]=void 0);const r=t.call(e,...s);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=m(e),s=this.parser||this.Parser;return f("parse",s),s(String(t),t)}process(e,t){const s=this;return this.freeze(),f("process",this.parser||this.Parser),h("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,n){const i=m(e),o=s.parse(i);function c(e,s){e||!s?n(e):r?r(s):t(void 0,s)}s.run(o,i,function(e,t,r){if(e||!t||!r)return c(e);const n=t,i=s.stringify(n,r);var o;"string"==typeof(o=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=i:r.result=i,c(e,r)})}}processSync(t){let s,r=!1;return this.freeze(),f("processSync",this.parser||this.Parser),h("processSync",this.compiler||this.Compiler),this.process(t,function(t,n){r=!0,e(t),s=n}),l("processSync","process",r),s}run(e,t,s){u(e),this.freeze();const r=this.transformers;return s||"function"!=typeof t||(s=t,t=void 0),s?n(void 0,s):new Promise(n);function n(n,i){const o=m(t);r.run(e,o,function(t,r,o){const c=r||e;t?i(t):n?n(c):s(void 0,c,o)})}}runSync(t,s){let r,n=!1;return this.run(t,s,function(t,s){e(t),r=s,n=!0}),l("runSync","run",n),r}stringify(e,t){this.freeze();const s=m(t),r=this.compiler||this.Compiler;return h("stringify",r),u(e),r(e,s)}use(e,...r){const n=this.attachers,i=this.namespace;if(p("use",this.frozen),null==e);else if("function"==typeof e)f(e,r);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):c(e)}return this;function o(e){if("function"==typeof e)f(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...s]=e;f(t,s)}else c(e)}}function c(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(i.settings=t(!0,i.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function f(e,r){let i=-1,o=-1;for(;++i<n.length;)if(n[i][0]===e){o=i;break}if(-1===o)n.push([e,...r]);else if(r.length>0){let[i,...c]=r;const a=n[o][1];s(a)&&s(i)&&(i=t(!0,a,i)),n[o]=[e,i,...c]}}}}const a=(new c).freeze();function f(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function h(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function p(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function u(e){if(!s(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function l(e,t,s){if(!s)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function m(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new i(e)}export{c as Processor,a as unified};
|