@corva/ui 3.78.0-0 → 3.78.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/IconButton/index.js +1 -1
- package/cjs-bundle/components/IconButton/index.js.map +1 -1
- package/cjs-bundle/components/TruncatedText/index.js +1 -1
- package/cjs-bundle/components/TruncatedText/index.js.map +1 -1
- package/components/IconButton/index.d.ts.map +1 -1
- package/components/IconButton/index.js +1 -1
- package/components/IconButton/index.js.map +1 -1
- package/components/TruncatedText/index.d.ts +1 -1
- package/components/TruncatedText/index.d.ts.map +1 -1
- package/components/TruncatedText/index.js +1 -1
- package/components/TruncatedText/index.js.map +1 -1
- package/mcp-server/server.mjs +49 -22
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var r=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),e=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("classnames"),a=require("@material-ui/core"),i=require("react"),n=require("react/jsx-runtime");function l(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var c=l(r),s=l(t),u=l(e),
|
|
1
|
+
"use strict";var r=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),e=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("classnames"),a=require("@material-ui/core"),i=require("react"),n=require("react/jsx-runtime");function l(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var c=l(r),s=l(t),u=l(e),p=l(o),d=["tooltipProps","isActive","size","variant","className","data-testid"];function b(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,o)}return e}function f(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?b(Object(e),!0).forEach((function(t){c.default(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var m=a.makeStyles((function(r){var t=r.palette,e=t.primary.text1||"#fff",o={b08:a.fade(e,.08),b010:a.fade(e,.1),b012:a.fade(e,.12),b016:a.fade(e,.16),b020:a.fade(e,.2)};return{root:{borderRadius:"8px !important",color:t.primary.text6,padding:6,"&:hover":{color:e,backgroundColor:o.b016,backdropFilter:"blur(2px)","&.MuiIconButton-colorPrimary":{color:t.primary.light}},"&:active":{color:e,"&.MuiIconButton-colorPrimary":{color:t.primary.light}},"&.Mui-disabled":{pointerEvents:"all",opacity:.4,color:t.primary.text1,backgroundColor:"transparent","&.MuiIconButton-colorPrimary":{color:t.primary.main}},"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}},colorPrimary:{color:t.primary.main},sizeSmall:{fontSize:20,padding:6,height:32,width:32,"& .i-icon, & .i-icon > svg":{width:"20px !important",height:"20px !important"}},sizeLarge:{"&.MuiButtonBase-root":{padding:8}},contained:{backgroundColor:o.b08,backdropFilter:"blur(2px)","&:hover":{backgroundColor:o.b016}},containedDisabled:{"&.MuiButtonBase-root":{backgroundColor:o.b08}},transparent:{color:t.primary.contrastText,backgroundColor:o.b020,"&:hover":{backgroundColor:o.b010}},transparentDisabled:{"&.MuiButtonBase-root":{backgroundColor:o.b010}},tooltipPopper:{"& .MuiTooltip-tooltip":{backgroundColor:t.background.b10}},tooltipPopperTransparent:{"& .MuiTooltip-tooltip":{backgroundColor:o.b020}},active:{"&.MuiButtonBase-root":{color:t.primary.main,backgroundColor:o.b012,"&.MuiIconButton-colorPrimary":{color:t.primary.main},"&.transparent":{color:t.primary.contrastText,backgroundColor:o.b020}}}}})),y={center:!1};module.exports=function(r){var t,e,o,l=r.tooltipProps,b=void 0===l?{title:"",classes:{}}:l,g=r.isActive,v=void 0!==g&&g,P=r.size,h=void 0===P?"medium":P,O=r.variant,j=void 0===O?"default":O,k=r.className,x=r["data-testid"],B=void 0===x?"IconButton":x,z=u.default(r,d),C=z.classes,M=void 0===C?{}:C,S=m(),T=i.useState(!1),w=s.default(T,2),D=w[0],I=w[1],q=f(f({},M),{},{root:p.default(M.root,S.root,(t={},c.default(t,S.sizeLarge,"large"===h),c.default(t,S.contained,"contained"===j),c.default(t,S.transparent,"transparent"===j),t)),disabled:p.default(M.disabled,(e={},c.default(e,S.containedDisabled,"contained"===j),c.default(e,S.transparentDisabled,"transparent"===j),e)),colorPrimary:p.default(M.colorPrimary,S.colorPrimary),sizeSmall:p.default(M.sizeSmall,S.sizeSmall)});return b.title?n.jsx(a.Tooltip,f(f({open:D},b),{},{classes:f(f({},b.classes),{},{popper:p.default(S.tooltipPopper,c.default({},S.tooltipPopperTransparent,"transparent"===j),null===(o=b.classes)||void 0===o?void 0:o.popper)}),children:n.jsx(a.IconButton,f({"data-testid":B,classes:q,className:p.default(k,c.default({},S.active,v),j),onPointerOver:function(){return I(!0)},onPointerOut:function(){return I(!1)},size:h,TouchRippleProps:y},z))})):n.jsx(a.IconButton,f({"data-testid":B,classes:q,className:p.default(k,c.default({},S.active,v),j),size:h,TouchRippleProps:y},z))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/IconButton/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n IconButton as MuiIconButton,\n IconButtonProps as MuiIconButtonProps,\n makeStyles,\n Tooltip,\n TooltipProps,\n fade,\n} from '@material-ui/core';\nimport { MouseEventHandler, ReactNode, useState } from 'react';\n\nconst useStyles = makeStyles(({ palette }) => {\n const text1 = palette.primary.text1 || '#fff';\n const background = {\n b08: fade(text1, 0.08),\n b010: fade(text1, 0.1),\n b012: fade(text1, 0.12),\n b016: fade(text1, 0.16),\n b020: fade(text1, 0.2),\n };\n\n return {\n root: {\n borderRadius: '8px !important',\n color: palette.primary.text6,\n padding: 6,\n '&:hover': {\n color: text1,\n backgroundColor: background.b016,\n backdropFilter: 'blur(2px)',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&:active': {\n color: text1,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&.Mui-disabled': {\n pointerEvents: 'all',\n opacity: 0.4,\n color: palette.primary.text1,\n backgroundColor: 'transparent',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'inherit',\n fontSize: 'inherit',\n },\n },\n colorPrimary: {\n color: palette.primary.main,\n },\n sizeSmall: {\n fontSize: 20,\n padding: 6,\n height: 32,\n width: 32,\n\n '& .i-icon, & .i-icon > svg': {\n width: '20px !important',\n height: '20px !important',\n },\n },\n sizeLarge: {\n '&.MuiButtonBase-root': {\n padding: 8,\n },\n },\n contained: {\n backgroundColor: background.b08,\n backdropFilter: 'blur(2px)',\n '&:hover': {\n backgroundColor: background.b016,\n },\n },\n containedDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b08,\n },\n },\n transparent: {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n '&:hover': {\n backgroundColor: background.b010,\n },\n },\n transparentDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b010,\n },\n },\n tooltipPopper: {\n '& .MuiTooltip-tooltip': {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/IconButton/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n IconButton as MuiIconButton,\n IconButtonProps as MuiIconButtonProps,\n makeStyles,\n Tooltip,\n TooltipProps,\n fade,\n} from '@material-ui/core';\nimport { MouseEventHandler, ReactNode, useState } from 'react';\n\nconst useStyles = makeStyles(({ palette }) => {\n const text1 = palette.primary.text1 || '#fff';\n const background = {\n b08: fade(text1, 0.08),\n b010: fade(text1, 0.1),\n b012: fade(text1, 0.12),\n b016: fade(text1, 0.16),\n b020: fade(text1, 0.2),\n };\n\n return {\n root: {\n borderRadius: '8px !important',\n color: palette.primary.text6,\n padding: 6,\n '&:hover': {\n color: text1,\n backgroundColor: background.b016,\n backdropFilter: 'blur(2px)',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&:active': {\n color: text1,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&.Mui-disabled': {\n pointerEvents: 'all',\n opacity: 0.4,\n color: palette.primary.text1,\n backgroundColor: 'transparent',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'inherit',\n fontSize: 'inherit',\n },\n },\n colorPrimary: {\n color: palette.primary.main,\n },\n sizeSmall: {\n fontSize: 20,\n padding: 6,\n height: 32,\n width: 32,\n\n '& .i-icon, & .i-icon > svg': {\n width: '20px !important',\n height: '20px !important',\n },\n },\n sizeLarge: {\n '&.MuiButtonBase-root': {\n padding: 8,\n },\n },\n contained: {\n backgroundColor: background.b08,\n backdropFilter: 'blur(2px)',\n '&:hover': {\n backgroundColor: background.b016,\n },\n },\n containedDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b08,\n },\n },\n transparent: {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n '&:hover': {\n backgroundColor: background.b010,\n },\n },\n transparentDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b010,\n },\n },\n tooltipPopper: {\n '& .MuiTooltip-tooltip': {\n backgroundColor: palette.background.b10,\n },\n },\n tooltipPopperTransparent: {\n '& .MuiTooltip-tooltip': {\n backgroundColor: background.b020,\n },\n },\n active: {\n '&.MuiButtonBase-root': {\n color: palette.primary.main,\n backgroundColor: background.b012,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n '&.transparent': {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n },\n },\n },\n };\n});\n\nconst TouchRippleProps = { center: false };\n\nexport type IconButtonProps = Omit<\n MuiIconButtonProps,\n 'size' | 'variant' | 'classes' | 'className' | 'children' | 'onClick'\n> & {\n /**\n * The content of the component.\n */\n children?: ReactNode;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n size?: 'small' | 'medium' | 'large';\n variant?: 'transparent' | 'contained' | 'default';\n className?: string;\n\n isActive?: boolean;\n tooltipProps?: Omit<TooltipProps, 'children'>;\n classes?: {\n root?: string;\n disabled?: string;\n colorPrimary?: string;\n sizeSmall?: string;\n };\n 'data-testid'?: string;\n};\n\nconst IconButton = ({\n tooltipProps = { title: '', classes: {} },\n isActive = false,\n size = 'medium',\n variant = 'default',\n className,\n 'data-testid': dataTestId = 'IconButton',\n ...otherProps\n}: IconButtonProps): JSX.Element => {\n const { classes = {} } = otherProps;\n\n const styles = useStyles();\n\n const [isTooltipShown, setIsTooltipShown] = useState(false);\n\n const buttonClasses = {\n ...classes,\n root: classNames(classes.root, styles.root, {\n [styles.sizeLarge]: size === 'large',\n [styles.contained]: variant === 'contained',\n [styles.transparent]: variant === 'transparent',\n }),\n disabled: classNames(classes.disabled, {\n [styles.containedDisabled]: variant === 'contained',\n [styles.transparentDisabled]: variant === 'transparent',\n }),\n colorPrimary: classNames(classes.colorPrimary, styles.colorPrimary),\n sizeSmall: classNames(classes.sizeSmall, styles.sizeSmall),\n };\n\n return tooltipProps.title ? (\n <Tooltip\n open={isTooltipShown}\n {...(tooltipProps as TooltipProps)}\n classes={{\n ...tooltipProps.classes,\n popper: classNames(\n styles.tooltipPopper,\n { [styles.tooltipPopperTransparent]: variant === 'transparent' },\n tooltipProps.classes?.popper\n ),\n }}\n >\n <MuiIconButton\n data-testid={dataTestId}\n classes={buttonClasses}\n className={classNames(className, { [styles.active]: isActive }, variant)}\n onPointerOver={() => setIsTooltipShown(true)}\n onPointerOut={() => setIsTooltipShown(false)}\n size={size as any}\n TouchRippleProps={TouchRippleProps}\n {...(otherProps as MuiIconButtonProps)}\n />\n </Tooltip>\n ) : (\n <MuiIconButton\n data-testid={dataTestId}\n classes={buttonClasses}\n className={classNames(className, { [styles.active]: isActive }, variant)}\n size={size as any}\n TouchRippleProps={TouchRippleProps}\n {...(otherProps as MuiIconButtonProps)}\n />\n );\n};\n\nexport default IconButton;\n"],"names":["useStyles","makeStyles","_ref","palette","text1","primary","background","b08","fade","b010","b012","b016","b020","root","borderRadius","color","text6","padding","backgroundColor","backdropFilter","light","pointerEvents","opacity","main","fontSize","colorPrimary","sizeSmall","height","width","sizeLarge","contained","containedDisabled","transparent","contrastText","transparentDisabled","tooltipPopper","b10","tooltipPopperTransparent","active","TouchRippleProps","center","_ref2","_classNames","_classNames2","_tooltipProps$classes","_ref2$tooltipProps","tooltipProps","title","classes","_ref2$isActive","isActive","_ref2$size","size","_ref2$variant","variant","className","_ref2$dataTestid","dataTestId","otherProps","_objectWithoutProperties","_excluded","_otherProps$classes","styles","useState","_useState2","_slicedToArray","_useState","isTooltipShown","setIsTooltipShown","buttonClasses","classNames","_defineProperty","disabled","_jsx","Tooltip","_objectSpread","open","popper","children","MuiIconButton","IconButton","onPointerOver","onPointerOut"],"mappings":"mhCAWA,IAAMA,EAAYC,EAAAA,YAAW,SAAiBC,GAAA,IAAdC,IAAAA,QACxBC,EAAQD,EAAQE,QAAQD,OAAS,OACjCE,EAAa,CACjBC,IAAKC,EAAAA,KAAKJ,EAAO,KACjBK,KAAMD,EAAAA,KAAKJ,EAAO,IAClBM,KAAMF,EAAAA,KAAKJ,EAAO,KAClBO,KAAMH,EAAAA,KAAKJ,EAAO,KAClBQ,KAAMJ,EAAAA,KAAKJ,EAAO,KAGpB,MAAO,CACLS,KAAM,CACJC,aAAc,iBACdC,MAAOZ,EAAQE,QAAQW,MACvBC,QAAS,EACT,UAAW,CACTF,MAAOX,EACPc,gBAAiBZ,EAAWK,KAC5BQ,eAAgB,YAChB,+BAAgC,CAC9BJ,MAAOZ,EAAQE,QAAQe,QAG3B,WAAY,CACVL,MAAOX,EACP,+BAAgC,CAC9BW,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EAApBA,EAAsBiC,UAExBC,SAEFL,EAAAA,IAACM,EAAaC,WAAAL,EAAA,CACZ,cAAalB,EACbT,QAASqB,EACTd,UAAWe,EAAAA,QAAWf,EAAcO,UAAAA,CAAAA,EAAAA,EAAOxB,OAASY,GAAYI,GAChE2B,cAAe,WAAA,OAAMb,GAAkB,EAAM,EAC7Cc,aAAc,WAAA,OAAMd,GAAkB,EAAO,EAC7ChB,KAAMA,EACNb,iBAAkBA,GACbmB,OAITe,EAAAA,IAACM,EAAaC,WAAAL,EAAA,CACZ,cAAalB,EACbT,QAASqB,EACTd,UAAWe,EAAAA,QAAWf,EAAcO,UAAAA,CAAAA,EAAAA,EAAOxB,OAASY,GAAYI,GAChEF,KAAMA,EACNb,iBAAkBA,GACbmB,GAGX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),i=require("react"),l=require("@material-ui/core"),n=require("classnames"),o=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e),u=c(t),s=c(r),p=c(n),f=["children","className","maxLines","showTooltip","style"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=l.makeStyles({root:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},clamped:{display:"-webkit-box",whiteSpace:"inherit",textOverflow:"clip","-webkit-line-clamp":"var(--truncated-text-line-clamp)","-webkit-box-orient":"vertical"}});module.exports=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.maxLines,d=void 0===c?null:c,m=e.showTooltip,v=void 0===m||m,y=e.style,O=s.default(e,f),w=i.useState(!1),j=u.default(w,2),x=j[0],P=j[1],g=i.useRef(null),q=h();i.useEffect((function(){if(g.current){var e=g.current,t=e.scrollWidth,r=e.clientWidth,i=e.scrollHeight,l=e.clientHeight;P(d?i>l:t>r)}}),[t,d,v]);var S=o.jsx("div",b(b({className:p.default(q.root,a.default({},q.clamped,!!d),n),ref:g,style:d?b({"--truncated-text-line-clamp":d},y):y},O),{},{children:t}));return x&&v?o.jsx(l.Tooltip,{title:null!=t?t:"",children:S}):S};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/TruncatedText/index.tsx"],"sourcesContent":["import {\n DetailedHTMLProps,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport classNames from 'classnames';\n\nexport type TruncatedTextProps = {\n /**\n * Text to truncate\n */\n children: ReactNode;\n className?: string;\n maxLines?: number | null;\n showTooltip?: boolean;\n} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\nconst useStyles = makeStyles({\n root:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/TruncatedText/index.tsx"],"sourcesContent":["import {\n CSSProperties,\n DetailedHTMLProps,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport classNames from 'classnames';\n\nexport type TruncatedTextProps = {\n /**\n * Text to truncate\n */\n children: ReactNode;\n className?: string;\n maxLines?: number | null;\n showTooltip?: boolean;\n} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\nconst useStyles = makeStyles({\n root: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n // a rule whose value depends on props makes MUI attach a style element per\n // instance, so the line count travels as a custom property instead\n clamped: {\n display: '-webkit-box',\n // the old per-instance rule declared neither property in clamp mode, so white-space came from\n // the parent and text-overflow sat at its initial value — keep both exactly that way\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n '-webkit-line-clamp': 'var(--truncated-text-line-clamp)',\n '-webkit-box-orient': 'vertical',\n },\n});\n\nfunction TruncatedText({\n children,\n className = '',\n maxLines = null,\n showTooltip = true,\n style,\n ...otherProps\n}: TruncatedTextProps) {\n const [hasTooltip, setHasTooltip] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const styles = useStyles();\n\n useEffect(() => {\n if (!contentRef.current) return;\n const { scrollWidth, clientWidth, scrollHeight, clientHeight } = contentRef.current;\n setHasTooltip(maxLines ? scrollHeight > clientHeight : scrollWidth > clientWidth);\n }, [children, maxLines, showTooltip]);\n\n const content = (\n <div\n className={classNames(styles.root, { [styles.clamped]: !!maxLines }, className)}\n ref={contentRef as RefObject<HTMLDivElement>}\n style={\n maxLines ? ({ '--truncated-text-line-clamp': maxLines, ...style } as CSSProperties) : style\n }\n {...otherProps}\n >\n {children}\n </div>\n );\n\n if (!hasTooltip || !showTooltip) return content;\n return <Tooltip title={children ?? ''}>{content}</Tooltip>;\n}\n\nexport default TruncatedText;\n"],"names":["useStyles","makeStyles","root","overflow","whiteSpace","textOverflow","clamped","display","_ref","children","_ref$className","className","_ref$maxLines","maxLines","_ref$showTooltip","showTooltip","style","otherProps","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","hasTooltip","setHasTooltip","contentRef","useRef","styles","useEffect","current","scrollWidth","clientWidth","scrollHeight","clientHeight","content","_jsx","jsx","_objectSpread","classNames","ref","Tooltip","title"],"mappings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AEL,eAAe,IAAI,kBAAkB,EAGrC,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,IAAI,kBAAkB,EAGrC,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAoH/D,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,kBAAkB,EAClB,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CACtE,GAAG;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,UAAU,mGAQb,eAAe,KAAG,GAAG,CAAC,OAwDxB,CAAC;eAEa,UAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import e from"classnames";import{makeStyles as i,fade as a,Tooltip as n,IconButton as c}from"@material-ui/core";import{useState as l}from"react";import{jsx as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import e from"classnames";import{makeStyles as i,fade as a,Tooltip as n,IconButton as c}from"@material-ui/core";import{useState as l}from"react";import{jsx as p}from"react/jsx-runtime";var s=["tooltipProps","isActive","size","variant","className","data-testid"];function u(r,o){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);o&&(e=e.filter((function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable}))),t.push.apply(t,e)}return t}function d(o){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?u(Object(e),!0).forEach((function(t){r(o,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(e,r))}))}return o}var b=i((function(r){var o=r.palette,t=o.primary.text1||"#fff",e={b08:a(t,.08),b010:a(t,.1),b012:a(t,.12),b016:a(t,.16),b020:a(t,.2)};return{root:{borderRadius:"8px !important",color:o.primary.text6,padding:6,"&:hover":{color:t,backgroundColor:e.b016,backdropFilter:"blur(2px)","&.MuiIconButton-colorPrimary":{color:o.primary.light}},"&:active":{color:t,"&.MuiIconButton-colorPrimary":{color:o.primary.light}},"&.Mui-disabled":{pointerEvents:"all",opacity:.4,color:o.primary.text1,backgroundColor:"transparent","&.MuiIconButton-colorPrimary":{color:o.primary.main}},"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}},colorPrimary:{color:o.primary.main},sizeSmall:{fontSize:20,padding:6,height:32,width:32,"& .i-icon, & .i-icon > svg":{width:"20px !important",height:"20px !important"}},sizeLarge:{"&.MuiButtonBase-root":{padding:8}},contained:{backgroundColor:e.b08,backdropFilter:"blur(2px)","&:hover":{backgroundColor:e.b016}},containedDisabled:{"&.MuiButtonBase-root":{backgroundColor:e.b08}},transparent:{color:o.primary.contrastText,backgroundColor:e.b020,"&:hover":{backgroundColor:e.b010}},transparentDisabled:{"&.MuiButtonBase-root":{backgroundColor:e.b010}},tooltipPopper:{"& .MuiTooltip-tooltip":{backgroundColor:o.background.b10}},tooltipPopperTransparent:{"& .MuiTooltip-tooltip":{backgroundColor:e.b020}},active:{"&.MuiButtonBase-root":{color:o.primary.main,backgroundColor:e.b012,"&.MuiIconButton-colorPrimary":{color:o.primary.main},"&.transparent":{color:o.primary.contrastText,backgroundColor:e.b020}}}}})),m={center:!1},y=function(i){var a,u,y,g=i.tooltipProps,f=void 0===g?{title:"",classes:{}}:g,v=i.isActive,P=void 0!==v&&v,h=i.size,O=void 0===h?"medium":h,k=i.variant,B=void 0===k?"default":k,j=i.className,x=i["data-testid"],z=void 0===x?"IconButton":x,C=t(i,s),M=C.classes,S=void 0===M?{}:M,T=b(),w=l(!1),D=o(w,2),I=D[0],N=D[1],A=d(d({},S),{},{root:e(S.root,T.root,(a={},r(a,T.sizeLarge,"large"===O),r(a,T.contained,"contained"===B),r(a,T.transparent,"transparent"===B),a)),disabled:e(S.disabled,(u={},r(u,T.containedDisabled,"contained"===B),r(u,T.transparentDisabled,"transparent"===B),u)),colorPrimary:e(S.colorPrimary,T.colorPrimary),sizeSmall:e(S.sizeSmall,T.sizeSmall)});return f.title?p(n,d(d({open:I},f),{},{classes:d(d({},f.classes),{},{popper:e(T.tooltipPopper,r({},T.tooltipPopperTransparent,"transparent"===B),null===(y=f.classes)||void 0===y?void 0:y.popper)}),children:p(c,d({"data-testid":z,classes:A,className:e(j,r({},T.active,P),B),onPointerOver:function(){return N(!0)},onPointerOut:function(){return N(!1)},size:O,TouchRippleProps:m},C))})):p(c,d({"data-testid":z,classes:A,className:e(j,r({},T.active,P),B),size:O,TouchRippleProps:m},C))};export{y as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/IconButton/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n IconButton as MuiIconButton,\n IconButtonProps as MuiIconButtonProps,\n makeStyles,\n Tooltip,\n TooltipProps,\n fade,\n} from '@material-ui/core';\nimport { MouseEventHandler, ReactNode, useState } from 'react';\n\nconst useStyles = makeStyles(({ palette }) => {\n const text1 = palette.primary.text1 || '#fff';\n const background = {\n b08: fade(text1, 0.08),\n b010: fade(text1, 0.1),\n b012: fade(text1, 0.12),\n b016: fade(text1, 0.16),\n b020: fade(text1, 0.2),\n };\n\n return {\n root: {\n borderRadius: '8px !important',\n color: palette.primary.text6,\n padding: 6,\n '&:hover': {\n color: text1,\n backgroundColor: background.b016,\n backdropFilter: 'blur(2px)',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&:active': {\n color: text1,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&.Mui-disabled': {\n pointerEvents: 'all',\n opacity: 0.4,\n color: palette.primary.text1,\n backgroundColor: 'transparent',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'inherit',\n fontSize: 'inherit',\n },\n },\n colorPrimary: {\n color: palette.primary.main,\n },\n sizeSmall: {\n fontSize: 20,\n padding: 6,\n height: 32,\n width: 32,\n\n '& .i-icon, & .i-icon > svg': {\n width: '20px !important',\n height: '20px !important',\n },\n },\n sizeLarge: {\n '&.MuiButtonBase-root': {\n padding: 8,\n },\n },\n contained: {\n backgroundColor: background.b08,\n backdropFilter: 'blur(2px)',\n '&:hover': {\n backgroundColor: background.b016,\n },\n },\n containedDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b08,\n },\n },\n transparent: {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n '&:hover': {\n backgroundColor: background.b010,\n },\n },\n transparentDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b010,\n },\n },\n tooltipPopper: {\n '& .MuiTooltip-tooltip': {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/IconButton/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n IconButton as MuiIconButton,\n IconButtonProps as MuiIconButtonProps,\n makeStyles,\n Tooltip,\n TooltipProps,\n fade,\n} from '@material-ui/core';\nimport { MouseEventHandler, ReactNode, useState } from 'react';\n\nconst useStyles = makeStyles(({ palette }) => {\n const text1 = palette.primary.text1 || '#fff';\n const background = {\n b08: fade(text1, 0.08),\n b010: fade(text1, 0.1),\n b012: fade(text1, 0.12),\n b016: fade(text1, 0.16),\n b020: fade(text1, 0.2),\n };\n\n return {\n root: {\n borderRadius: '8px !important',\n color: palette.primary.text6,\n padding: 6,\n '&:hover': {\n color: text1,\n backgroundColor: background.b016,\n backdropFilter: 'blur(2px)',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&:active': {\n color: text1,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.light,\n },\n },\n '&.Mui-disabled': {\n pointerEvents: 'all',\n opacity: 0.4,\n color: palette.primary.text1,\n backgroundColor: 'transparent',\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'inherit',\n fontSize: 'inherit',\n },\n },\n colorPrimary: {\n color: palette.primary.main,\n },\n sizeSmall: {\n fontSize: 20,\n padding: 6,\n height: 32,\n width: 32,\n\n '& .i-icon, & .i-icon > svg': {\n width: '20px !important',\n height: '20px !important',\n },\n },\n sizeLarge: {\n '&.MuiButtonBase-root': {\n padding: 8,\n },\n },\n contained: {\n backgroundColor: background.b08,\n backdropFilter: 'blur(2px)',\n '&:hover': {\n backgroundColor: background.b016,\n },\n },\n containedDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b08,\n },\n },\n transparent: {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n '&:hover': {\n backgroundColor: background.b010,\n },\n },\n transparentDisabled: {\n '&.MuiButtonBase-root': {\n backgroundColor: background.b010,\n },\n },\n tooltipPopper: {\n '& .MuiTooltip-tooltip': {\n backgroundColor: palette.background.b10,\n },\n },\n tooltipPopperTransparent: {\n '& .MuiTooltip-tooltip': {\n backgroundColor: background.b020,\n },\n },\n active: {\n '&.MuiButtonBase-root': {\n color: palette.primary.main,\n backgroundColor: background.b012,\n '&.MuiIconButton-colorPrimary': {\n color: palette.primary.main,\n },\n '&.transparent': {\n color: palette.primary.contrastText,\n backgroundColor: background.b020,\n },\n },\n },\n };\n});\n\nconst TouchRippleProps = { center: false };\n\nexport type IconButtonProps = Omit<\n MuiIconButtonProps,\n 'size' | 'variant' | 'classes' | 'className' | 'children' | 'onClick'\n> & {\n /**\n * The content of the component.\n */\n children?: ReactNode;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n size?: 'small' | 'medium' | 'large';\n variant?: 'transparent' | 'contained' | 'default';\n className?: string;\n\n isActive?: boolean;\n tooltipProps?: Omit<TooltipProps, 'children'>;\n classes?: {\n root?: string;\n disabled?: string;\n colorPrimary?: string;\n sizeSmall?: string;\n };\n 'data-testid'?: string;\n};\n\nconst IconButton = ({\n tooltipProps = { title: '', classes: {} },\n isActive = false,\n size = 'medium',\n variant = 'default',\n className,\n 'data-testid': dataTestId = 'IconButton',\n ...otherProps\n}: IconButtonProps): JSX.Element => {\n const { classes = {} } = otherProps;\n\n const styles = useStyles();\n\n const [isTooltipShown, setIsTooltipShown] = useState(false);\n\n const buttonClasses = {\n ...classes,\n root: classNames(classes.root, styles.root, {\n [styles.sizeLarge]: size === 'large',\n [styles.contained]: variant === 'contained',\n [styles.transparent]: variant === 'transparent',\n }),\n disabled: classNames(classes.disabled, {\n [styles.containedDisabled]: variant === 'contained',\n [styles.transparentDisabled]: variant === 'transparent',\n }),\n colorPrimary: classNames(classes.colorPrimary, styles.colorPrimary),\n sizeSmall: classNames(classes.sizeSmall, styles.sizeSmall),\n };\n\n return tooltipProps.title ? (\n <Tooltip\n open={isTooltipShown}\n {...(tooltipProps as TooltipProps)}\n classes={{\n ...tooltipProps.classes,\n popper: classNames(\n styles.tooltipPopper,\n { [styles.tooltipPopperTransparent]: variant === 'transparent' },\n tooltipProps.classes?.popper\n ),\n }}\n >\n <MuiIconButton\n data-testid={dataTestId}\n classes={buttonClasses}\n className={classNames(className, { [styles.active]: isActive }, variant)}\n onPointerOver={() => setIsTooltipShown(true)}\n onPointerOut={() => setIsTooltipShown(false)}\n size={size as any}\n TouchRippleProps={TouchRippleProps}\n {...(otherProps as MuiIconButtonProps)}\n />\n </Tooltip>\n ) : (\n <MuiIconButton\n data-testid={dataTestId}\n classes={buttonClasses}\n className={classNames(className, { [styles.active]: isActive }, variant)}\n size={size as any}\n TouchRippleProps={TouchRippleProps}\n {...(otherProps as MuiIconButtonProps)}\n />\n );\n};\n\nexport default IconButton;\n"],"names":["useStyles","makeStyles","_ref","palette","text1","primary","background","b08","fade","b010","b012","b016","b020","root","borderRadius","color","text6","padding","backgroundColor","backdropFilter","light","pointerEvents","opacity","main","fontSize","colorPrimary","sizeSmall","height","width","sizeLarge","contained","containedDisabled","transparent","contrastText","transparentDisabled","tooltipPopper","b10","tooltipPopperTransparent","active","TouchRippleProps","center","IconButton","_ref2","_classNames","_classNames2","_tooltipProps$classes","_ref2$tooltipProps","tooltipProps","title","classes","_ref2$isActive","isActive","_ref2$size","size","_ref2$variant","variant","className","_ref2$dataTestid","dataTestId","otherProps","_objectWithoutProperties","_excluded","_otherProps$classes","styles","useState","_useState2","_slicedToArray","_useState","isTooltipShown","setIsTooltipShown","buttonClasses","classNames","_defineProperty","disabled","_jsx","Tooltip","_objectSpread","open","popper","children","MuiIconButton","onPointerOver","onPointerOut"],"mappings":"4+BAWA,IAAMA,EAAYC,GAAW,SAAiBC,GAAA,IAAdC,IAAAA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tC,cACtDC,UAAW6C,EAAWtB,EAAQvB,UAAWqC,EAAOrC,aAGlD,OAAOqB,EAAaC,MAClB0B,EAACC,EAAOC,EAAAA,EAAA,CACNC,KAAMT,GACDrB,GAAY,GAAA,CACjBE,QAAO2B,EAAAA,EAAA,CAAA,EACF7B,EAAaE,SAAO,GAAA,CACvB6B,OAAQP,EACNR,EAAO5B,cAAaqC,EAAA,CAAA,EACjBT,EAAO1B,yBAAuC,gBAAZkB,GACjB,QAApBR,EAAAA,EAAaE,eAAO,IAAAJ,OAAA,EAApBA,EAAsBiC,UAExBC,SAEFL,EAACM,EAAaJ,EAAA,CACZ,cAAalB,EACbT,QAASqB,EACTd,UAAWe,EAAWf,EAAcO,EAAAA,CAAAA,EAAAA,EAAOzB,OAASa,GAAYI,GAChE0B,cAAe,WAAA,OAAMZ,GAAkB,EAAM,EAC7Ca,aAAc,WAAA,OAAMb,GAAkB,EAAO,EAC7ChB,KAAMA,EACNd,iBAAkBA,GACboB,OAITe,EAACM,EAAaJ,EAAA,CACZ,cAAalB,EACbT,QAASqB,EACTd,UAAWe,EAAWf,EAAcO,EAAAA,CAAAA,EAAAA,EAAOzB,OAASa,GAAYI,GAChEF,KAAMA,EACNd,iBAAkBA,GACboB,GAGX"}
|
|
@@ -8,6 +8,6 @@ export type TruncatedTextProps = {
|
|
|
8
8
|
maxLines?: number | null;
|
|
9
9
|
showTooltip?: boolean;
|
|
10
10
|
} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
11
|
-
declare function TruncatedText({ children, className, maxLines, showTooltip, ...otherProps }: TruncatedTextProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function TruncatedText({ children, className, maxLines, showTooltip, style, ...otherProps }: TruncatedTextProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default TruncatedText;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TruncatedText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TruncatedText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACd,SAAS,EAKV,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,CAAC;AAqBtE,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,SAAc,EACd,QAAe,EACf,WAAkB,EAClB,KAAK,EACL,GAAG,UAAU,EACd,EAAE,kBAAkB,2CA0BpB;eAEc,aAAa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as i,useRef as o,useEffect as l}from"react";import{makeStyles as n,Tooltip as c}from"@material-ui/core";import a from"classnames";import{jsx as p}from"react/jsx-runtime";var s=["children","className","maxLines","showTooltip","style"];function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function f(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?m(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var u=n({root:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},clamped:{display:"-webkit-box",whiteSpace:"inherit",textOverflow:"clip","-webkit-line-clamp":"var(--truncated-text-line-clamp)","-webkit-box-orient":"vertical"}});function b(n){var m=n.children,b=n.className,d=void 0===b?"":b,h=n.maxLines,O=void 0===h?null:h,v=n.showTooltip,w=void 0===v||v,y=n.style,j=t(n,s),x=i(!1),P=r(x,2),g=P[0],k=P[1],D=o(null),S=u();l((function(){if(D.current){var e=D.current,r=e.scrollWidth,t=e.clientWidth,i=e.scrollHeight,o=e.clientHeight;k(O?i>o:r>t)}}),[m,O,w]);var N=p("div",f(f({className:a(S.root,e({},S.clamped,!!O),d),ref:D,style:O?f({"--truncated-text-line-clamp":O},y):y},j),{},{children:m}));return g&&w?p(c,{title:null!=m?m:"",children:N}):N}export{b as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/TruncatedText/index.tsx"],"sourcesContent":["import {\n DetailedHTMLProps,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport classNames from 'classnames';\n\nexport type TruncatedTextProps = {\n /**\n * Text to truncate\n */\n children: ReactNode;\n className?: string;\n maxLines?: number | null;\n showTooltip?: boolean;\n} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\nconst useStyles = makeStyles({\n root:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/TruncatedText/index.tsx"],"sourcesContent":["import {\n CSSProperties,\n DetailedHTMLProps,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport classNames from 'classnames';\n\nexport type TruncatedTextProps = {\n /**\n * Text to truncate\n */\n children: ReactNode;\n className?: string;\n maxLines?: number | null;\n showTooltip?: boolean;\n} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\nconst useStyles = makeStyles({\n root: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n // a rule whose value depends on props makes MUI attach a style element per\n // instance, so the line count travels as a custom property instead\n clamped: {\n display: '-webkit-box',\n // the old per-instance rule declared neither property in clamp mode, so white-space came from\n // the parent and text-overflow sat at its initial value — keep both exactly that way\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n '-webkit-line-clamp': 'var(--truncated-text-line-clamp)',\n '-webkit-box-orient': 'vertical',\n },\n});\n\nfunction TruncatedText({\n children,\n className = '',\n maxLines = null,\n showTooltip = true,\n style,\n ...otherProps\n}: TruncatedTextProps) {\n const [hasTooltip, setHasTooltip] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const styles = useStyles();\n\n useEffect(() => {\n if (!contentRef.current) return;\n const { scrollWidth, clientWidth, scrollHeight, clientHeight } = contentRef.current;\n setHasTooltip(maxLines ? scrollHeight > clientHeight : scrollWidth > clientWidth);\n }, [children, maxLines, showTooltip]);\n\n const content = (\n <div\n className={classNames(styles.root, { [styles.clamped]: !!maxLines }, className)}\n ref={contentRef as RefObject<HTMLDivElement>}\n style={\n maxLines ? ({ '--truncated-text-line-clamp': maxLines, ...style } as CSSProperties) : style\n }\n {...otherProps}\n >\n {children}\n </div>\n );\n\n if (!hasTooltip || !showTooltip) return content;\n return <Tooltip title={children ?? ''}>{content}</Tooltip>;\n}\n\nexport default TruncatedText;\n"],"names":["useStyles","makeStyles","root","overflow","whiteSpace","textOverflow","clamped","display","TruncatedText","_ref","children","_ref$className","className","_ref$maxLines","maxLines","_ref$showTooltip","showTooltip","style","otherProps","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","hasTooltip","setHasTooltip","contentRef","useRef","styles","useEffect","current","scrollWidth","clientWidth","scrollHeight","clientHeight","content","_jsx","_objectSpread","classNames","ref","Tooltip","title"],"mappings":"g+BAuBA,IAAMA,EAAYC,EAAW,CAC3BC,KAAM,CACJC,SAAU,SACVC,WAAY,SACZC,aAAc,YAIhBC,QAAS,CACPC,QAAS,cAGTH,WAAY,UACZC,aAAc,OACd,qBAAsB,mCACtB,qBAAsB,cAI1B,SAASG,EAOcC,GAAA,IANrBC,IAAAA,SAAQC,EAAAF,EACRG,UAAAA,aAAY,GAAED,EAAAE,EAAAJ,EACdK,SAAAA,aAAW,KAAID,EAAAE,EAAAN,EACfO,YAAAA,cAAkBD,EAClBE,IAAAA,MACGC,EAAUC,EAAAV,EAAAW,GAEuBC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAA5CC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAC1BK,EAAaC,EAAuB,MACpCC,EAAS7B,IAEf8B,GAAU,WACR,GAAKH,EAAWI,QAAhB,CACA,IAAiEJ,EAAAA,EAAWI,QAApEC,IAAAA,YAAaC,IAAAA,YAAaC,IAAAA,aAAcC,IAAAA,aAChDT,EAAcZ,EAAWoB,EAAeC,EAAeH,EAAcC,EAF5C,CAG1B,GAAE,CAACvB,EAAUI,EAAUE,IAExB,IAAMoB,EACJC,EAAA,MAAAC,EAAAA,EAAA,CACE1B,UAAW2B,EAAWV,EAAO3B,KAAS2B,EAAAA,CAAAA,EAAAA,EAAOvB,UAAYQ,GAAYF,GACrE4B,IAAKb,EACLV,MACEH,EAAQwB,EAAA,CAAM,8BAA+BxB,GAAaG,GAA4BA,GAEpFC,GAAU,GAAA,CAAAR,SAEbA,KAIL,OAAKe,GAAeT,EACbqB,EAACI,EAAO,CAACC,MAAOhC,QAAAA,EAAY,GAAGA,SAAE0B,IADAA,CAE1C"}
|
package/mcp-server/server.mjs
CHANGED
|
@@ -224,7 +224,7 @@ const MCP_PROTOCOL_VERSION = '2025-03-26';
|
|
|
224
224
|
const MCP_NETWORK_TRANSPORT = 'pipe';
|
|
225
225
|
const UNKNOWN_CLIENT_ATTR = 'unknown';
|
|
226
226
|
const DEFAULT_SAMPLING_RATE = 1.0;
|
|
227
|
-
const TELEMETRY_CONFIG_TIMEOUT_MS =
|
|
227
|
+
const TELEMETRY_CONFIG_TIMEOUT_MS = 5000;
|
|
228
228
|
const TELEMETRY_INIT_TIMEOUT_MS = 10_000;
|
|
229
229
|
const TELEMETRY_SHUTDOWN_TIMEOUT_MS = 5000;
|
|
230
230
|
const OTLP_TRACES_ENDPOINT = 'https://otlp.uptrace.dev/v1/traces';
|
|
@@ -246,9 +246,9 @@ const validateDsn = dsn => {
|
|
|
246
246
|
return url.href;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
const MCP_SERVER_VERSION = '1.5.
|
|
249
|
+
const MCP_SERVER_VERSION = '1.5.2';
|
|
250
250
|
|
|
251
|
-
var version = "3.78.0-
|
|
251
|
+
var version = "3.78.0-2";
|
|
252
252
|
|
|
253
253
|
const CORVA_UI_VERSION = version;
|
|
254
254
|
|
|
@@ -38053,6 +38053,7 @@ const formatUptime = ms => {
|
|
|
38053
38053
|
}
|
|
38054
38054
|
return `${seconds}s`;
|
|
38055
38055
|
};
|
|
38056
|
+
const formatSeconds = ms => `${(ms / 1000).toFixed(2)}s`;
|
|
38056
38057
|
const formatBytes = bytes => {
|
|
38057
38058
|
const mb = bytes / (1024 * 1024);
|
|
38058
38059
|
return `${mb.toFixed(1)} MB`;
|
|
@@ -38069,7 +38070,15 @@ const handleGetDiagnostics = (stats, telemetry, identity, registeredPromptNames)
|
|
|
38069
38070
|
text += h2('Server');
|
|
38070
38071
|
text += `${bold('Version')}: ${MCP_SERVER_VERSION}\n\n`;
|
|
38071
38072
|
text += h2('Uptime');
|
|
38072
|
-
text += `${bold('Server running for')}: ${formatUptime(uptimeMs)}\n
|
|
38073
|
+
text += `${bold('Server running for')}: ${formatUptime(uptimeMs)}\n`;
|
|
38074
|
+
if (stats.startupMs !== undefined) {
|
|
38075
|
+
text += `${bold('Startup')}: ${formatSeconds(stats.startupMs)} from process start to transport connected`;
|
|
38076
|
+
if (stats.telemetryInitMs !== undefined) {
|
|
38077
|
+
text += `, of which telemetry init ${formatSeconds(stats.telemetryInitMs)}`;
|
|
38078
|
+
}
|
|
38079
|
+
text += '\n';
|
|
38080
|
+
}
|
|
38081
|
+
text += '\n';
|
|
38073
38082
|
text += h2('Memory Usage');
|
|
38074
38083
|
text += table(['Metric', 'Value'], [['Heap Used', formatBytes(heapUsed)], ['Heap Total', formatBytes(heapTotal)], ['Resident Set Size', formatBytes(rss)]]);
|
|
38075
38084
|
text += '\n\n';
|
|
@@ -38888,6 +38897,9 @@ class CorvaUiMcpServer {
|
|
|
38888
38897
|
isConnected = false;
|
|
38889
38898
|
startTime = Date.now();
|
|
38890
38899
|
requestCount = 0;
|
|
38900
|
+
|
|
38901
|
+
/** Process start → transport connected, in ms. Set once run() has connected. */
|
|
38902
|
+
|
|
38891
38903
|
telemetry = createNoopTelemetryClient();
|
|
38892
38904
|
telemetryInfo = null;
|
|
38893
38905
|
telemetryInitPromise = null;
|
|
@@ -39123,29 +39135,39 @@ class CorvaUiMcpServer {
|
|
|
39123
39135
|
});
|
|
39124
39136
|
}
|
|
39125
39137
|
async run() {
|
|
39126
|
-
|
|
39127
|
-
|
|
39128
|
-
|
|
39129
|
-
|
|
39130
|
-
|
|
39131
|
-
this.mcpLogger.
|
|
39132
|
-
// Non-blocking: tool calls can begin; first calls within the 10s window may miss telemetry
|
|
39138
|
+
// Telemetry settles before the transport connects, so no request can reach a handler while
|
|
39139
|
+
// telemetry initialization is pending. Agents call tools right after initialize, and the
|
|
39140
|
+
// calls that landed during the config fetch used to get no span and no metric (AI-369). The
|
|
39141
|
+
// cost is an initialize response delayed by the fetch: ~2 s, at most the config timeout.
|
|
39142
|
+
// stdin stays paused until connect(), so nothing the client sends meanwhile is lost.
|
|
39143
|
+
const telemetryTimer = this.mcpLogger.time('telemetry-init');
|
|
39133
39144
|
this.telemetryInitPromise = initTelemetry(this.mcpLogger).then(({
|
|
39134
39145
|
client,
|
|
39135
39146
|
info
|
|
39136
39147
|
}) => {
|
|
39137
|
-
|
|
39138
|
-
|
|
39139
|
-
/* shutting down anyway — a failed shutdown of a discarded client changes nothing */
|
|
39140
|
-
});
|
|
39141
|
-
} else {
|
|
39142
|
-
this.telemetry = client;
|
|
39143
|
-
this.telemetryInfo = info;
|
|
39144
|
-
this.flushPendingInitData();
|
|
39145
|
-
}
|
|
39148
|
+
this.telemetry = client;
|
|
39149
|
+
this.telemetryInfo = info;
|
|
39146
39150
|
}).catch(() => {
|
|
39147
39151
|
/* telemetry is best-effort — it must never take the server down */
|
|
39148
39152
|
});
|
|
39153
|
+
await this.telemetryInitPromise;
|
|
39154
|
+
this.telemetryInitMs = telemetryTimer.stop();
|
|
39155
|
+
this.mcpLogger.timeEnd('telemetry-init', telemetryTimer);
|
|
39156
|
+
|
|
39157
|
+
// If shutdown was requested during the wait (a signal; a closed stdin is usually noticed only
|
|
39158
|
+
// once reading starts), shutdown() already runs and owns the client.
|
|
39159
|
+
if (this.shutdownRequested) {
|
|
39160
|
+
return;
|
|
39161
|
+
}
|
|
39162
|
+
const connectTimer = this.mcpLogger.time('transport-connect');
|
|
39163
|
+
this.transport = new StdioServerTransport();
|
|
39164
|
+
await this.server.connect(this.transport);
|
|
39165
|
+
this.isConnected = true;
|
|
39166
|
+
// performance.now() counts from process start, so this is the time to ready as the client saw
|
|
39167
|
+
// it, minus whatever ran before the process (the data regeneration in `yarn mcp:dev`).
|
|
39168
|
+
this.startupMs = performance.now();
|
|
39169
|
+
this.mcpLogger.timeEnd('transport-connect', connectTimer);
|
|
39170
|
+
this.mcpLogger.info('Corva UI MCP Server running on stdio');
|
|
39149
39171
|
}
|
|
39150
39172
|
async shutdown() {
|
|
39151
39173
|
this.mcpLogger.info('Shutting down MCP server...');
|
|
@@ -39157,7 +39179,10 @@ class CorvaUiMcpServer {
|
|
|
39157
39179
|
if (this.identityPromise) {
|
|
39158
39180
|
await withTimeout(this.identityPromise, TELEMETRY_INIT_TIMEOUT_MS);
|
|
39159
39181
|
}
|
|
39160
|
-
|
|
39182
|
+
|
|
39183
|
+
// No transport means shutdown came during the telemetry wait: the client never connected, so
|
|
39184
|
+
// there is no session to end.
|
|
39185
|
+
if (this.telemetry.isEnabled() && this.transport) {
|
|
39161
39186
|
const sessionDurationMs = Date.now() - this.startTime;
|
|
39162
39187
|
const clientInfo = this.server.server.getClientVersion();
|
|
39163
39188
|
this.telemetry.metrics.recordSessionEnd(sessionDurationMs, this.requestCount, clientInfo?.name, clientInfo?.version, this.projectIdentity);
|
|
@@ -39179,7 +39204,9 @@ class CorvaUiMcpServer {
|
|
|
39179
39204
|
getStats() {
|
|
39180
39205
|
return {
|
|
39181
39206
|
startTime: this.startTime,
|
|
39182
|
-
requestCount: this.requestCount
|
|
39207
|
+
requestCount: this.requestCount,
|
|
39208
|
+
startupMs: this.startupMs,
|
|
39209
|
+
telemetryInitMs: this.telemetryInitMs
|
|
39183
39210
|
};
|
|
39184
39211
|
}
|
|
39185
39212
|
}
|