@e-llm-studio/instant-learning 0.0.181 → 0.0.182
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.
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronIcon.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronIcon.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js +2 -0
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js.map +1 -0
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/features/IL-OTJ/_components/_svg/ChevronIcon.js +2 -0
- package/dist/features/IL-OTJ/_components/_svg/ChevronIcon.js.map +1 -0
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),n=require("react/jsx-runtime"),i=require("../../../node_modules/react-markdown/lib/react-markdown.js"),t=require("../../../node_modules/rehype-raw/lib/index.js"),r=require("../../../node_modules/remark-gfm/index.js"),s=require("react"),o=require("./_svg/CitationLinkSparkleIcon.js"),a=require("./_svg/HumanWithBrainIcon.js"),l=require("./_svg/Lightbulb.js"),d=require("./_svg/GapIcon.js"),c=require("./CitationLink.js"),u=require("./_svg/ChevronIcon.js"),g=function(i){var t=i.isOpen,r=i.onClick;return n.jsxs("button",e.__assign({onClick:r,style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"3px 5px",borderRadius:"4px",border:"1.5px solid ".concat(t?"#7C3AED":"#ded6ff"),backgroundColor:t?"#F5F3FF":"#FFFFFF",cursor:"pointer",transition:"all 0.2s ease",outline:"none"}},{children:[n.jsx(a.HumanWithBrainIcon,{}),n.jsx("svg",e.__assign({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:n.jsx("path",{d:"M6 9l6 6 6-6"})}))]}))};exports.CognitiveDecisioningCard=function(p){var x=p.citation,f=p.citations;p.setChatSize;var _=p.isOpen,m=void 0!==_&&_,h=p.onToggle,v=s.useRef(null);s.useEffect(function(){if(m&&v.current){var e=setTimeout(function(){var e;null===(e=v.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return function(){return clearTimeout(e)}}},[m]);var j=function(e,n){var i,t="";if(!(t="string"==typeof n?n:(null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.content)?n.customMetaData.content:String(n)))return null;var r=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),s=t.match(r);return s?(console.log("Extracted",e,":",s[1]),s[1].replace(/\\n/g,"\n")):null},y=s.useMemo(function(){return j("reason",x)},[x]),b=s.useMemo(function(){return j("gap",x)},[x]),k=s.useMemo(function(){return j("relevance_score",x)},[x]),w=s.useState(!1);w[0],w[1];var F=s.useState(!0),S=F[0],C=F[1],I=s.useState(!0),M=I[0],B=I[1],W={display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},q={marginTop:"2px",paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"14px",lineHeight:"1.5",color:"#4B5563"},z=function(e){var n;return e?null===(n=e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,i,t){var r=i.replace(/\s/g,"%20");return"".concat(n).concat(r).concat(t)}))||void 0===n?void 0:n.trim():""},D=s.useCallback(function(e){return f&&f.find(function(n){return n.customMetaData.citation_number&&"Cognitive Decisioning"!==n.customMetaData.citation_title&&String(n.customMetaData.citation_number)===String(e)})||null},[f]),L=s.useMemo(function(){return{img:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("img",e.__assign({},t,{style:{height:"100%",width:"100%",objectFit:"contain"},alt:(null==t?void 0:t.alt)||"",className:"w-full sm:max-w-lg md:max-w-2xl lg:max-w-4xl mx-auto"}))},p:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("p",e.__assign({},t,{style:{margin:0}},{children:null==t?void 0:t.children}))},code:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("span",e.__assign({},t,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"inline-flex",fontSize:"1rem",lineHeight:"1.625rem"}},{children:null==t?void 0:t.children}))},ol:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ol",e.__assign({},t,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==t?void 0:t.children}))},ul:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ol",e.__assign({},t,{style:{paddingLeft:"1.25rem",listStyleType:"decimal"}}))},li:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("li",e.__assign({},t,{style:{marginBottom:"4px",listStyle:"decimal"}},{children:t.children}))},a:function(i){i.node;var t=i.href,r=i.children,s=e.__rest(i,["node","href","children"]);if(!t)return n.jsx("a",e.__assign({},s,{children:r}));var o=t.match(/citationNumber=([^&]+)/),a=o?o[1]:null;if(a){var l=D(a);if(l)return n.jsx(c.default,{citation:l,linkTitle:r,fontSize:14})}return n.jsx("a",e.__assign({href:t,target:"_blank",rel:"noopener noreferrer",className:"md-link inline-flex items-center gap-1 text-purple-700 hover:underline"},s,{children:r}))}}},[]),R=s.useMemo(function(){return[t.default]},[]),T=s.useMemo(function(){return[r.default]},[]);return n.jsxs("div",e.__assign({style:{display:"contents"}},{children:[n.jsx(g,{isOpen:m,onClick:function(){h&&h()}}),m&&n.jsxs("div",e.__assign({ref:v,style:{display:"block",width:"100%",marginTop:"4px",marginBottom:"12px",overflow:"hidden",borderRadius:"8px",border:"1.5px solid #cacdfa",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.05)",fontFamily:'"Plus Jakarta Sans", sans-serif',animation:"fadeIn 0.2s ease-out",maxWidth:"100%"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1.5px solid #d4dbff",backgroundColor:"#f4f2ff",padding:"8px 12px",gap:"8px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[n.jsx(a.HumanWithBrainIcon,{}),n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#1F2937"}},{children:"Cognitive Decisioning AI"}))]})),k&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.3px solid #bb97f9ff",backgroundColor:"#FFFFFF",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"#000",gap:"4px"}},{children:[n.jsx(o.CitationLinkSparkleIcon,{}),"AI Relevance: ",k,"%"]}))]})),n.jsxs("div",e.__assign({style:{borderBottom:"1.5px solid #e9ebf0"}},{children:[n.jsxs("button",e.__assign({onClick:function(){return C(!S)},style:W},{children:[n.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n.jsx(l.LightbulbIcon,{}),n.jsxs("div",{children:[n.jsx("h4",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Reasoning"})),n.jsx("p",e.__assign({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"Why this was picked"}))]})]})),n.jsx(u.default,{isOpen:S})]})),S&&n.jsx("div",e.__assign({style:q},{children:n.jsx(i.ReactMarkdown,e.__assign({components:L,rehypePlugins:R,remarkPlugins:T},{children:z(y||"No reasoning provided.")}))}))]})),n.jsxs("div",{children:[n.jsxs("button",e.__assign({onClick:function(){return B(!M)},style:W},{children:[n.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n.jsx(d.GapIcon,{}),n.jsxs("div",{children:[n.jsx("h4",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Gap"})),n.jsx("p",e.__assign({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"What's missing or unclear"}))]})]})),n.jsx(u.default,{isOpen:M})]})),M&&n.jsx("div",e.__assign({style:q},{children:n.jsx(i.ReactMarkdown,e.__assign({components:L,rehypePlugins:R,remarkPlugins:T},{children:z(b||"No gaps identified.")}))}))]})]}))]}))};
|
|
2
|
+
//# sourceMappingURL=CognitiveDecisioningCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveDecisioningCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|