@e-llm-studio/citation 0.0.199 → 0.0.200

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"),i=require("lucide-react");exports.default=function(o){var r,s,a=o.children,l=o.uploadListTopContent,d=o.defaultHeight,u=void 0===d?300:d,c=o.minHeight,p=void 0===c?150:c,g=o.maxHeight,f=o.isExpanded,x=void 0!==f&&f,h=o.onToggle,m=o.onHeightChange,v=o.styles,y=void 0===v?{}:v,_=o.drawerSummaryComponent,b=o.totalCountsBadge,w=o.headerComponent,C=n.useState(!1),j=C[0],H=C[1],S=n.useState(u),R=S[0],E=S[1],k=n.useRef(0),B=n.useRef(u),D=n.useRef(null),I=n.useRef(0),L="string"==typeof g?parseFloat(g)/100*window.innerHeight:null!=g?g:.4*window.innerHeight;n.useEffect(function(){!x&&D.current&&(I.current=D.current.getBoundingClientRect().height)},[x]);return n.useEffect(function(){if(j){var e=function(e){e.preventDefault();var t=e.clientY-k.current,n=Math.max(p,Math.min(L,B.current+t));E(n),null==m||m(n)},t=function(){H(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[j]),t.jsxs("div",e.__assign({ref:D,style:{position:"relative",width:"100%",minHeight:x?I.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:x?"absolute":"relative",zIndex:x?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:x?"".concat(R,"px"):"auto",minHeight:x?"".concat(p,"px"):"auto",maxHeight:x?"".concat(R,"px"):"auto",overflow:"hidden",width:"100%"},y.container)},{children:[t.jsxs("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px",gap:"16px"},y.header)},{children:[t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},y.title)},{children:w||((null==l?void 0:l.trim())?l:"Data uploaded for your context")})),b]})),_,x&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},y.body)},{children:a})),x&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),H(!0),k.current=e.clientY,B.current=R,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:t.jsx("div",{style:e.__assign({width:48,height:4,borderRadius:4,background:j?null!==(r=y.dragPillActiveColor)&&void 0!==r?r:"#a78bfa":"#d1d5db"},y.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:x?"absolute":"relative",top:x?"".concat(R,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:x?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:h,"aria-label":x?"Collapse":"Expand",style:e.__assign({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},y.notch)},{children:t.jsx(i.ChevronDown,{size:14,color:null!==(s=y.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),o=require("lucide-react");exports.default=function(i){var r,s,a,l,d=i.children,u=i.uploadListTopContent,c=i.defaultHeight,p=void 0===c?300:c,g=i.minHeight,f=void 0===g?150:g,x=i.maxHeight,h=i.isExpanded,v=void 0!==h&&h,m=i.onToggle,b=i.onHeightChange,y=i.styles,_=void 0===y?{}:y,w=i.drawerSummaryComponent,C=i.totalCountsBadge,j=i.headerComponent,H=n.useState(!1),S=H[0],R=H[1],k=n.useState(p),E=k[0],B=k[1],D=n.useRef(0),I=n.useRef(p),L=n.useRef(null),z=n.useRef(0),q="string"==typeof x?parseFloat(x)/100*window.innerHeight:null!=x?x:.4*window.innerHeight;n.useEffect(function(){!v&&L.current&&(z.current=L.current.getBoundingClientRect().height)},[v]);return n.useEffect(function(){if(S){var e=function(e){e.preventDefault();var t=e.clientY-D.current,n=Math.max(f,Math.min(q,I.current+t));B(n),null==b||b(n)},t=function(){R(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[S]),t.jsxs("div",e.__assign({ref:L,style:{position:"relative",width:"100%",minHeight:v?z.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:v?"absolute":"relative",zIndex:v?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:v?"".concat(E,"px"):"auto",minHeight:v?"".concat(f,"px"):"auto",maxHeight:v?"".concat(E,"px"):"auto",overflow:"hidden",width:"100%"},_.container)},{children:[t.jsxs("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px",gap:"16px"},_.header)},{children:[t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},_.title)},{children:j||((null==u?void 0:u.trim())?u:"Data uploaded for your context")})),C]})),w,v&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px",paddingBottom:"36px"},_.body)},{children:d})),v&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),R(!0),D.current=e.clientY,I.current=E,document.body.style.userSelect="none"},style:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:null!==(s=null===(r=_.body)||void 0===r?void 0:r.backgroundColor)&&void 0!==s?s:"#fff",display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:t.jsx("div",{style:e.__assign({width:48,height:4,borderRadius:4,background:S?null!==(a=_.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},_.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:v?"absolute":"relative",top:v?"".concat(E,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:m,"aria-label":v?"Collapse":"Expand",style:e.__assign({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},_.notch)},{children:t.jsx(o.ChevronDown,{size:14,color:null!==(l=_.notchArrowColor)&&void 0!==l?l:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as r}from"react";import{ChevronDown as l}from"lucide-react";var d=function(d){var a,s,u=d.children,c=d.uploadListTopContent,p=d.defaultHeight,f=void 0===p?300:p,h=d.minHeight,m=void 0===h?150:h,x=d.maxHeight,g=d.isExpanded,v=void 0!==g&&g,y=d.onToggle,b=d.onHeightChange,w=d.styles,C=void 0===w?{}:w,H=d.drawerSummaryComponent,S=d.totalCountsBadge,k=d.headerComponent,B=n(!1),E=B[0],D=B[1],I=n(f),L=I[0],R=I[1],j=i(0),z=i(f),F=i(null),M=i(0),T="string"==typeof x?parseFloat(x)/100*window.innerHeight:null!=x?x:.4*window.innerHeight;r(function(){!v&&F.current&&(M.current=F.current.getBoundingClientRect().height)},[v]);return r(function(){if(E){var e=function(e){e.preventDefault();var t=e.clientY-j.current,o=Math.max(m,Math.min(T,z.current+t));R(o),null==b||b(o)},t=function(){D(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[E]),t("div",e({ref:F,style:{position:"relative",width:"100%",minHeight:v?M.current:"auto"}},{children:[t("div",e({style:e({position:v?"absolute":"relative",zIndex:v?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:v?"".concat(L,"px"):"auto",minHeight:v?"".concat(m,"px"):"auto",maxHeight:v?"".concat(L,"px"):"auto",overflow:"hidden",width:"100%"},C.container)},{children:[t("div",e({style:e({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px",gap:"16px"},C.header)},{children:[o("span",e({style:e({display:"inline-block",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},C.title)},{children:k||((null==c?void 0:c.trim())?c:"Data uploaded for your context")})),S]})),H,v&&o("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},C.body)},{children:u})),v&&o("div",e({onMouseDown:function(e){e.preventDefault(),D(!0),j.current=e.clientY,z.current=L,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:o("div",{style:e({width:48,height:4,borderRadius:4,background:E?null!==(a=C.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},C.dragPill)})}))]})),o("div",e({style:{position:v?"absolute":"relative",top:v?"".concat(L,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:o("button",e({onClick:y,"aria-label":v?"Collapse":"Expand",style:e({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},C.notch)},{children:o(l,{size:14,color:null!==(s=C.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{d as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as r}from"react";import{ChevronDown as l}from"lucide-react";var d=function(d){var a,u,s,c,p=d.children,f=d.uploadListTopContent,h=d.defaultHeight,g=void 0===h?300:h,m=d.minHeight,x=void 0===m?150:m,v=d.maxHeight,b=d.isExpanded,y=void 0!==b&&b,w=d.onToggle,C=d.onHeightChange,H=d.styles,k=void 0===H?{}:H,S=d.drawerSummaryComponent,B=d.totalCountsBadge,E=d.headerComponent,D=n(!1),I=D[0],L=D[1],R=n(g),j=R[0],z=R[1],F=i(0),M=i(g),T=i(null),Y=i(0),A="string"==typeof v?parseFloat(v)/100*window.innerHeight:null!=v?v:.4*window.innerHeight;r(function(){!y&&T.current&&(Y.current=T.current.getBoundingClientRect().height)},[y]);return r(function(){if(I){var e=function(e){e.preventDefault();var t=e.clientY-F.current,o=Math.max(x,Math.min(A,M.current+t));z(o),null==C||C(o)},t=function(){L(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[I]),t("div",e({ref:T,style:{position:"relative",width:"100%",minHeight:y?Y.current:"auto"}},{children:[t("div",e({style:e({position:y?"absolute":"relative",zIndex:y?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:y?"".concat(j,"px"):"auto",minHeight:y?"".concat(x,"px"):"auto",maxHeight:y?"".concat(j,"px"):"auto",overflow:"hidden",width:"100%"},k.container)},{children:[t("div",e({style:e({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px",gap:"16px"},k.header)},{children:[o("span",e({style:e({display:"inline-block",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},k.title)},{children:E||((null==f?void 0:f.trim())?f:"Data uploaded for your context")})),B]})),S,y&&o("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px",paddingBottom:"36px"},k.body)},{children:p})),y&&o("div",e({onMouseDown:function(e){e.preventDefault(),L(!0),F.current=e.clientY,M.current=j,document.body.style.userSelect="none"},style:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:null!==(u=null===(a=k.body)||void 0===a?void 0:a.backgroundColor)&&void 0!==u?u:"#fff",display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:o("div",{style:e({width:48,height:4,borderRadius:4,background:I?null!==(s=k.dragPillActiveColor)&&void 0!==s?s:"#a78bfa":"#d1d5db"},k.dragPill)})}))]})),o("div",e({style:{position:y?"absolute":"relative",top:y?"".concat(j,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:y?10:"auto"}},{children:o("button",e({onClick:w,"aria-label":y?"Collapse":"Expand",style:e({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},k.notch)},{children:o(l,{size:14,color:null!==(c=k.notchArrowColor)&&void 0!==c?c:"#6d28d9",style:{transform:y?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{d as default};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/ChatDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoMzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/ChatDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyNzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/citation",
3
- "version": "0.0.199",
3
+ "version": "0.0.200",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",