@e-llm-studio/citation 0.0.193 → 0.0.194

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("react"),a=require("lucide-react"),i=require("./Splitter.module.css.js"),s=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},l=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},o=function(){return t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[t.jsx("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),t.jsx("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},c=function(){return t.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:t.jsx("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))};exports.default=function(r){var d=r.left,u=r.right,f=r.defaultLeftWidth,h=void 0===f?50:f,x=r.minLeftWidth,g=void 0===x?250:x,v=r.minRightWidth,C=void 0===v?250:v,p=r.className,_=void 0===p?"":p,m=r.height,j=void 0===m?"400px":m,w=r.width,N=void 0===w?"100%":w,H=r.header,L=r.onLeftWidthChange,B=r.openInFullscreen,A=void 0!==B&&B,k=r.onFullscreenClose,M=n.useState(h),V=M[0],b=M[1],E=n.useState(h),S=E[0],F=E[1],z=n.useState(!1),y=z[0],R=z[1],D=n.useState(!1),O=D[0],P=D[1],q=n.useState(!1),T=q[0],Z=q[1],I=n.useState(0),W=I[0],X=I[1],U=n.useState(0),Y=U[0],G=U[1],J=n.useState(A),K=J[0],Q=J[1],$=n.useRef(null),ee=n.useRef(null),te=n.useRef(null),ne=n.useRef(null);n.useEffect(function(){var e=$.current;e&&(K?(e.showModal(),requestAnimationFrame(function(){if(ne.current){var e=ne.current.getBoundingClientRect().width;G(e),b(h),F(h),P(!1),Z(!1)}})):(e.close(),b(h),F(h),P(!1),Z(!1),null==k||k()))},[K]),n.useEffect(function(){var e=ne.current;if(e&&K){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){G(n.contentRect.width)})});return n.observe(e),function(){cancelAnimationFrame(t),n.disconnect()}}},[K]),n.useEffect(function(){var e=ee.current;if(e){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){X(n.contentRect.width)})});return n.observe(e),X(e.getBoundingClientRect().width),function(){cancelAnimationFrame(t),n.disconnect()}}},[]);var ae=W>0&&W<500,ie=function(e){e.preventDefault(),R(!0)};n.useEffect(function(){var e=function(e){if(y)if(ae&&te.current){var t=te.current.getBoundingClientRect(),n=t.height,a=e.clientY-t.top;if(a>=g&&n-a-4>=C)F(a/n*100)}else if(!ae){var i=K?ne.current:ee.current;if(!i)return;var s=i.getBoundingClientRect(),l=s.width,o=e.clientX-s.left;if(o>=g&&l-o-4>=C)b(o/l*100),null==L||L(o)}},t=function(){R(!1)};return y&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[y,ae,K,g,C,L]);var se,le=function(){O?(b(50),F(50),P(!1)):P(!0)},oe=function(){T?(b(50),F(50),Z(!1)):Z(!0)},ce=K?Y:W,re=V/100*ce,de=ce-re-4,ue=K?500:250;se=ae?T?{flex:1}:{height:"".concat(S,"%")}:T?{flex:1}:{width:"".concat(V,"%")};var fe,he=!ae&&!O&&re<=Math.max(g+10,ue),xe=!ae&&!T&&de<=Math.max(C+10,ue),ge=function(e){return e>=80?i.default.confidenceScoreHigh:e>=60?i.default.confidenceScoreMedium:i.default.confidenceScoreLow},ve="number"==typeof j?"".concat(j,"px"):j,Ce="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:ee,className:"".concat(i.default.container," ").concat(ae?i.default.containerVertical:i.default.containerHorizontal," ").concat(_),style:{height:ae?"auto":ve,width:Ce}},{children:[H&&t.jsxs("div",e.__assign({className:i.default.header},{children:[t.jsxs("div",e.__assign({className:i.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:i.default.headerIcon}),t.jsx("div",e.__assign({className:i.default.headerTitle},{children:H.title&&t.jsx("span",e.__assign({className:i.default.headerTitleText},{children:H.title}))}))]})),t.jsxs("div",e.__assign({className:i.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(i.default.confidenceScore," ").concat(ge(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(o,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:i.default.fullscreenButton,onClick:function(){return Q(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),(fe=!1,t.jsxs("div",e.__assign({ref:fe?void 0:te,className:"".concat(i.default.contentArea," ").concat(ae?i.default.contentAreaVertical:i.default.contentAreaHorizontal)},{children:[!O&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ae?i.default.panelVertical:""),style:e.__assign(e.__assign({},se),ae?{height:ve}:{})},{children:d})),O&&t.jsx("button",e.__assign({onClick:le,className:"".concat(i.default.expandButton," ").concat(ae?i.default.expandButtonVertical:i.default.expandButtonHorizontal),title:ae?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:ae?t.jsx(a.ChevronDown,{size:14}):t.jsx(s,{})})),!O&&!T&&t.jsxs("div",e.__assign({onMouseDown:ie,className:"".concat(i.default.divider," ").concat(ae?i.default.dividerVertical:i.default.dividerHorizontal," ").concat(y?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(ae?i.default.dividerHitAreaVertical:i.default.dividerHitAreaHorizontal)}),he&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),le()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),xe&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),oe()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!T&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ae?i.default.panelVertical:""),style:e.__assign({flex:1},ae?{height:ve}:{})},{children:u})),T&&t.jsx("button",e.__assign({onClick:oe,className:"".concat(i.default.expandButton," ").concat(ae?i.default.expandButtonBottomVertical:i.default.expandButtonRightHorizontal),title:ae?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:ae?t.jsx(a.ChevronUp,{size:14}):t.jsx(l,{})})),y&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(ae?i.default.dragOverlayVertical:i.default.dragOverlayHorizontal)})]})))]})),t.jsx("dialog",e.__assign({ref:$,className:i.default.dialogOverlay,onClose:function(){return Q(!1)}},{children:t.jsxs("div",e.__assign({ref:ne,className:i.default.dialogContent},{children:[H&&t.jsxs("div",e.__assign({className:i.default.header},{children:[t.jsxs("div",e.__assign({className:i.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:i.default.headerIcon}),t.jsx("div",e.__assign({className:i.default.headerTitle},{children:H.title&&t.jsx(t.Fragment,{children:t.jsx("span",e.__assign({className:i.default.headerTitleText},{children:H.title}))})}))]})),t.jsxs("div",e.__assign({className:i.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(i.default.confidenceScore," ").concat(ge(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(o,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:i.default.fullscreenButton,onClick:function(){return Q(!1)},title:"Close fullscreen"},{children:t.jsx(a.X,{size:20,color:"#5928ed"})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(i.default.contentArea," ").concat(i.default.contentAreaHorizontal," ").concat(i.default.dialogContentArea)},{children:[!O&&t.jsx("div",e.__assign({className:i.default.panel,style:se},{children:d})),O&&t.jsx("button",e.__assign({onClick:le,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(s,{})})),!O&&!T&&t.jsxs("div",e.__assign({onMouseDown:ie,className:"".concat(i.default.divider," ").concat(i.default.dividerHorizontal," ").concat(y?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(i.default.dividerHitAreaHorizontal)}),he&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),le()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),xe&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),oe()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!T&&t.jsx("div",e.__assign({className:i.default.panel,style:{flex:1}},{children:u})),T&&t.jsx("button",e.__assign({onClick:oe,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(l,{})})),y&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(i.default.dragOverlayHorizontal)})]}))]}))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),a=require("lucide-react"),s=require("./Splitter.module.css.js"),i=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},o=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},l=function(){return t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[t.jsx("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),t.jsx("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},c=function(){return t.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:t.jsx("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))};exports.default=function(d){var r=d.left,u=d.right,f=d.defaultLeftWidth,h=void 0===f?50:f,x=d.minLeftWidth,g=void 0===x?250:x,v=d.minRightWidth,C=void 0===v?250:v,p=d.className,_=void 0===p?"":p,m=d.height,j=void 0===m?"400px":m,w=d.width,N=void 0===w?"100%":w,H=d.header,L=d.onLeftWidthChange,k=d.openInFullscreen,M=void 0!==k&&k,A=d.onFullscreenClose,B=n.useState(h),b=B[0],F=B[1],S=n.useState(!1),E=S[0],z=S[1],y=n.useState(!1),R=y[0],V=y[1],D=n.useState(!1),O=D[0],P=D[1],q=n.useState(0),T=q[0],Z=q[1],I=n.useState(0),W=I[0],X=I[1],G=n.useState(M),J=G[0],K=G[1],Q=n.useRef(null),U=n.useRef(null),Y=n.useRef(null);n.useEffect(function(){var e=Q.current;e&&(J?(e.showModal(),requestAnimationFrame(function(){if(Y.current){var e=Y.current.getBoundingClientRect().width;X(e),F(h),V(!1),P(!1)}})):(e.close(),F(h),V(!1),P(!1),null==A||A()))},[J]),n.useEffect(function(){var e=Y.current;if(e&&J){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){X(n.contentRect.width)})});return n.observe(e),function(){cancelAnimationFrame(t),n.disconnect()}}},[J]),n.useEffect(function(){var e=U.current;if(e){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){Z(n.contentRect.width)})});return n.observe(e),Z(e.getBoundingClientRect().width),function(){cancelAnimationFrame(t),n.disconnect()}}},[]);var $=function(e){e.preventDefault(),z(!0)};n.useEffect(function(){var e=function(e){if(E){var t=J?Y.current:U.current;if(t){var n=t.getBoundingClientRect(),a=n.width,s=e.clientX-n.left;if(s>=g&&a-s-4>=C)F(s/a*100),null==L||L(s)}}},t=function(){z(!1)};return E&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[E,J,g,C,L]);var ee=function(){R?(F(50),V(!1)):V(!0)},te=function(){O?(F(50),P(!1)):P(!0)},ne=J?W:T,ae=b/100*ne,se=ne-ae-4,ie=J?500:250,oe=O?{flex:1}:{width:"".concat(b,"%")},le=!R&&ae<=Math.max(g+10,ie),ce=!O&&se<=Math.max(C+10,ie),de=function(e){return e>=80?s.default.confidenceScoreHigh:e>=60?s.default.confidenceScoreMedium:s.default.confidenceScoreLow},re="number"==typeof j?"".concat(j,"px"):j,ue="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:U,className:"".concat(s.default.container," ").concat(s.default.containerHorizontal," ").concat(_),style:{height:re,width:ue}},{children:[H&&t.jsxs("div",e.__assign({className:s.default.header},{children:[t.jsxs("div",e.__assign({className:s.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:s.default.headerIcon}),t.jsx("div",e.__assign({className:s.default.headerTitle},{children:H.title&&t.jsx("span",e.__assign({className:s.default.headerTitleText},{children:H.title}))}))]})),t.jsxs("div",e.__assign({className:s.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(s.default.confidenceScore," ").concat(de(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(l,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:s.default.fullscreenButton,onClick:function(){return K(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(s.default.contentArea," ").concat(s.default.contentAreaHorizontal)},{children:[!R&&t.jsx("div",e.__assign({className:s.default.panel,style:oe},{children:r})),R&&t.jsx("button",e.__assign({onClick:ee,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(i,{})})),!R&&!O&&t.jsxs("div",e.__assign({onMouseDown:$,className:"".concat(s.default.divider," ").concat(s.default.dividerHorizontal," ").concat(E?s.default.dividerDragging:s.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(s.default.dividerHitArea," ").concat(s.default.dividerHitAreaHorizontal)}),le&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ee()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(o,{})})),ce&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),te()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(i,{})}))]})),!O&&t.jsx("div",e.__assign({className:s.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:te,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(o,{})})),E&&t.jsx("div",{className:"".concat(s.default.dragOverlay," ").concat(s.default.dragOverlayHorizontal)})]}))]})),t.jsx("dialog",e.__assign({ref:Q,className:s.default.dialogOverlay,onClose:function(){return K(!1)}},{children:t.jsxs("div",e.__assign({ref:Y,className:s.default.dialogContent},{children:[H&&t.jsxs("div",e.__assign({className:s.default.header},{children:[t.jsxs("div",e.__assign({className:s.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:s.default.headerIcon}),t.jsx("div",e.__assign({className:s.default.headerTitle},{children:H.title&&t.jsx(t.Fragment,{children:t.jsx("span",e.__assign({className:s.default.headerTitleText},{children:H.title}))})}))]})),t.jsxs("div",e.__assign({className:s.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(s.default.confidenceScore," ").concat(de(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(l,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:s.default.fullscreenButton,onClick:function(){return K(!1)},title:"Close fullscreen"},{children:t.jsx(a.X,{size:20,color:"#5928ed"})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(s.default.contentArea," ").concat(s.default.contentAreaHorizontal," ").concat(s.default.dialogContentArea)},{children:[!R&&t.jsx("div",e.__assign({className:s.default.panel,style:oe},{children:r})),R&&t.jsx("button",e.__assign({onClick:ee,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(i,{})})),!R&&!O&&t.jsxs("div",e.__assign({onMouseDown:$,className:"".concat(s.default.divider," ").concat(s.default.dividerHorizontal," ").concat(E?s.default.dividerDragging:s.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(s.default.dividerHitArea," ").concat(s.default.dividerHitAreaHorizontal)}),le&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ee()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(o,{})})),ce&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),te()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(i,{})}))]})),!O&&t.jsx("div",e.__assign({className:s.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:te,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(o,{})})),E&&t.jsx("div",{className:"".concat(s.default.dragOverlay," ").concat(s.default.dragOverlayHorizontal)})]}))]}))}))]})};
2
2
  //# sourceMappingURL=SplitterCitationsComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as o,useRef as c,useEffect as a}from"react";import{FileText as r,X as l,ChevronDown as d,ChevronUp as s}from"lucide-react";import u from"./Splitter.module.css.js";var h=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),i("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},v=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),i("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},f=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[i("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),i("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},p=function(){return i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:i("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))},C=function(C){var m=C.left,g=C.right,w=C.defaultLeftWidth,x=void 0===w?50:w,N=C.minLeftWidth,H=void 0===N?250:N,L=C.minRightWidth,B=void 0===L?250:L,A=C.className,k=void 0===A?"":A,M=C.height,V=void 0===M?"400px":M,b=C.width,z=void 0===b?"100%":b,E=C.header,y=C.onLeftWidthChange,F=C.openInFullscreen,S=void 0!==F&&F,D=C.onFullscreenClose,R=o(x),O=R[0],P=R[1],Z=o(x),I=Z[0],T=Z[1],W=o(!1),j=W[0],q=W[1],X=o(!1),Y=X[0],G=X[1],J=o(!1),K=J[0],Q=J[1],U=o(0),$=U[0],_=U[1],ee=o(0),ne=ee[0],te=ee[1],ie=o(S),oe=ie[0],ce=ie[1],ae=c(null),re=c(null),le=c(null),de=c(null);a(function(){var e=ae.current;e&&(oe?(e.showModal(),requestAnimationFrame(function(){if(de.current){var e=de.current.getBoundingClientRect().width;te(e),P(x),T(x),G(!1),Q(!1)}})):(e.close(),P(x),T(x),G(!1),Q(!1),null==D||D()))},[oe]),a(function(){var e=de.current;if(e&&oe){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){te(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[oe]),a(function(){var e=re.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){_(t.contentRect.width)})});return t.observe(e),_(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var se=$>0&&$<500,ue=function(e){e.preventDefault(),q(!0)};a(function(){var e=function(e){if(j)if(se&&le.current){var n=le.current.getBoundingClientRect(),t=n.height,i=e.clientY-n.top;if(i>=H&&t-i-4>=B)T(i/t*100)}else if(!se){var o=oe?de.current:re.current;if(!o)return;var c=o.getBoundingClientRect(),a=c.width,r=e.clientX-c.left;if(r>=H&&a-r-4>=B)P(r/a*100),null==y||y(r)}},n=function(){q(!1)};return j&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[j,se,oe,H,B,y]);var he,ve=function(){Y?(P(50),T(50),G(!1)):G(!0)},fe=function(){K?(P(50),T(50),Q(!1)):Q(!0)},pe=oe?ne:$,Ce=O/100*pe,me=pe-Ce-4,ge=oe?500:250;he=se?K?{flex:1}:{height:"".concat(I,"%")}:K?{flex:1}:{width:"".concat(O,"%")};var we,xe=!se&&!Y&&Ce<=Math.max(H+10,ge),Ne=!se&&!K&&me<=Math.max(B+10,ge),He=function(e){return e>=80?u.confidenceScoreHigh:e>=60?u.confidenceScoreMedium:u.confidenceScoreLow},Le="number"==typeof V?"".concat(V,"px"):V,Be="number"==typeof z?"".concat(z,"px"):z;return n(t,{children:[n("div",e({ref:re,className:"".concat(u.container," ").concat(se?u.containerVertical:u.containerHorizontal," ").concat(k),style:{height:se?"auto":Le,width:Be}},{children:[E&&n("div",e({className:u.header},{children:[n("div",e({className:u.headerLeft},{children:[E.showDocIcon&&i(r,{className:u.headerIcon}),i("div",e({className:u.headerTitle},{children:E.title&&i("span",e({className:u.headerTitleText},{children:E.title}))}))]})),n("div",e({className:u.headerActions},{children:[void 0!==E.confidenceScore&&n("div",e({className:"".concat(u.confidenceScore," ").concat(He(E.confidenceScore))},{children:[i("div",e({style:{width:"16px",height:"16px"}},{children:i(f,{})})),n("div",{children:[Math.round(E.confidenceScore),"%"]})]})),i("button",e({className:u.fullscreenButton,onClick:function(){return ce(!0)},title:"Open fullscreen"},{children:i(p,{})}))]}))]})),(we=!1,n("div",e({ref:we?void 0:le,className:"".concat(u.contentArea," ").concat(se?u.contentAreaVertical:u.contentAreaHorizontal)},{children:[!Y&&i("div",e({className:"".concat(u.panel," ").concat(se?u.panelVertical:""),style:e(e({},he),se?{height:Le}:{})},{children:m})),Y&&i("button",e({onClick:ve,className:"".concat(u.expandButton," ").concat(se?u.expandButtonVertical:u.expandButtonHorizontal),title:se?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:se?i(d,{size:14}):i(h,{})})),!Y&&!K&&n("div",e({onMouseDown:ue,className:"".concat(u.divider," ").concat(se?u.dividerVertical:u.dividerHorizontal," ").concat(j?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(se?u.dividerHitAreaVertical:u.dividerHitAreaHorizontal)}),xe&&i("button",e({onClick:function(e){e.stopPropagation(),ve()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),Ne&&i("button",e({onClick:function(e){e.stopPropagation(),fe()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!K&&i("div",e({className:"".concat(u.panel," ").concat(se?u.panelVertical:""),style:e({flex:1},se?{height:Le}:{})},{children:g})),K&&i("button",e({onClick:fe,className:"".concat(u.expandButton," ").concat(se?u.expandButtonBottomVertical:u.expandButtonRightHorizontal),title:se?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:se?i(s,{size:14}):i(v,{})})),j&&i("div",{className:"".concat(u.dragOverlay," ").concat(se?u.dragOverlayVertical:u.dragOverlayHorizontal)})]})))]})),i("dialog",e({ref:ae,className:u.dialogOverlay,onClose:function(){return ce(!1)}},{children:n("div",e({ref:de,className:u.dialogContent},{children:[E&&n("div",e({className:u.header},{children:[n("div",e({className:u.headerLeft},{children:[E.showDocIcon&&i(r,{className:u.headerIcon}),i("div",e({className:u.headerTitle},{children:E.title&&i(t,{children:i("span",e({className:u.headerTitleText},{children:E.title}))})}))]})),n("div",e({className:u.headerActions},{children:[void 0!==E.confidenceScore&&n("div",e({className:"".concat(u.confidenceScore," ").concat(He(E.confidenceScore))},{children:[i("div",e({style:{width:"16px",height:"16px"}},{children:i(f,{})})),n("div",{children:[Math.round(E.confidenceScore),"%"]})]})),i("button",e({className:u.fullscreenButton,onClick:function(){return ce(!1)},title:"Close fullscreen"},{children:i(l,{size:20,color:"#5928ed"})}))]}))]})),n("div",e({className:"".concat(u.contentArea," ").concat(u.contentAreaHorizontal," ").concat(u.dialogContentArea)},{children:[!Y&&i("div",e({className:u.panel,style:he},{children:m})),Y&&i("button",e({onClick:ve,className:"".concat(u.expandButton," ").concat(u.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:i(h,{})})),!Y&&!K&&n("div",e({onMouseDown:ue,className:"".concat(u.divider," ").concat(u.dividerHorizontal," ").concat(j?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(u.dividerHitAreaHorizontal)}),xe&&i("button",e({onClick:function(e){e.stopPropagation(),ve()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),Ne&&i("button",e({onClick:function(e){e.stopPropagation(),fe()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!K&&i("div",e({className:u.panel,style:{flex:1}},{children:g})),K&&i("button",e({onClick:fe,className:"".concat(u.expandButton," ").concat(u.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:i(v,{})})),j&&i("div",{className:"".concat(u.dragOverlay," ").concat(u.dragOverlayHorizontal)})]}))]}))}))]})};export{C as default};
1
+ import{__assign as e}from"tslib";import{jsxs as n,Fragment as t,jsx as o}from"react/jsx-runtime";import{useState as i,useRef as c,useEffect as a}from"react";import{FileText as r,X as l}from"lucide-react";import d from"./Splitter.module.css.js";var s=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},u=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[o("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),o("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},v=function(){return o("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:o("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))},C=function(C){var f=C.left,m=C.right,p=C.defaultLeftWidth,g=void 0===p?50:p,w=C.minLeftWidth,N=void 0===w?250:w,x=C.minRightWidth,H=void 0===x?250:x,L=C.className,k=void 0===L?"":L,A=C.height,M=void 0===A?"400px":A,B=C.width,b=void 0===B?"100%":B,z=C.header,F=C.onLeftWidthChange,y=C.openInFullscreen,E=void 0!==y&&y,S=C.onFullscreenClose,V=i(g),D=V[0],R=V[1],O=i(!1),P=O[0],Z=O[1],I=i(!1),T=I[0],W=I[1],j=i(!1),q=j[0],X=j[1],G=i(0),J=G[0],K=G[1],Q=i(0),U=Q[0],Y=Q[1],$=i(E),_=$[0],ee=$[1],ne=c(null),te=c(null),oe=c(null);a(function(){var e=ne.current;e&&(_?(e.showModal(),requestAnimationFrame(function(){if(oe.current){var e=oe.current.getBoundingClientRect().width;Y(e),R(g),W(!1),X(!1)}})):(e.close(),R(g),W(!1),X(!1),null==S||S()))},[_]),a(function(){var e=oe.current;if(e&&_){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){Y(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[_]),a(function(){var e=te.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){K(t.contentRect.width)})});return t.observe(e),K(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var ie=function(e){e.preventDefault(),Z(!0)};a(function(){var e=function(e){if(P){var n=_?oe.current:te.current;if(n){var t=n.getBoundingClientRect(),o=t.width,i=e.clientX-t.left;if(i>=N&&o-i-4>=H)R(i/o*100),null==F||F(i)}}},n=function(){Z(!1)};return P&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[P,_,N,H,F]);var ce=function(){T?(R(50),W(!1)):W(!0)},ae=function(){q?(R(50),X(!1)):X(!0)},re=_?U:J,le=D/100*re,de=re-le-4,se=_?500:250,ue=q?{flex:1}:{width:"".concat(D,"%")},he=!T&&le<=Math.max(N+10,se),ve=!q&&de<=Math.max(H+10,se),Ce=function(e){return e>=80?d.confidenceScoreHigh:e>=60?d.confidenceScoreMedium:d.confidenceScoreLow},fe="number"==typeof M?"".concat(M,"px"):M,me="number"==typeof b?"".concat(b,"px"):b;return n(t,{children:[n("div",e({ref:te,className:"".concat(d.container," ").concat(d.containerHorizontal," ").concat(k),style:{height:fe,width:me}},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o("span",e({className:d.headerTitleText},{children:z.title}))}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!0)},title:"Open fullscreen"},{children:o(v,{})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]})),o("dialog",e({ref:ne,className:d.dialogOverlay,onClose:function(){return ee(!1)}},{children:n("div",e({ref:oe,className:d.dialogContent},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o(t,{children:o("span",e({className:d.headerTitleText},{children:z.title}))})}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!1)},title:"Close fullscreen"},{children:o(l,{size:20,color:"#5928ed"})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal," ").concat(d.dialogContentArea)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]}))}))]})};export{C as default};
2
2
  //# sourceMappingURL=SplitterCitationsComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplitterCitationsComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/SplitterCitations/SplitterCitationsComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwbxD,CAAC;AACF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"SplitterCitationsComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/SplitterCitations/SplitterCitationsComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0YxD,CAAC;AACF,eAAe,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/citation",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",