@viswa-test/test-citation 0.0.76 → 0.0.78
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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("@mui/material"),i=require("lucide-react"),o=require("react");exports.default=function(l){var r,a,s,u=l.open,c=l.anchorEl,d=l.containerEl,p=l.clipTopEl,m=l.onClose,f=l.summary;l.markdownStyles,l.isLoading;var g=o.useRef(null),x=o.useState(null),h=x[0],v=x[1],_=o.useState(null),b=_[0],w=_[1],y="string"==typeof f?{deviation_summary:f}:null!=f?f:{};y.deviation_title;var B=y.deviation_summary,C=y.evaluation_outputs,j=(null===(r=null==C?void 0:C.metadata)||void 0===r?void 0:r.label_color)||"#6366F1",R=null!==(a=null==d?void 0:d.getBoundingClientRect().width)&&void 0!==a?a:180,E=Math.max(148,R+70),S=c&&d?{top:c.getBoundingClientRect().top,bottom:c.getBoundingClientRect().bottom,left:d.getBoundingClientRect().left+d.getBoundingClientRect().width/2}:null;o.useEffect(function(){if(!u||!c||!d)return v(null),void w(null);var e=function(){null!==g.current&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(function(){var e,t=c.getBoundingClientRect(),n=d.getBoundingClientRect(),i=null==p?void 0:p.getBoundingClientRect();v({top:t.top,bottom:t.bottom,left:n.left+n.width/2}),w(null!==(e=null==i?void 0:i.bottom)&&void 0!==e?e:null)})};e();var t=!0;return window.addEventListener("scroll",e,{passive:!0,capture:t}),window.addEventListener("resize",e),function(){null!==g.current&&cancelAnimationFrame(g.current),window.removeEventListener("scroll",e,t),window.removeEventListener("resize",e)}},[u,c,d,p]);var z=null!==(s=null!=h?h:S)&&void 0!==s?s:{top:0,bottom:0,left:0},q=z.bottom+20,I=null!=b?Math.max(0,b-q):0;return f?t.jsx(n.Popper,e.__assign({open:u,disablePortal:!0,popperOptions:{strategy:"fixed"},anchorEl:{getBoundingClientRect:function(){return{width:0,height:0,top:z.top,bottom:z.top,left:z.left,right:z.left,x:z.left,y:z.top,toJSON:function(){}}}},placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,20]}}],sx:{zIndex:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("@mui/material"),i=require("lucide-react"),o=require("react");exports.default=function(l){var r,a,s,u=l.open,c=l.anchorEl,d=l.containerEl,p=l.clipTopEl,m=l.onClose,f=l.summary;l.markdownStyles,l.isLoading;var g=o.useRef(null),x=o.useState(null),h=x[0],v=x[1],_=o.useState(null),b=_[0],w=_[1],y="string"==typeof f?{deviation_summary:f}:null!=f?f:{};y.deviation_title;var B=y.deviation_summary,C=y.evaluation_outputs,j=(null===(r=null==C?void 0:C.metadata)||void 0===r?void 0:r.label_color)||"#6366F1",R=null!==(a=null==d?void 0:d.getBoundingClientRect().width)&&void 0!==a?a:180,E=Math.max(148,R+70),S=c&&d?{top:c.getBoundingClientRect().top,bottom:c.getBoundingClientRect().bottom,left:d.getBoundingClientRect().left+d.getBoundingClientRect().width/2}:null;o.useEffect(function(){if(!u||!c||!d)return v(null),void w(null);var e=function(){null!==g.current&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(function(){var e,t=c.getBoundingClientRect(),n=d.getBoundingClientRect(),i=null==p?void 0:p.getBoundingClientRect();v({top:t.top,bottom:t.bottom,left:n.left+n.width/2}),w(null!==(e=null==i?void 0:i.bottom)&&void 0!==e?e:null)})};e();var t=!0;return window.addEventListener("scroll",e,{passive:!0,capture:t}),window.addEventListener("resize",e),function(){null!==g.current&&cancelAnimationFrame(g.current),window.removeEventListener("scroll",e,t),window.removeEventListener("resize",e)}},[u,c,d,p]);var z=null!==(s=null!=h?h:S)&&void 0!==s?s:{top:0,bottom:0,left:0},q=z.bottom+20,I=null!=b?Math.max(0,b-q):0;return f?t.jsx(n.Popper,e.__assign({open:u,disablePortal:!0,popperOptions:{strategy:"fixed"},anchorEl:{getBoundingClientRect:function(){return{width:0,height:0,top:z.top,bottom:z.top,left:z.left,right:z.left,x:z.left,y:z.top,toJSON:function(){}}}},placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,20]}}],sx:{zIndex:20}},{children:t.jsxs(n.Paper,e.__assign({sx:e.__assign(e.__assign({p:1.5,borderRadius:"12px",width:E,maxWidth:E},I>0&&{clipPath:"inset(".concat(I,"px 0 0 0 round 12px)")}),{transition:"transform 80ms linear",willChange:"transform",backfaceVisibility:"hidden",transform:"translateZ(0)",boxShadow:"0px 10px 24px rgba(15, 23, 42, 0.18)",border:"1px solid ".concat(j,"26"),borderTop:"3px solid ".concat(j),overflow:"hidden",bgcolor:"#fff"})},{children:[t.jsxs(n.Box,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.75}},{children:[t.jsxs(n.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0}},{children:[t.jsx(i.Info,{size:14,color:j}),t.jsx(n.Typography,e.__assign({sx:{fontSize:"11px",fontWeight:700,color:j,textTransform:"uppercase",letterSpacing:"0.4px",lineHeight:1.2}},{children:"Summary"}))]})),t.jsx(n.IconButton,e.__assign({size:"small",onClick:m,sx:{p:.25,ml:.5,color:"#64748B"}},{children:t.jsx(i.X,{size:14})}))]})),t.jsx(n.Typography,e.__assign({sx:{fontSize:"12px",color:"#475569",lineHeight:1.5,fontWeight:400,overflowWrap:"anywhere"}},{children:B||"No summary available."}))]}))})):null};
|
|
2
2
|
//# sourceMappingURL=CognitiveSummaryPopup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Popper as o,Paper as i,Box as l,Typography as r,IconButton as a}from"@mui/material";import{Info as d,X as c}from"lucide-react";import{useRef as u,useState as s,useEffect as m}from"react";function p(p){var f,g,h,v=p.open,x=p.anchorEl,b=p.containerEl,w=p.clipTopEl,y=p.onClose,C=p.summary;p.markdownStyles,p.isLoading;var B=u(null),R=s(null),z=R[0],E=R[1],S=s(null),L=S[0],W=S[1],_="string"==typeof C?{deviation_summary:C}:null!=C?C:{};_.deviation_title;var F=_.deviation_summary,k=_.evaluation_outputs,A=(null===(f=null==k?void 0:k.metadata)||void 0===f?void 0:f.label_color)||"#6366F1",I=null!==(g=null==b?void 0:b.getBoundingClientRect().width)&&void 0!==g?g:180,T=Math.max(148,I+70),j=x&&b?{top:x.getBoundingClientRect().top,bottom:x.getBoundingClientRect().bottom,left:b.getBoundingClientRect().left+b.getBoundingClientRect().width/2}:null;m(function(){if(!v||!x||!b)return E(null),void W(null);var t=function(){null!==B.current&&cancelAnimationFrame(B.current),B.current=requestAnimationFrame(function(){var t,e=x.getBoundingClientRect(),n=b.getBoundingClientRect(),o=null==w?void 0:w.getBoundingClientRect();E({top:e.top,bottom:e.bottom,left:n.left+n.width/2}),W(null!==(t=null==o?void 0:o.bottom)&&void 0!==t?t:null)})};t();var e=!0;return window.addEventListener("scroll",t,{passive:!0,capture:e}),window.addEventListener("resize",t),function(){null!==B.current&&cancelAnimationFrame(B.current),window.removeEventListener("scroll",t,e),window.removeEventListener("resize",t)}},[v,x,b,w]);var H=null!==(h=null!=z?z:j)&&void 0!==h?h:{top:0,bottom:0,left:0},M=H.bottom+20,N=null!=L?Math.max(0,L-M):0;return C?e(o,t({open:v,disablePortal:!0,popperOptions:{strategy:"fixed"},anchorEl:{getBoundingClientRect:function(){return{width:0,height:0,top:H.top,bottom:H.top,left:H.left,right:H.left,x:H.left,y:H.top,toJSON:function(){}}}},placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,20]}}],sx:{zIndex:
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Popper as o,Paper as i,Box as l,Typography as r,IconButton as a}from"@mui/material";import{Info as d,X as c}from"lucide-react";import{useRef as u,useState as s,useEffect as m}from"react";function p(p){var f,g,h,v=p.open,x=p.anchorEl,b=p.containerEl,w=p.clipTopEl,y=p.onClose,C=p.summary;p.markdownStyles,p.isLoading;var B=u(null),R=s(null),z=R[0],E=R[1],S=s(null),L=S[0],W=S[1],_="string"==typeof C?{deviation_summary:C}:null!=C?C:{};_.deviation_title;var F=_.deviation_summary,k=_.evaluation_outputs,A=(null===(f=null==k?void 0:k.metadata)||void 0===f?void 0:f.label_color)||"#6366F1",I=null!==(g=null==b?void 0:b.getBoundingClientRect().width)&&void 0!==g?g:180,T=Math.max(148,I+70),j=x&&b?{top:x.getBoundingClientRect().top,bottom:x.getBoundingClientRect().bottom,left:b.getBoundingClientRect().left+b.getBoundingClientRect().width/2}:null;m(function(){if(!v||!x||!b)return E(null),void W(null);var t=function(){null!==B.current&&cancelAnimationFrame(B.current),B.current=requestAnimationFrame(function(){var t,e=x.getBoundingClientRect(),n=b.getBoundingClientRect(),o=null==w?void 0:w.getBoundingClientRect();E({top:e.top,bottom:e.bottom,left:n.left+n.width/2}),W(null!==(t=null==o?void 0:o.bottom)&&void 0!==t?t:null)})};t();var e=!0;return window.addEventListener("scroll",t,{passive:!0,capture:e}),window.addEventListener("resize",t),function(){null!==B.current&&cancelAnimationFrame(B.current),window.removeEventListener("scroll",t,e),window.removeEventListener("resize",t)}},[v,x,b,w]);var H=null!==(h=null!=z?z:j)&&void 0!==h?h:{top:0,bottom:0,left:0},M=H.bottom+20,N=null!=L?Math.max(0,L-M):0;return C?e(o,t({open:v,disablePortal:!0,popperOptions:{strategy:"fixed"},anchorEl:{getBoundingClientRect:function(){return{width:0,height:0,top:H.top,bottom:H.top,left:H.left,right:H.left,x:H.left,y:H.top,toJSON:function(){}}}},placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,20]}}],sx:{zIndex:20}},{children:n(i,t({sx:t(t({p:1.5,borderRadius:"12px",width:T,maxWidth:T},N>0&&{clipPath:"inset(".concat(N,"px 0 0 0 round 12px)")}),{transition:"transform 80ms linear",willChange:"transform",backfaceVisibility:"hidden",transform:"translateZ(0)",boxShadow:"0px 10px 24px rgba(15, 23, 42, 0.18)",border:"1px solid ".concat(A,"26"),borderTop:"3px solid ".concat(A),overflow:"hidden",bgcolor:"#fff"})},{children:[n(l,t({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.75}},{children:[n(l,t({sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0}},{children:[e(d,{size:14,color:A}),e(r,t({sx:{fontSize:"11px",fontWeight:700,color:A,textTransform:"uppercase",letterSpacing:"0.4px",lineHeight:1.2}},{children:"Summary"}))]})),e(a,t({size:"small",onClick:y,sx:{p:.25,ml:.5,color:"#64748B"}},{children:e(c,{size:14})}))]})),e(r,t({sx:{fontSize:"12px",color:"#475569",lineHeight:1.5,fontWeight:400,overflowWrap:"anywhere"}},{children:F||"No summary available."}))]}))})):null}export{p as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveSummaryPopup.js.map
|