@e-llm-studio/citation 0.0.177 → 0.0.178

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=n.useState(h),A=B[0],M=B[1],k=n.useState(h),V=k[0],b=k[1],E=n.useState(!1),S=E[0],z=E[1],F=n.useState(!1),y=F[0],R=F[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],U=n.useState(!1),Y=U[0],G=U[1],J=n.useRef(null),K=n.useRef(null),Q=n.useRef(null),$=n.useRef(null);n.useEffect(function(){var e=J.current;e&&(Y?(e.showModal(),requestAnimationFrame(function(){if($.current){var e=$.current.getBoundingClientRect().width;if(X(e),e>0){var t=Math.min(800/e*100,75);M(t)}}})):e.close())},[Y]),n.useEffect(function(){var e=$.current;if(e&&Y){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()}}},[Y]),n.useEffect(function(){var e=K.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 ee=T>0&&T<500,te=function(e){e.preventDefault(),z(!0)};n.useEffect(function(){var e=function(e){if(S)if(ee&&Q.current){var t=Q.current.getBoundingClientRect(),n=t.height,a=e.clientY-t.top;if(a>=g&&n-a-4>=C)b(a/n*100)}else if(!ee){var i=Y?$.current:K.current;if(!i)return;var s=i.getBoundingClientRect(),l=s.width,o=e.clientX-s.left;if(o>=g&&l-o-4>=C)M(o/l*100),null==L||L(o)}},t=function(){z(!1)};return S&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[S,ee,Y,g,C,L]);var ne,ae=function(){y?(M(50),b(50),R(!1)):R(!0)},ie=function(){O?(M(50),b(50),P(!1)):P(!0)},se=Y?W:T,le=A/100*se,oe=se-le-4,ce=Y?500:250;ne=ee?O?{flex:1}:{height:"".concat(V,"%")}:O?{flex:1}:{width:"".concat(A,"%")};var re,de=!ee&&!y&&le<=Math.max(g+10,ce),ue=!ee&&!O&&oe<=Math.max(C+10,ce),fe=function(e){return e>=80?i.default.confidenceScoreHigh:e>=60?i.default.confidenceScoreMedium:i.default.confidenceScoreLow},he="number"==typeof j?"".concat(j,"px"):j,xe="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:K,className:"".concat(i.default.container," ").concat(ee?i.default.containerVertical:i.default.containerHorizontal," ").concat(_),style:{height:ee?"auto":he,width:xe}},{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(fe(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 G(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),(re=!1,t.jsxs("div",e.__assign({ref:re?void 0:Q,className:"".concat(i.default.contentArea," ").concat(ee?i.default.contentAreaVertical:i.default.contentAreaHorizontal)},{children:[!y&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ee?i.default.panelVertical:""),style:e.__assign(e.__assign({},ne),ee?{height:he}:{})},{children:d})),y&&t.jsx("button",e.__assign({onClick:ae,className:"".concat(i.default.expandButton," ").concat(ee?i.default.expandButtonVertical:i.default.expandButtonHorizontal),title:ee?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:ee?t.jsx(a.ChevronDown,{size:14}):t.jsx(s,{})})),!y&&!O&&t.jsxs("div",e.__assign({onMouseDown:te,className:"".concat(i.default.divider," ").concat(ee?i.default.dividerVertical:i.default.dividerHorizontal," ").concat(S?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(ee?i.default.dividerHitAreaVertical:i.default.dividerHitAreaHorizontal)}),de&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),ue&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ie()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!O&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ee?i.default.panelVertical:""),style:e.__assign({flex:1},ee?{height:he}:{})},{children:u})),O&&t.jsx("button",e.__assign({onClick:ie,className:"".concat(i.default.expandButton," ").concat(ee?i.default.expandButtonBottomVertical:i.default.expandButtonRightHorizontal),title:ee?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:ee?t.jsx(a.ChevronUp,{size:14}):t.jsx(l,{})})),S&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(ee?i.default.dragOverlayVertical:i.default.dragOverlayHorizontal)})]})))]})),t.jsx("dialog",e.__assign({ref:J,className:i.default.dialogOverlay,onClose:function(){return G(!1)}},{children:t.jsxs("div",e.__assign({ref:$,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(fe(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 G(!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:[!y&&t.jsx("div",e.__assign({className:i.default.panel,style:ne},{children:d})),y&&t.jsx("button",e.__assign({onClick:ae,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(s,{})})),!y&&!O&&t.jsxs("div",e.__assign({onMouseDown:te,className:"".concat(i.default.divider," ").concat(i.default.dividerHorizontal," ").concat(S?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(i.default.dividerHitAreaHorizontal)}),de&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),ue&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ie()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!O&&t.jsx("div",e.__assign({className:i.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:ie,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(l,{})})),S&&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"),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=n.useState(h),A=B[0],k=B[1],M=n.useState(h),V=M[0],b=M[1],E=n.useState(!1),S=E[0],z=E[1],F=n.useState(!1),y=F[0],R=F[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],U=n.useState(!1),Y=U[0],G=U[1],J=n.useRef(null),K=n.useRef(null),Q=n.useRef(null),$=n.useRef(null);n.useEffect(function(){var e=J.current;e&&(Y?(e.showModal(),requestAnimationFrame(function(){if($.current){var e=$.current.getBoundingClientRect().width;X(e),k(h),b(h),R(!1),P(!1)}})):(e.close(),k(h),b(h),R(!1),P(!1)))},[Y]),n.useEffect(function(){var e=$.current;if(e&&Y){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()}}},[Y]),n.useEffect(function(){var e=K.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 ee=T>0&&T<500,te=function(e){e.preventDefault(),z(!0)};n.useEffect(function(){var e=function(e){if(S)if(ee&&Q.current){var t=Q.current.getBoundingClientRect(),n=t.height,a=e.clientY-t.top;if(a>=g&&n-a-4>=C)b(a/n*100)}else if(!ee){var i=Y?$.current:K.current;if(!i)return;var s=i.getBoundingClientRect(),l=s.width,o=e.clientX-s.left;if(o>=g&&l-o-4>=C)k(o/l*100),null==L||L(o)}},t=function(){z(!1)};return S&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[S,ee,Y,g,C,L]);var ne,ae=function(){y?(k(50),b(50),R(!1)):R(!0)},ie=function(){O?(k(50),b(50),P(!1)):P(!0)},se=Y?W:T,le=A/100*se,oe=se-le-4,ce=Y?500:250;ne=ee?O?{flex:1}:{height:"".concat(V,"%")}:O?{flex:1}:{width:"".concat(A,"%")};var re,de=!ee&&!y&&le<=Math.max(g+10,ce),ue=!ee&&!O&&oe<=Math.max(C+10,ce),fe=function(e){return e>=80?i.default.confidenceScoreHigh:e>=60?i.default.confidenceScoreMedium:i.default.confidenceScoreLow},he="number"==typeof j?"".concat(j,"px"):j,xe="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:K,className:"".concat(i.default.container," ").concat(ee?i.default.containerVertical:i.default.containerHorizontal," ").concat(_),style:{height:ee?"auto":he,width:xe}},{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(fe(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 G(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),(re=!1,t.jsxs("div",e.__assign({ref:re?void 0:Q,className:"".concat(i.default.contentArea," ").concat(ee?i.default.contentAreaVertical:i.default.contentAreaHorizontal)},{children:[!y&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ee?i.default.panelVertical:""),style:e.__assign(e.__assign({},ne),ee?{height:he}:{})},{children:d})),y&&t.jsx("button",e.__assign({onClick:ae,className:"".concat(i.default.expandButton," ").concat(ee?i.default.expandButtonVertical:i.default.expandButtonHorizontal),title:ee?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:ee?t.jsx(a.ChevronDown,{size:14}):t.jsx(s,{})})),!y&&!O&&t.jsxs("div",e.__assign({onMouseDown:te,className:"".concat(i.default.divider," ").concat(ee?i.default.dividerVertical:i.default.dividerHorizontal," ").concat(S?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(ee?i.default.dividerHitAreaVertical:i.default.dividerHitAreaHorizontal)}),de&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),ue&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ie()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!O&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ee?i.default.panelVertical:""),style:e.__assign({flex:1},ee?{height:he}:{})},{children:u})),O&&t.jsx("button",e.__assign({onClick:ie,className:"".concat(i.default.expandButton," ").concat(ee?i.default.expandButtonBottomVertical:i.default.expandButtonRightHorizontal),title:ee?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:ee?t.jsx(a.ChevronUp,{size:14}):t.jsx(l,{})})),S&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(ee?i.default.dragOverlayVertical:i.default.dragOverlayHorizontal)})]})))]})),t.jsx("dialog",e.__assign({ref:J,className:i.default.dialogOverlay,onClose:function(){return G(!1)}},{children:t.jsxs("div",e.__assign({ref:$,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(fe(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 G(!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:[!y&&t.jsx("div",e.__assign({className:i.default.panel,style:ne},{children:d})),y&&t.jsx("button",e.__assign({onClick:ae,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(s,{})})),!y&&!O&&t.jsxs("div",e.__assign({onMouseDown:te,className:"".concat(i.default.divider," ").concat(i.default.dividerHorizontal," ").concat(S?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(i.default.dividerHitAreaHorizontal)}),de&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),ue&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ie()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!O&&t.jsx("div",e.__assign({className:i.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:ie,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(l,{})})),S&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(i.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=o(x),S=F[0],D=F[1],R=o(x),O=R[0],P=R[1],Z=o(!1),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(0),K=J[0],Q=J[1],U=o(0),$=U[0],_=U[1],ee=o(!1),ne=ee[0],te=ee[1],ie=c(null),oe=c(null),ce=c(null),ae=c(null);a(function(){var e=ie.current;e&&(ne?(e.showModal(),requestAnimationFrame(function(){if(ae.current){var e=ae.current.getBoundingClientRect().width;if(_(e),e>0){var n=Math.min(800/e*100,75);D(n)}}})):e.close())},[ne]),a(function(){var e=ae.current;if(e&&ne){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){_(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[ne]),a(function(){var e=oe.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){Q(t.contentRect.width)})});return t.observe(e),Q(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var re=K>0&&K<500,le=function(e){e.preventDefault(),T(!0)};a(function(){var e=function(e){if(I)if(re&&ce.current){var n=ce.current.getBoundingClientRect(),t=n.height,i=e.clientY-n.top;if(i>=H&&t-i-4>=B)P(i/t*100)}else if(!re){var o=ne?ae.current:oe.current;if(!o)return;var c=o.getBoundingClientRect(),a=c.width,r=e.clientX-c.left;if(r>=H&&a-r-4>=B)D(r/a*100),null==y||y(r)}},n=function(){T(!1)};return I&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[I,re,ne,H,B,y]);var de,se=function(){j?(D(50),P(50),q(!1)):q(!0)},ue=function(){Y?(D(50),P(50),G(!1)):G(!0)},he=ne?$:K,ve=S/100*he,fe=he-ve-4,pe=ne?500:250;de=re?Y?{flex:1}:{height:"".concat(O,"%")}:Y?{flex:1}:{width:"".concat(S,"%")};var Ce,me=!re&&!j&&ve<=Math.max(H+10,pe),ge=!re&&!Y&&fe<=Math.max(B+10,pe),we=function(e){return e>=80?u.confidenceScoreHigh:e>=60?u.confidenceScoreMedium:u.confidenceScoreLow},xe="number"==typeof V?"".concat(V,"px"):V,Ne="number"==typeof z?"".concat(z,"px"):z;return n(t,{children:[n("div",e({ref:oe,className:"".concat(u.container," ").concat(re?u.containerVertical:u.containerHorizontal," ").concat(k),style:{height:re?"auto":xe,width:Ne}},{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(we(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 te(!0)},title:"Open fullscreen"},{children:i(p,{})}))]}))]})),(Ce=!1,n("div",e({ref:Ce?void 0:ce,className:"".concat(u.contentArea," ").concat(re?u.contentAreaVertical:u.contentAreaHorizontal)},{children:[!j&&i("div",e({className:"".concat(u.panel," ").concat(re?u.panelVertical:""),style:e(e({},de),re?{height:xe}:{})},{children:m})),j&&i("button",e({onClick:se,className:"".concat(u.expandButton," ").concat(re?u.expandButtonVertical:u.expandButtonHorizontal),title:re?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:re?i(d,{size:14}):i(h,{})})),!j&&!Y&&n("div",e({onMouseDown:le,className:"".concat(u.divider," ").concat(re?u.dividerVertical:u.dividerHorizontal," ").concat(I?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(re?u.dividerHitAreaVertical:u.dividerHitAreaHorizontal)}),me&&i("button",e({onClick:function(e){e.stopPropagation(),se()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),ge&&i("button",e({onClick:function(e){e.stopPropagation(),ue()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!Y&&i("div",e({className:"".concat(u.panel," ").concat(re?u.panelVertical:""),style:e({flex:1},re?{height:xe}:{})},{children:g})),Y&&i("button",e({onClick:ue,className:"".concat(u.expandButton," ").concat(re?u.expandButtonBottomVertical:u.expandButtonRightHorizontal),title:re?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:re?i(s,{size:14}):i(v,{})})),I&&i("div",{className:"".concat(u.dragOverlay," ").concat(re?u.dragOverlayVertical:u.dragOverlayHorizontal)})]})))]})),i("dialog",e({ref:ie,className:u.dialogOverlay,onClose:function(){return te(!1)}},{children:n("div",e({ref:ae,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(we(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 te(!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:[!j&&i("div",e({className:u.panel,style:de},{children:m})),j&&i("button",e({onClick:se,className:"".concat(u.expandButton," ").concat(u.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:i(h,{})})),!j&&!Y&&n("div",e({onMouseDown:le,className:"".concat(u.divider," ").concat(u.dividerHorizontal," ").concat(I?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(u.dividerHitAreaHorizontal)}),me&&i("button",e({onClick:function(e){e.stopPropagation(),se()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),ge&&i("button",e({onClick:function(e){e.stopPropagation(),ue()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!Y&&i("div",e({className:u.panel,style:{flex:1}},{children:g})),Y&&i("button",e({onClick:ue,className:"".concat(u.expandButton," ").concat(u.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:i(v,{})})),I&&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 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=o(x),S=F[0],D=F[1],R=o(x),O=R[0],P=R[1],Z=o(!1),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(0),K=J[0],Q=J[1],U=o(0),$=U[0],_=U[1],ee=o(!1),ne=ee[0],te=ee[1],ie=c(null),oe=c(null),ce=c(null),ae=c(null);a(function(){var e=ie.current;e&&(ne?(e.showModal(),requestAnimationFrame(function(){if(ae.current){var e=ae.current.getBoundingClientRect().width;_(e),D(x),P(x),q(!1),G(!1)}})):(e.close(),D(x),P(x),q(!1),G(!1)))},[ne]),a(function(){var e=ae.current;if(e&&ne){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){_(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[ne]),a(function(){var e=oe.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){Q(t.contentRect.width)})});return t.observe(e),Q(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var re=K>0&&K<500,le=function(e){e.preventDefault(),T(!0)};a(function(){var e=function(e){if(I)if(re&&ce.current){var n=ce.current.getBoundingClientRect(),t=n.height,i=e.clientY-n.top;if(i>=H&&t-i-4>=B)P(i/t*100)}else if(!re){var o=ne?ae.current:oe.current;if(!o)return;var c=o.getBoundingClientRect(),a=c.width,r=e.clientX-c.left;if(r>=H&&a-r-4>=B)D(r/a*100),null==y||y(r)}},n=function(){T(!1)};return I&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[I,re,ne,H,B,y]);var de,se=function(){j?(D(50),P(50),q(!1)):q(!0)},ue=function(){Y?(D(50),P(50),G(!1)):G(!0)},he=ne?$:K,ve=S/100*he,fe=he-ve-4,pe=ne?500:250;de=re?Y?{flex:1}:{height:"".concat(O,"%")}:Y?{flex:1}:{width:"".concat(S,"%")};var Ce,me=!re&&!j&&ve<=Math.max(H+10,pe),ge=!re&&!Y&&fe<=Math.max(B+10,pe),we=function(e){return e>=80?u.confidenceScoreHigh:e>=60?u.confidenceScoreMedium:u.confidenceScoreLow},xe="number"==typeof V?"".concat(V,"px"):V,Ne="number"==typeof z?"".concat(z,"px"):z;return n(t,{children:[n("div",e({ref:oe,className:"".concat(u.container," ").concat(re?u.containerVertical:u.containerHorizontal," ").concat(k),style:{height:re?"auto":xe,width:Ne}},{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(we(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 te(!0)},title:"Open fullscreen"},{children:i(p,{})}))]}))]})),(Ce=!1,n("div",e({ref:Ce?void 0:ce,className:"".concat(u.contentArea," ").concat(re?u.contentAreaVertical:u.contentAreaHorizontal)},{children:[!j&&i("div",e({className:"".concat(u.panel," ").concat(re?u.panelVertical:""),style:e(e({},de),re?{height:xe}:{})},{children:m})),j&&i("button",e({onClick:se,className:"".concat(u.expandButton," ").concat(re?u.expandButtonVertical:u.expandButtonHorizontal),title:re?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:re?i(d,{size:14}):i(h,{})})),!j&&!Y&&n("div",e({onMouseDown:le,className:"".concat(u.divider," ").concat(re?u.dividerVertical:u.dividerHorizontal," ").concat(I?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(re?u.dividerHitAreaVertical:u.dividerHitAreaHorizontal)}),me&&i("button",e({onClick:function(e){e.stopPropagation(),se()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),ge&&i("button",e({onClick:function(e){e.stopPropagation(),ue()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!Y&&i("div",e({className:"".concat(u.panel," ").concat(re?u.panelVertical:""),style:e({flex:1},re?{height:xe}:{})},{children:g})),Y&&i("button",e({onClick:ue,className:"".concat(u.expandButton," ").concat(re?u.expandButtonBottomVertical:u.expandButtonRightHorizontal),title:re?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:re?i(s,{size:14}):i(v,{})})),I&&i("div",{className:"".concat(u.dragOverlay," ").concat(re?u.dragOverlayVertical:u.dragOverlayHorizontal)})]})))]})),i("dialog",e({ref:ie,className:u.dialogOverlay,onClose:function(){return te(!1)}},{children:n("div",e({ref:ae,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(we(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 te(!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:[!j&&i("div",e({className:u.panel,style:de},{children:m})),j&&i("button",e({onClick:se,className:"".concat(u.expandButton," ").concat(u.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:i(h,{})})),!j&&!Y&&n("div",e({onMouseDown:le,className:"".concat(u.divider," ").concat(u.dividerHorizontal," ").concat(I?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(u.dividerHitAreaHorizontal)}),me&&i("button",e({onClick:function(e){e.stopPropagation(),se()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),ge&&i("button",e({onClick:function(e){e.stopPropagation(),ue()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!Y&&i("div",e({className:u.panel,style:{flex:1}},{children:g})),Y&&i("button",e({onClick:ue,className:"".concat(u.expandButton," ").concat(u.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:i(v,{})})),I&&i("div",{className:"".concat(u.dragOverlay," ").concat(u.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;CAC7C;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAibxD,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;CAC7C;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqbxD,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.177",
3
+ "version": "0.0.178",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",