sage-nexus-ui 1.14.5 → 1.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@mui/icons-material/ChatBubbleOutlined";import t from"@mui/icons-material/DeleteForeverOutlined";import{Body1 as n,Caption as i}from"../Typography.mjs";import{Box as a}from"../Box.mjs";import{IconButton as l}from"../IconButton.mjs";import{colours as s}from"../../theme/tokens.mjs";const m=(e,o)=>{const t=o?.trim();if(!t)return e;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return e.split(n).map((e,o)=>{if(!e)return null;return e.toLowerCase()===t.toLowerCase()?r(a,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:e},`${e}-${o}`):e})},p=({conversation:p,isActive:d,highlightQuery:c,onSelectConversation:u,onDeleteConversation:b,deleteConversationTitle:x,formatMessageCount:g,sx:h})=>{const y=(e=>"number"==typeof e.messageCount?e.messageCount:Array.isArray(e.messages)?e.messages.length:0)(p);return e(a,{component:"div",role:"button",tabIndex:0,onClick:()=>u(p.id),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(p.id))},sx:[{width:"100%",display:"flex",alignItems:"center",gap:1.25,borderRadius:1,px:1.5,py:1.25,textAlign:"left",backgroundColor:d?e=>"dark"===e.palette.mode?s.black:s.white:"transparent",backgroundImage:"none",opacity:1,position:"relative",zIndex:1,border:"1px solid",borderColor:d?s.primaryGreenActive:"transparent",cursor:"pointer",outline:"none","&:hover":{backgroundColor:d?e=>"dark"===e.palette.mode?s.black:s.white:"action.hover",backgroundImage:"none"},"&:focus-visible":{boxShadow:e=>`0 0 0 2px ${e.palette.primary.main}`},mb:.25},...Array.isArray(h)?h:h?[h]:[]],children:[r(o,{sx:{fontSize:14,color:d?s.primaryGreenActive:"text.disabled"}}),e(a,{sx:{flex:1,minWidth:0},children:[r(n,{component:"span",sx:{display:"block",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:d?"text.primary":"text.secondary"},children:m(p.title,c)}),r(i,{noWrap:!0,sx:{display:"block"},children:g(y)})]}),r(l,{title:x,ariaLabel:x,onClick:e=>{e.stopPropagation(),b&&Promise.resolve(b(p.id))},disabled:!b,children:r(t,{sx:{fontSize:14,color:d?"error.main":"text.disabled"}})})]})};export{p as ChatHistoryButtonBase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="1.14.
|
|
1
|
+
const o="1.14.6";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { AlertProps, BoxProps, TypographyProps, ContainerProps, GridProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1,
|
|
2
|
+
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, 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
5
|
import { Components } from 'react-markdown';
|
|
@@ -295,8 +295,9 @@ interface ChatHistoryButtonBaseProps {
|
|
|
295
295
|
onDeleteConversation?: (id: string) => void | Promise<boolean>;
|
|
296
296
|
deleteConversationTitle: string;
|
|
297
297
|
formatMessageCount: (count: number) => string;
|
|
298
|
+
sx?: SxProps$1<Theme$1>;
|
|
298
299
|
}
|
|
299
|
-
declare const ChatHistoryButtonBase: ({ conversation, isActive, highlightQuery, onSelectConversation, onDeleteConversation, deleteConversationTitle, formatMessageCount, }: ChatHistoryButtonBaseProps) => react_jsx_runtime.JSX.Element;
|
|
300
|
+
declare const ChatHistoryButtonBase: ({ conversation, isActive, highlightQuery, onSelectConversation, onDeleteConversation, deleteConversationTitle, formatMessageCount, sx, }: ChatHistoryButtonBaseProps) => react_jsx_runtime.JSX.Element;
|
|
300
301
|
|
|
301
302
|
declare const chatHistoryMatchesQuery: (conversation: ChatHistoryConversation, query: string) => boolean;
|
|
302
303
|
declare const filterChatHistoryConversations: <TConversation extends ChatHistoryConversation>(conversations: TConversation[], query: string) => TConversation[];
|