@e-llm-studio/instant-learning 0.0.181 → 0.0.183
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
|
+
import{__rest as e,__assign as n}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r}from"react/jsx-runtime";import{ReactMarkdown as t}from"../../../node_modules/react-markdown/lib/react-markdown.js";import o from"../../../node_modules/rehype-raw/lib/index.js";import l from"../../../node_modules/remark-gfm/index.js";import{useRef as a,useEffect as d,useMemo as c,useState as s,useCallback as p}from"react";import{CitationLinkSparkleIcon as u}from"./_svg/CitationLinkSparkleIcon.js";import{HumanWithBrainIcon as f}from"./_svg/HumanWithBrainIcon.js";import{LightbulbIcon as m}from"./_svg/Lightbulb.js";import{GapIcon as g}from"./_svg/GapIcon.js";import h from"./CitationLink.js";import x from"./_svg/ChevronIcon.js";var v=function(e){var t=e.isOpen,o=e.onClick;return r("button",n({onClick:o,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:[i(f,{}),i("svg",n({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:i("path",{d:"M6 9l6 6 6-6"})}))]}))},y=function(y){var b=y.citation,k=y.citations;y.setChatSize;var w=y.isOpen,F=void 0!==w&&w,S=y.onToggle,C=a(null);d(function(){if(F&&C.current){var e=setTimeout(function(){var e;null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return function(){return clearTimeout(e)}}},[F]);var j=function(e,n){var i,r="";if(!(r="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 t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),o=r.match(t);return o?(console.log("Extracted",e,":",o[1]),o[1].replace(/\\n/g,"\n")):null},I=c(function(){return j("reason",b)},[b]),_=c(function(){return j("gap",b)},[b]),B=c(function(){return j("relevance_score",b)},[b]),W=s(!1);W[0],W[1];var z=s(!0),D=z[0],L=z[1],R=s(!0),T=R[0],M=R[1],N={display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},O={marginTop:"2px",paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"14px",lineHeight:"1.5",color:"#4B5563"},P=function(e){var n;return e?null===(n=e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,i,r){var t=i.replace(/\s/g,"%20");return"".concat(n).concat(t).concat(r)}))||void 0===n?void 0:n.trim():""},A=p(function(e){return k&&k.find(function(n){return n.customMetaData.citation_number&&"Cognitive Decisioning"!==n.customMetaData.citation_title&&String(n.customMetaData.citation_number)===String(e)})||null},[k]),E=c(function(){return{img:function(r){r.node;var t=e(r,["node"]);return i("img",n({},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(r){r.node;var t=e(r,["node"]);return i("p",n({},t,{style:{margin:0}},{children:null==t?void 0:t.children}))},code:function(r){r.node;var t=e(r,["node"]);return i("span",n({},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(r){r.node;var t=e(r,["node"]);return i("ol",n({},t,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==t?void 0:t.children}))},ul:function(r){r.node;var t=e(r,["node"]);return i("ol",n({},t,{style:{paddingLeft:"1.25rem",listStyleType:"decimal"}}))},li:function(r){r.node;var t=e(r,["node"]);return i("li",n({},t,{style:{marginBottom:"4px",listStyle:"decimal"}},{children:t.children}))},a:function(r){r.node;var t=r.href,o=r.children,l=e(r,["node","href","children"]);if(!t)return i("a",n({},l,{children:o}));var a=t.match(/citationNumber=([^&]+)/),d=a?a[1]:null;if(d){var c=A(d);if(c)return i(h,{citation:c,linkTitle:o,fontSize:14})}return i("a",n({href:t,target:"_blank",rel:"noopener noreferrer",className:"md-link inline-flex items-center gap-1 text-purple-700 hover:underline"},l,{children:o}))}}},[]),H=c(function(){return[o]},[]),G=c(function(){return[l]},[]);return r("div",n({style:{display:"contents"}},{children:[i(v,{isOpen:F,onClick:function(){S&&S()}}),F&&r("div",n({ref:C,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:[r("div",n({style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1.5px solid #d4dbff",backgroundColor:"#f4f2ff",padding:"8px 12px",gap:"8px"}},{children:[r("div",n({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i(f,{}),i("span",n({style:{fontSize:"14px",fontWeight:500,color:"#1F2937"}},{children:"Cognitive Decisioning AI"}))]})),B&&r("div",n({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:[i(u,{}),"AI Relevance: ",B,"%"]}))]})),r("div",n({style:{borderBottom:"1.5px solid #e9ebf0"}},{children:[r("button",n({onClick:function(){return L(!D)},style:N},{children:[r("div",n({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[i(m,{}),r("div",{children:[i("h4",n({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Reasoning"})),i("p",n({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"Why this was picked"}))]})]})),i(x,{isOpen:D})]})),D&&i("div",n({style:O},{children:i(t,n({components:E,rehypePlugins:H,remarkPlugins:G},{children:P(I||"No reasoning provided.")}))}))]})),r("div",{children:[r("button",n({onClick:function(){return M(!T)},style:N},{children:[r("div",n({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[i(g,{}),r("div",{children:[i("h4",n({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Gap"})),i("p",n({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"What's missing or unclear"}))]})]})),i(x,{isOpen:T})]})),T&&i("div",n({style:O},{children:i(t,n({components:E,rehypePlugins:H,remarkPlugins:G},{children:P(_||"No gaps identified.")}))}))]})]}))]}))};export{y as CognitiveDecisioningCard};
|
|
2
|
+
//# sourceMappingURL=CognitiveDecisioningCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveDecisioningCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|