@e-llm-studio/requirement-ai 0.0.190 → 0.0.191

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"),s=require("lucide-react"),i=require("../RequirementAIWrapper/RequirementAIWrapper.js"),a=require("@mui/material"),r=require("../../utils/userStoryAttachedContext.utils.js"),l=require("./AttachedContext.module.css.js"),o=function(e){return["mp4","mov","webm","mkv"].includes(e)?t.jsx(s.Video,{size:24}):["mp3","wav","ogg","m4a","aac"].includes(e)?t.jsx(s.Headphones,{size:24}):["png","jpg","jpeg","svg","webp","gif"].includes(e)?t.jsx(s.ImageIcon,{size:24}):["pdf","docx","doc","txt","rtf","pages"].includes(e)?t.jsx(s.FileText,{size:24}):t.jsx(s.FileCode,{size:24})},c=function(t,s){var a=i.useRequirementAI().apiCachingConfig,r=a.queryClient,l=a.useGetSignedUrlQuery,o=a.useGetSignedUrlMutation,c=a.getProjectFileUrl,u=null==c?void 0:c(t.path),d=["getSignedUrl",u],m=l(u,d).data,g=o(u),f=g.mutate,h=g.isPending;n.useEffect(function(){u?r.getQueryData(d)||m||f({gsUtilPath:u}):null==s||s("Please provide valid gsUtilPath.")},[u]);return{handleRedirect:function(n){return e.__awaiter(void 0,void 0,void 0,function(){var i,a,l,o,c,g,p;return e.__generator(this,function(e){switch(e.label){case 0:null==n||n.stopPropagation(),e.label=1;case 1:return e.trys.push([1,4,,5]),(i=m||r.getQueryData(d))?"json"!==t.extension.toLowerCase()?(window.open(i,"_blank"),[2]):[4,fetch(i)]:(!h&&u&&f({gsUtilPath:u}),[2]);case 2:if(!(a=e.sent()).ok)throw new Error("Failed to fetch artifact JSON");return[4,a.json()];case 3:return l=e.sent(),o=l.id,c=l.modeName,o&&c?(g="".concat(window.location.origin,"/artifact/").concat(o,"/mode/").concat(c),window.open(g,"_blank"),[3,5]):(window.open(i,"_blank"),[2]);case 4:return p=e.sent(),console.error("Redirect failed:",p),m?window.open(m,"_blank"):null==s||s("Failed to open the selected file."),[3,5];case 5:return[2]}})})},isPending:h,signedUrl:m}},u=function(i){var o=i.item,u=i.isLast,d=i.getIconByExtension,m=i.customStyles,g=n.useState(!1),f=g[0],h=g[1],p=n.useState(""),v=p[0],x=p[1],_=c(o,function(e){x(e),h(!0)}),j=_.handleRedirect,y=_.isPending,w=_.signedUrl;return t.jsxs("div",e.__assign({className:"".concat(l.default.contextItem," ").concat(u?l.default.lastItem:""),style:null==m?void 0:m.contextItem},{children:[t.jsx("div",e.__assign({className:l.default.itemIconWrapper,style:null==m?void 0:m.iconWrapper},{children:r.GetFileIcon(o.extension,o.title.toUpperCase())||d(o.extension)})),t.jsxs("div",e.__assign({className:l.default.itemContent,style:null==m?void 0:m.itemContent},{children:[t.jsx("h3",e.__assign({className:l.default.itemTitle,style:null==m?void 0:m.title},{children:o.title})),t.jsx("p",e.__assign({className:l.default.itemMeta,style:null==m?void 0:m.metadata},{children:o.metadata}))]})),t.jsx("div",e.__assign({onClick:j,className:"".concat(l.default.actionButton," ").concat(w?l.default.actionButtonReady:""),style:null==m?void 0:m.actionButton},{children:y?t.jsx(s.Loader2,{size:24,className:"animate-spin"}):t.jsx(s.ExternalLink,{size:24})})),t.jsx(a.Snackbar,e.__assign({open:f,autoHideDuration:3e3,onClose:function(){return h(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:t.jsxs(a.Alert,e.__assign({onClose:function(){return h(!1)},severity:"error",sx:{width:"100%"}},{children:[t.jsx(a.AlertTitle,{children:"Error"}),v]}))}))]}))},d=function(i){var r=i.item,o=n.useState(!1),u=o[0],d=o[1],m=n.useState(""),g=m[0],f=m[1],h=c(r,function(e){f(e),d(!0)}),p=h.handleRedirect,v=h.isPending;return t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({className:l.default.sourceChip,onClick:p},{children:[t.jsx("span",e.__assign({className:l.default.sourceChipLabel},{children:r.title})),v?t.jsx(s.Loader2,{size:12,className:"animate-spin"}):t.jsx(s.Eye,{size:12})]})),t.jsx(a.Snackbar,e.__assign({open:u,autoHideDuration:3e3,onClose:function(){return d(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:t.jsxs(a.Alert,e.__assign({onClose:function(){return d(!1)},severity:"error",sx:{width:"100%"}},{children:[t.jsx(a.AlertTitle,{children:"Error"}),g]}))}))]})},m=function(s){var i=s.flattenedData,a=n.useState(!1),r=a[0],o=a[1],c=r?i:i.slice(0,2);return t.jsxs("div",e.__assign({className:l.default.sourcesContainer},{children:[t.jsx("span",e.__assign({className:l.default.sourcesLabel},{children:"Sources :"})),t.jsx("div",e.__assign({className:r?l.default.sourcesScrollContainer:l.default.sourcesInlineContainer},{children:c.map(function(e){return t.jsx(d,{item:e},e.id)})})),!r&&i.length>2&&t.jsxs("span",e.__assign({className:l.default.moreChip,onClick:function(){return o(!0)}},{children:["+",i.length-2]})),r&&i.length>2&&t.jsx("span",e.__assign({className:l.default.moreChip,onClick:function(){return o(!1)}},{children:"Show Less"}))]}))};exports.default=function(a){var c=a.customStyles,d=a.variant,g=void 0===d?"dropdown":d,f=n.useState(!1),h=f[0],p=f[1],v=n.useRef(null),x=i.useRequirementAI().persistedDataFiles;n.useEffect(function(){var e=function(e){v.current&&!v.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var _=n.useMemo(function(){var e=[];return x?(Object.entries(x).forEach(function(t){var n=t[0],s=t[1];Array.isArray(s)&&s.forEach(function(t){var s,i=t.filesFromProject;if(i){var a,l=i.name,o=(null===(s=i.type)||void 0===s?void 0:s.toLowerCase())||"",c=(a=i.uploadTime)?new Date(a).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"";e.push({id:i.url,category:n,title:l,extension:o,metadata:"".concat(c," • ").concat(r.getDisplayFileType(o,l)),path:i.url,uploadTime:i.uploadTime})}})}),e):e},[x]);return"inline"===g?0===_.length?null:t.jsx(m,{flattenedData:_}):t.jsx("div",e.__assign({className:l.default.wrapper,style:null==c?void 0:c.wrapperComponent},{children:t.jsxs("div",e.__assign({className:l.default.dropdownContainer,style:null==c?void 0:c.dropdownContainer,ref:v},{children:[t.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation(),p(!h)},className:l.default.triggerButton,style:null==c?void 0:c.triggerButton},{children:[t.jsx(s.BookOpen,{size:18,className:l.default.triggerIcon,style:null==c?void 0:c.triggerIcon}),t.jsxs("span",e.__assign({className:l.default.triggerLabel,style:null==c?void 0:c.triggerLabel},{children:["Attached Context(",_.length,")"]})),h?t.jsx(s.ChevronUp,{size:18}):t.jsx(s.ChevronDown,{size:18})]})),h&&t.jsxs("div",e.__assign({className:l.default.dropdownPanel,style:null==c?void 0:c.dropdownPanel},{children:[t.jsx("div",e.__assign({className:l.default.dropdownList,style:null==c?void 0:c.dropdownList},{children:_.length>0?_.map(function(e,n){return t.jsx(u,{item:e,isLast:n===_.length-1,getIconByExtension:o,customStyles:null==c?void 0:c.contextItem},e.id)}):t.jsx("div",e.__assign({className:l.default.emptyState},{children:"No attachments found"}))})),_.length>4&&t.jsx("div",{className:l.default.fadeGradient,style:null==c?void 0:c.fadeGradient})]}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),i=require("../RequirementAIWrapper/RequirementAIWrapper.js"),a=require("@mui/material"),r=require("../../utils/userStoryAttachedContext.utils.js"),l=require("./AttachedContext.module.css.js"),o=function(e){return["mp4","mov","webm","mkv"].includes(e)?t.jsx(s.Video,{size:24}):["mp3","wav","ogg","m4a","aac"].includes(e)?t.jsx(s.Headphones,{size:24}):["png","jpg","jpeg","svg","webp","gif"].includes(e)?t.jsx(s.ImageIcon,{size:24}):["pdf","docx","doc","txt","rtf","pages"].includes(e)?t.jsx(s.FileText,{size:24}):t.jsx(s.FileCode,{size:24})},c=function(t,s){var a=i.useRequirementAI().apiCachingConfig,r=a.queryClient,l=a.useGetSignedUrlQuery,o=a.useGetSignedUrlMutation,c=a.getProjectFileUrl,d=null==c?void 0:c(t.path),u=["getSignedUrl",d],m=l(d,u).data,g=o(d),f=g.mutate,h=g.isPending;n.useEffect(function(){d?r.getQueryData(u)||m||f({gsUtilPath:d}):null==s||s("Please provide valid gsUtilPath.")},[d]);return{handleRedirect:function(n){return e.__awaiter(void 0,void 0,void 0,function(){var i,a,l,o,c,g,p;return e.__generator(this,function(e){switch(e.label){case 0:null==n||n.stopPropagation(),e.label=1;case 1:return e.trys.push([1,4,,5]),(i=m||r.getQueryData(u))?"json"!==t.extension.toLowerCase()?(window.open(i,"_blank"),[2]):[4,fetch(i)]:(!h&&d&&f({gsUtilPath:d}),[2]);case 2:if(!(a=e.sent()).ok)throw new Error("Failed to fetch artifact JSON");return[4,a.json()];case 3:return l=e.sent(),o=l.id,c=l.modeName,o&&c?(g="".concat(window.location.origin,"/artifact/").concat(o,"/mode/").concat(c),window.open(g,"_blank"),[3,5]):(window.open(i,"_blank"),[2]);case 4:return p=e.sent(),console.error("Redirect failed:",p),m?window.open(m,"_blank"):null==s||s("Failed to open the selected file."),[3,5];case 5:return[2]}})})},isPending:h,signedUrl:m}},d=function(i){var o=i.item,d=i.isLast,u=i.getIconByExtension,m=i.customStyles,g=n.useState(!1),f=g[0],h=g[1],p=n.useState(""),v=p[0],x=p[1],_=c(o,function(e){x(e),h(!0)}),j=_.handleRedirect,y=_.isPending,w=_.signedUrl;return t.jsxs("div",e.__assign({className:"".concat(l.default.contextItem," ").concat(d?l.default.lastItem:""),style:null==m?void 0:m.contextItem},{children:[t.jsx("div",e.__assign({className:l.default.itemIconWrapper,style:null==m?void 0:m.iconWrapper},{children:r.GetFileIcon(o.extension,o.title.toUpperCase())||u(o.extension)})),t.jsxs("div",e.__assign({className:l.default.itemContent,style:null==m?void 0:m.itemContent},{children:[t.jsx("h3",e.__assign({className:l.default.itemTitle,style:null==m?void 0:m.title},{children:o.title})),t.jsx("p",e.__assign({className:l.default.itemMeta,style:null==m?void 0:m.metadata},{children:o.metadata}))]})),t.jsx("div",e.__assign({onClick:j,className:"".concat(l.default.actionButton," ").concat(w?l.default.actionButtonReady:""),style:null==m?void 0:m.actionButton},{children:y?t.jsx(s.Loader2,{size:24,className:"animate-spin"}):t.jsx(s.ExternalLink,{size:24})})),t.jsx(a.Snackbar,e.__assign({open:f,autoHideDuration:3e3,onClose:function(){return h(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:t.jsxs(a.Alert,e.__assign({onClose:function(){return h(!1)},severity:"error",sx:{width:"100%"}},{children:[t.jsx(a.AlertTitle,{children:"Error"}),v]}))}))]}))},u=function(i){var r=i.item,o=n.useState(!1),d=o[0],u=o[1],m=n.useState(""),g=m[0],f=m[1],h=c(r,function(e){f(e),u(!0)}),p=h.handleRedirect,v=h.isPending;return t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({className:l.default.sourceChip,onClick:p},{children:[t.jsx("span",e.__assign({className:l.default.sourceChipLabel},{children:r.title})),v?t.jsx(s.Loader2,{size:12,className:"animate-spin"}):t.jsx(s.Eye,{size:12})]})),t.jsx(a.Snackbar,e.__assign({open:d,autoHideDuration:3e3,onClose:function(){return u(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:t.jsxs(a.Alert,e.__assign({onClose:function(){return u(!1)},severity:"error",sx:{width:"100%"}},{children:[t.jsx(a.AlertTitle,{children:"Error"}),g]}))}))]})},m=function(s){var i=s.flattenedData,a=n.useState(!1),r=a[0],o=a[1],c=r?i:i.slice(0,2);return t.jsxs("div",e.__assign({className:l.default.sourcesContainer},{children:[t.jsx("span",e.__assign({className:l.default.sourcesLabel},{children:"Sources :"})),t.jsxs("div",e.__assign({className:l.default.sourcesFilesContainer},{children:[c.map(function(e){return t.jsx(u,{item:e},e.id)}),!r&&i.length>2&&t.jsxs("span",e.__assign({className:l.default.moreChip,onClick:function(){return o(!0)}},{children:["+",i.length-2]})),r&&i.length>2&&t.jsx("span",e.__assign({className:l.default.moreChip,onClick:function(){return o(!1)}},{children:"View Less"}))]}))]}))};exports.default=function(a){var c=a.customStyles,u=a.variant,g=void 0===u?"dropdown":u,f=n.useState(!1),h=f[0],p=f[1],v=n.useRef(null),x=i.useRequirementAI().persistedDataFiles;n.useEffect(function(){var e=function(e){v.current&&!v.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var _=n.useMemo(function(){var e=[];return x?(Object.entries(x).forEach(function(t){var n=t[0],s=t[1];Array.isArray(s)&&s.forEach(function(t){var s,i=t.filesFromProject;if(i){var a,l=i.name,o=(null===(s=i.type)||void 0===s?void 0:s.toLowerCase())||"",c=(a=i.uploadTime)?new Date(a).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"";e.push({id:i.url,category:n,title:l,extension:o,metadata:"".concat(c," • ").concat(r.getDisplayFileType(o,l)),path:i.url,uploadTime:i.uploadTime})}})}),e):e},[x]);return"inline"===g?0===_.length?null:t.jsx(m,{flattenedData:_}):t.jsx("div",e.__assign({className:l.default.wrapper,style:null==c?void 0:c.wrapperComponent},{children:t.jsxs("div",e.__assign({className:l.default.dropdownContainer,style:null==c?void 0:c.dropdownContainer,ref:v},{children:[t.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation(),p(!h)},className:l.default.triggerButton,style:null==c?void 0:c.triggerButton},{children:[t.jsx(s.BookOpen,{size:18,className:l.default.triggerIcon,style:null==c?void 0:c.triggerIcon}),t.jsxs("span",e.__assign({className:l.default.triggerLabel,style:null==c?void 0:c.triggerLabel},{children:["Attached Context(",_.length,")"]})),h?t.jsx(s.ChevronUp,{size:18}):t.jsx(s.ChevronDown,{size:18})]})),h&&t.jsxs("div",e.__assign({className:l.default.dropdownPanel,style:null==c?void 0:c.dropdownPanel},{children:[t.jsx("div",e.__assign({className:l.default.dropdownList,style:null==c?void 0:c.dropdownList},{children:_.length>0?_.map(function(e,n){return t.jsx(d,{item:e,isLast:n===_.length-1,getIconByExtension:o,customStyles:null==c?void 0:c.contextItem},e.id)}):t.jsx("div",e.__assign({className:l.default.emptyState},{children:"No attachments found"}))})),_.length>4&&t.jsx("div",{className:l.default.fadeGradient,style:null==c?void 0:c.fadeGradient})]}))]}))}))};
2
2
  //# sourceMappingURL=AttachedContext.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI,.AttachedContext-module_sourcesInlineContainer__DR4d8{align-items:center;display:flex;gap:8px;min-width:0}.AttachedContext-module_sourcesScrollContainer__FmVI2{-ms-overflow-style:none;align-items:center;display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scroll-behavior:smooth;scrollbar-width:none}.AttachedContext-module_sourcesScrollContainer__FmVI2::-webkit-scrollbar{display:none}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:500;gap:6px;line-height:18px;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesInlineContainer:"AttachedContext-module_sourcesInlineContainer__DR4d8",sourcesScrollContainer:"AttachedContext-module_sourcesScrollContainer__FmVI2",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI{align-items:flex-start;display:flex;gap:8px;min-width:0;width:100%}.AttachedContext-module_sourcesFilesContainer__-Mnhn{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:1;font-size:13px;font-weight:500;gap:6px;line-height:18px;min-width:0;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesFilesContainer:"AttachedContext-module_sourcesFilesContainer__-Mnhn",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};
2
2
  //# sourceMappingURL=AttachedContext.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as s,useMemo as c}from"react";import{BookOpen as d,ChevronUp as u,ChevronDown as m,Video as p,Headphones as h,ImageIcon as v,FileText as g,FileCode as f,Loader2 as y,ExternalLink as w,Eye as C}from"lucide-react";import{useRequirementAI as N}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{Snackbar as x,Alert as b,AlertTitle as L}from"@mui/material";import{getDisplayFileType as P,GetFileIcon as z}from"../../utils/userStoryAttachedContext.utils.js";import S from"./AttachedContext.module.css.js";var I=function(e){return["mp4","mov","webm","mkv"].includes(e)?i(p,{size:24}):["mp3","wav","ogg","m4a","aac"].includes(e)?i(h,{size:24}):["png","jpg","jpeg","svg","webp","gif"].includes(e)?i(v,{size:24}):["pdf","docx","doc","txt","rtf","pages"].includes(e)?i(g,{size:24}):i(f,{size:24})},j=function(e,i){var r=N().apiCachingConfig,o=r.queryClient,a=r.useGetSignedUrlQuery,l=r.useGetSignedUrlMutation,c=r.getProjectFileUrl,d=null==c?void 0:c(e.path),u=["getSignedUrl",d],m=a(d,u).data,p=l(d),h=p.mutate,v=p.isPending;s(function(){d?o.getQueryData(u)||m||h({gsUtilPath:d}):null==i||i("Please provide valid gsUtilPath.")},[d]);return{handleRedirect:function(r){return t(void 0,void 0,void 0,function(){var t,a,l,s,c,p,g;return n(this,function(n){switch(n.label){case 0:null==r||r.stopPropagation(),n.label=1;case 1:return n.trys.push([1,4,,5]),(t=m||o.getQueryData(u))?"json"!==e.extension.toLowerCase()?(window.open(t,"_blank"),[2]):[4,fetch(t)]:(!v&&d&&h({gsUtilPath:d}),[2]);case 2:if(!(a=n.sent()).ok)throw new Error("Failed to fetch artifact JSON");return[4,a.json()];case 3:return l=n.sent(),s=l.id,c=l.modeName,s&&c?(p="".concat(window.location.origin,"/artifact/").concat(s,"/mode/").concat(c),window.open(p,"_blank"),[3,5]):(window.open(t,"_blank"),[2]);case 4:return g=n.sent(),console.error("Redirect failed:",g),m?window.open(m,"_blank"):null==i||i("Failed to open the selected file."),[3,5];case 5:return[2]}})})},isPending:v,signedUrl:m}},k=function(t){var n=t.item,o=t.isLast,l=t.getIconByExtension,s=t.customStyles,c=a(!1),d=c[0],u=c[1],m=a(""),p=m[0],h=m[1],v=j(n,function(e){h(e),u(!0)}),g=v.handleRedirect,f=v.isPending,C=v.signedUrl;return r("div",e({className:"".concat(S.contextItem," ").concat(o?S.lastItem:""),style:null==s?void 0:s.contextItem},{children:[i("div",e({className:S.itemIconWrapper,style:null==s?void 0:s.iconWrapper},{children:z(n.extension,n.title.toUpperCase())||l(n.extension)})),r("div",e({className:S.itemContent,style:null==s?void 0:s.itemContent},{children:[i("h3",e({className:S.itemTitle,style:null==s?void 0:s.title},{children:n.title})),i("p",e({className:S.itemMeta,style:null==s?void 0:s.metadata},{children:n.metadata}))]})),i("div",e({onClick:g,className:"".concat(S.actionButton," ").concat(C?S.actionButtonReady:""),style:null==s?void 0:s.actionButton},{children:f?i(y,{size:24,className:"animate-spin"}):i(w,{size:24})})),i(x,e({open:d,autoHideDuration:3e3,onClose:function(){return u(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:r(b,e({onClose:function(){return u(!1)},severity:"error",sx:{width:"100%"}},{children:[i(L,{children:"Error"}),p]}))}))]}))},U=function(t){var n=t.item,l=a(!1),s=l[0],c=l[1],d=a(""),u=d[0],m=d[1],p=j(n,function(e){m(e),c(!0)}),h=p.handleRedirect,v=p.isPending;return r(o,{children:[r("span",e({className:S.sourceChip,onClick:h},{children:[i("span",e({className:S.sourceChipLabel},{children:n.title})),v?i(y,{size:12,className:"animate-spin"}):i(C,{size:12})]})),i(x,e({open:s,autoHideDuration:3e3,onClose:function(){return c(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:r(b,e({onClose:function(){return c(!1)},severity:"error",sx:{width:"100%"}},{children:[i(L,{children:"Error"}),u]}))}))]})},D=function(t){var n=t.flattenedData,o=a(!1),l=o[0],s=o[1],c=l?n:n.slice(0,2);return r("div",e({className:S.sourcesContainer},{children:[i("span",e({className:S.sourcesLabel},{children:"Sources :"})),i("div",e({className:l?S.sourcesScrollContainer:S.sourcesInlineContainer},{children:c.map(function(e){return i(U,{item:e},e.id)})})),!l&&n.length>2&&r("span",e({className:S.moreChip,onClick:function(){return s(!0)}},{children:["+",n.length-2]})),l&&n.length>2&&i("span",e({className:S.moreChip,onClick:function(){return s(!1)}},{children:"Show Less"}))]}))},E=function(t){var n=t.customStyles,o=t.variant,p=void 0===o?"dropdown":o,h=a(!1),v=h[0],g=h[1],f=l(null),y=N().persistedDataFiles;s(function(){var e=function(e){f.current&&!f.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var w=c(function(){var e=[];return y?(Object.entries(y).forEach(function(t){var n=t[0],i=t[1];Array.isArray(i)&&i.forEach(function(t){var i,r=t.filesFromProject;if(r){var o,a=r.name,l=(null===(i=r.type)||void 0===i?void 0:i.toLowerCase())||"",s=(o=r.uploadTime)?new Date(o).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"";e.push({id:r.url,category:n,title:a,extension:l,metadata:"".concat(s," • ").concat(P(l,a)),path:r.url,uploadTime:r.uploadTime})}})}),e):e},[y]);return"inline"===p?0===w.length?null:i(D,{flattenedData:w}):i("div",e({className:S.wrapper,style:null==n?void 0:n.wrapperComponent},{children:r("div",e({className:S.dropdownContainer,style:null==n?void 0:n.dropdownContainer,ref:f},{children:[r("button",e({onClick:function(e){e.stopPropagation(),g(!v)},className:S.triggerButton,style:null==n?void 0:n.triggerButton},{children:[i(d,{size:18,className:S.triggerIcon,style:null==n?void 0:n.triggerIcon}),r("span",e({className:S.triggerLabel,style:null==n?void 0:n.triggerLabel},{children:["Attached Context(",w.length,")"]})),i(v?u:m,{size:18})]})),v&&r("div",e({className:S.dropdownPanel,style:null==n?void 0:n.dropdownPanel},{children:[i("div",e({className:S.dropdownList,style:null==n?void 0:n.dropdownList},{children:w.length>0?w.map(function(e,t){return i(k,{item:e,isLast:t===w.length-1,getIconByExtension:I,customStyles:null==n?void 0:n.contextItem},e.id)}):i("div",e({className:S.emptyState},{children:"No attachments found"}))})),w.length>4&&i("div",{className:S.fadeGradient,style:null==n?void 0:n.fadeGradient})]}))]}))}))};export{E as default};
1
+ import{__assign as e,__awaiter as t,__generator as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as s,useMemo as c}from"react";import{BookOpen as d,ChevronUp as u,ChevronDown as m,Video as p,Headphones as h,ImageIcon as v,FileText as g,FileCode as f,Loader2 as y,ExternalLink as w,Eye as C}from"lucide-react";import{useRequirementAI as N}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{Snackbar as x,Alert as b,AlertTitle as L}from"@mui/material";import{getDisplayFileType as P,GetFileIcon as z}from"../../utils/userStoryAttachedContext.utils.js";import j from"./AttachedContext.module.css.js";var k=function(e){return["mp4","mov","webm","mkv"].includes(e)?i(p,{size:24}):["mp3","wav","ogg","m4a","aac"].includes(e)?i(h,{size:24}):["png","jpg","jpeg","svg","webp","gif"].includes(e)?i(v,{size:24}):["pdf","docx","doc","txt","rtf","pages"].includes(e)?i(g,{size:24}):i(f,{size:24})},I=function(e,i){var r=N().apiCachingConfig,o=r.queryClient,a=r.useGetSignedUrlQuery,l=r.useGetSignedUrlMutation,c=r.getProjectFileUrl,d=null==c?void 0:c(e.path),u=["getSignedUrl",d],m=a(d,u).data,p=l(d),h=p.mutate,v=p.isPending;s(function(){d?o.getQueryData(u)||m||h({gsUtilPath:d}):null==i||i("Please provide valid gsUtilPath.")},[d]);return{handleRedirect:function(r){return t(void 0,void 0,void 0,function(){var t,a,l,s,c,p,g;return n(this,function(n){switch(n.label){case 0:null==r||r.stopPropagation(),n.label=1;case 1:return n.trys.push([1,4,,5]),(t=m||o.getQueryData(u))?"json"!==e.extension.toLowerCase()?(window.open(t,"_blank"),[2]):[4,fetch(t)]:(!v&&d&&h({gsUtilPath:d}),[2]);case 2:if(!(a=n.sent()).ok)throw new Error("Failed to fetch artifact JSON");return[4,a.json()];case 3:return l=n.sent(),s=l.id,c=l.modeName,s&&c?(p="".concat(window.location.origin,"/artifact/").concat(s,"/mode/").concat(c),window.open(p,"_blank"),[3,5]):(window.open(t,"_blank"),[2]);case 4:return g=n.sent(),console.error("Redirect failed:",g),m?window.open(m,"_blank"):null==i||i("Failed to open the selected file."),[3,5];case 5:return[2]}})})},isPending:v,signedUrl:m}},S=function(t){var n=t.item,o=t.isLast,l=t.getIconByExtension,s=t.customStyles,c=a(!1),d=c[0],u=c[1],m=a(""),p=m[0],h=m[1],v=I(n,function(e){h(e),u(!0)}),g=v.handleRedirect,f=v.isPending,C=v.signedUrl;return r("div",e({className:"".concat(j.contextItem," ").concat(o?j.lastItem:""),style:null==s?void 0:s.contextItem},{children:[i("div",e({className:j.itemIconWrapper,style:null==s?void 0:s.iconWrapper},{children:z(n.extension,n.title.toUpperCase())||l(n.extension)})),r("div",e({className:j.itemContent,style:null==s?void 0:s.itemContent},{children:[i("h3",e({className:j.itemTitle,style:null==s?void 0:s.title},{children:n.title})),i("p",e({className:j.itemMeta,style:null==s?void 0:s.metadata},{children:n.metadata}))]})),i("div",e({onClick:g,className:"".concat(j.actionButton," ").concat(C?j.actionButtonReady:""),style:null==s?void 0:s.actionButton},{children:f?i(y,{size:24,className:"animate-spin"}):i(w,{size:24})})),i(x,e({open:d,autoHideDuration:3e3,onClose:function(){return u(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:r(b,e({onClose:function(){return u(!1)},severity:"error",sx:{width:"100%"}},{children:[i(L,{children:"Error"}),p]}))}))]}))},U=function(t){var n=t.item,l=a(!1),s=l[0],c=l[1],d=a(""),u=d[0],m=d[1],p=I(n,function(e){m(e),c(!0)}),h=p.handleRedirect,v=p.isPending;return r(o,{children:[r("span",e({className:j.sourceChip,onClick:h},{children:[i("span",e({className:j.sourceChipLabel},{children:n.title})),v?i(y,{size:12,className:"animate-spin"}):i(C,{size:12})]})),i(x,e({open:s,autoHideDuration:3e3,onClose:function(){return c(!1)},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:r(b,e({onClose:function(){return c(!1)},severity:"error",sx:{width:"100%"}},{children:[i(L,{children:"Error"}),u]}))}))]})},D=function(t){var n=t.flattenedData,o=a(!1),l=o[0],s=o[1],c=l?n:n.slice(0,2);return r("div",e({className:j.sourcesContainer},{children:[i("span",e({className:j.sourcesLabel},{children:"Sources :"})),r("div",e({className:j.sourcesFilesContainer},{children:[c.map(function(e){return i(U,{item:e},e.id)}),!l&&n.length>2&&r("span",e({className:j.moreChip,onClick:function(){return s(!0)}},{children:["+",n.length-2]})),l&&n.length>2&&i("span",e({className:j.moreChip,onClick:function(){return s(!1)}},{children:"View Less"}))]}))]}))},E=function(t){var n=t.customStyles,o=t.variant,p=void 0===o?"dropdown":o,h=a(!1),v=h[0],g=h[1],f=l(null),y=N().persistedDataFiles;s(function(){var e=function(e){f.current&&!f.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var w=c(function(){var e=[];return y?(Object.entries(y).forEach(function(t){var n=t[0],i=t[1];Array.isArray(i)&&i.forEach(function(t){var i,r=t.filesFromProject;if(r){var o,a=r.name,l=(null===(i=r.type)||void 0===i?void 0:i.toLowerCase())||"",s=(o=r.uploadTime)?new Date(o).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"";e.push({id:r.url,category:n,title:a,extension:l,metadata:"".concat(s," • ").concat(P(l,a)),path:r.url,uploadTime:r.uploadTime})}})}),e):e},[y]);return"inline"===p?0===w.length?null:i(D,{flattenedData:w}):i("div",e({className:j.wrapper,style:null==n?void 0:n.wrapperComponent},{children:r("div",e({className:j.dropdownContainer,style:null==n?void 0:n.dropdownContainer,ref:f},{children:[r("button",e({onClick:function(e){e.stopPropagation(),g(!v)},className:j.triggerButton,style:null==n?void 0:n.triggerButton},{children:[i(d,{size:18,className:j.triggerIcon,style:null==n?void 0:n.triggerIcon}),r("span",e({className:j.triggerLabel,style:null==n?void 0:n.triggerLabel},{children:["Attached Context(",w.length,")"]})),i(v?u:m,{size:18})]})),v&&r("div",e({className:j.dropdownPanel,style:null==n?void 0:n.dropdownPanel},{children:[i("div",e({className:j.dropdownList,style:null==n?void 0:n.dropdownList},{children:w.length>0?w.map(function(e,t){return i(S,{item:e,isLast:t===w.length-1,getIconByExtension:k,customStyles:null==n?void 0:n.contextItem},e.id)}):i("div",e({className:j.emptyState},{children:"No attachments found"}))})),w.length>4&&i("div",{className:j.fadeGradient,style:null==n?void 0:n.fadeGradient})]}))]}))}))};export{E as default};
2
2
  //# sourceMappingURL=AttachedContext.js.map
@@ -1,2 +1,2 @@
1
- var e={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesInlineContainer:"AttachedContext-module_sourcesInlineContainer__DR4d8",sourcesScrollContainer:"AttachedContext-module_sourcesScrollContainer__FmVI2",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI,.AttachedContext-module_sourcesInlineContainer__DR4d8{align-items:center;display:flex;gap:8px;min-width:0}.AttachedContext-module_sourcesScrollContainer__FmVI2{-ms-overflow-style:none;align-items:center;display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scroll-behavior:smooth;scrollbar-width:none}.AttachedContext-module_sourcesScrollContainer__FmVI2::-webkit-scrollbar{display:none}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:500;gap:6px;line-height:18px;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesFilesContainer:"AttachedContext-module_sourcesFilesContainer__-Mnhn",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI{align-items:flex-start;display:flex;gap:8px;min-width:0;width:100%}.AttachedContext-module_sourcesFilesContainer__-Mnhn{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:1;font-size:13px;font-weight:500;gap:6px;line-height:18px;min-width:0;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=AttachedContext.module.css.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.190",
3
+ "version": "0.0.191",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",