@e-llm-studio/citation 0.0.235 → 0.0.236
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/PromptemonBlockViewer/PromptemonBlockViewer.js +1 -1
- package/dist/cjs/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +2 -0
- package/dist/cjs/features/SPBAnalysisPanel/Cognitivereasoningpanel.js.map +1 -0
- package/dist/cjs/features/SPBAnalysisPanel/DependencyGraph.js +2 -0
- package/dist/cjs/features/SPBAnalysisPanel/DependencyGraph.js.map +1 -0
- package/dist/cjs/features/SPBAnalysisPanel/Internaleditor.js +2 -0
- package/dist/cjs/features/SPBAnalysisPanel/Internaleditor.js.map +1 -0
- package/dist/cjs/features/SPBAnalysisPanel/Markdownrenderer.js +2 -0
- package/dist/cjs/features/SPBAnalysisPanel/Markdownrenderer.js.map +1 -0
- package/dist/cjs/features/SPBAnalysisPanel/Spbanalysispanel.js +2 -0
- package/dist/cjs/features/SPBAnalysisPanel/Spbanalysispanel.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/PromptemonBlockViewer/PromptemonBlockViewer.js +1 -1
- package/dist/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +2 -0
- package/dist/features/SPBAnalysisPanel/Cognitivereasoningpanel.js.map +1 -0
- package/dist/features/SPBAnalysisPanel/DependencyGraph.js +2 -0
- package/dist/features/SPBAnalysisPanel/DependencyGraph.js.map +1 -0
- package/dist/features/SPBAnalysisPanel/Internaleditor.js +2 -0
- package/dist/features/SPBAnalysisPanel/Internaleditor.js.map +1 -0
- package/dist/features/SPBAnalysisPanel/Markdownrenderer.js +2 -0
- package/dist/features/SPBAnalysisPanel/Markdownrenderer.js.map +1 -0
- package/dist/features/SPBAnalysisPanel/Spbanalysispanel.js +2 -0
- package/dist/features/SPBAnalysisPanel/Spbanalysispanel.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/PromptemonBlockViewer/PromptemonBlockViewer.d.ts +15 -2
- package/dist/types/src/features/PromptemonBlockViewer/PromptemonBlockViewer.d.ts.map +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/DependencyGraph.d.ts +11 -2
- package/dist/types/src/features/SPBAnalysisPanel/DependencyGraph.d.ts.map +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/Markdownrenderer.d.ts +5 -1
- package/dist/types/src/features/SPBAnalysisPanel/Markdownrenderer.d.ts.map +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts +76 -1
- package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts.map +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/index.d.ts +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),o=require("react"),t=require("@mui/material"),i=require("@mui/icons-material/Close"),n=require("@mui/icons-material/Fullscreen"),s=require("@monaco-editor/react"),a=require("@mui/icons-material/DarkMode"),l=require("@mui/icons-material/LightMode");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(i),u=d(n),c=d(s),f=d(a),h=d(l),x={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},p={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},m=function(o){var i=o.isDarkMode,n=o.onChange;return r.jsx(t.Box,e.__assign({onClick:function(){return n(!i)},sx:{width:52,height:24,borderRadius:"12px",bgcolor:i?"#5928ed":"#f0f0f0",border:"1px solid",borderColor:i?"#5928ed":"#d1d5db",display:"flex",alignItems:"center",px:.4,cursor:"pointer",transition:"all 0.2s",justifyContent:i?"flex-end":"flex-start"}},{children:r.jsx(t.Box,e.__assign({sx:{width:18,height:18,borderRadius:"50%",bgcolor:i?"#1e1e2e":"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"}},{children:i?r.jsx(f.default,{sx:{fontSize:11,color:"#fff"}}):r.jsx(h.default,{sx:{fontSize:11,color:"#fff"}})}))}))},b=function(i){var n=i.content,s=i.selectedTag,a=i.highlightVariable,l=i.isDarkMode,d=i.height,g=void 0===d?250:d,u=i.fontSize,f=void 0===u?12:u,h=o.useRef(),m=o.useRef();return o.useEffect(function(){if(s&&h.current&&m.current){var e=h.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=-1,i=0;i<o.length;i++){var n=o[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===s.toLowerCase()){t=i+1;break}}if(t>0){var a=t,l="</".concat(s.toLowerCase(),">");for(i=t;i<o.length;i++)if(o[i].toLowerCase().includes(l)){a=i+1;break}e.setSelection(new m.current.Selection(t,1,t,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(t);var d=e.deltaDecorations([],[{range:new m.current.Range(t,1,a,o[a-1].length+1),options:{isWholeLine:!0,className:"promptemon-highlight",inlineClassName:"promptemon-highlight"}}]);setTimeout(function(){return e.deltaDecorations(d,[])},2e3)}}}},[s]),o.useEffect(function(){if(a&&h.current&&m.current){var e=h.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=[],i=0;i<o.length;i++)for(var n=o[i].indexOf(a);-1!==n;)t.push(new m.current.Range(i+1,n+1,i+1,n+a.length+1)),n=o[i].indexOf(a,n+1);if(0!==t.length){e.revealLineInCenterIfOutsideViewport(t[0].startLineNumber);var s=e.deltaDecorations([],t.map(function(e){return{range:e,options:{inlineClassName:"promptemon-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(s,[])},2e3)}}}},[a]),o.useEffect(function(){m.current&&m.current.editor.setTheme(l?"promptemonDark":"promptemonLight")},[l]),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:"\n .promptemon-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),r.jsxs(t.Box,e.__assign({sx:{width:"100%",height:g,display:"flex",flexDirection:"column"}},{children:[r.jsx(t.Box,{sx:{width:"100%",height:20,bgcolor:l?"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),r.jsx(t.Box,e.__assign({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:r.jsx(c.default,{onMount:function(e,r){h.current=e,m.current=r,r.editor.defineTheme("promptemonDark",x),r.editor.defineTheme("promptemonLight",p),r.editor.setTheme(l?"promptemonDark":"promptemonLight"),r.languages.register({id:"promptemonLang"}),r.languages.setMonarchTokensProvider("promptemonLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),r.languages.registerFoldingRangeProvider("promptemonLang",{provideFoldingRanges:function(e){var r=e.getLinesContent(),o=[],t=[];return r.forEach(function(e,r){var i=r+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),s=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&t.push({tag:n[1],start:i}),s)for(var a=s[1],l=t.length-1;l>=0;l--)if(t[l].tag===a){o.push({start:t[l].start,end:i}),t.splice(l,1);break}}),o}})},beforeMount:function(e){e.editor.defineTheme("promptemonDark",x),e.editor.defineTheme("promptemonLight",p),e.editor.setTheme(l?"promptemonDark":"promptemonLight")},theme:l?"promptemonDark":"promptemonLight",value:n,language:"promptemonLang",onChange:function(){},options:{fontSize:f,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),r.jsx(t.Box,{sx:{width:"100%",height:20,bgcolor:l?"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})};exports.default=function(i){var n=i.title,s=i.description,a=i.content,l=i.height,d=void 0===l?250:l,c=i.selectedTag,f=i.highlightVariable,h=o.useState(!0),x=h[0],p=h[1],_=o.useState(!1),v=_[0],j=_[1];return r.jsxs(r.Fragment,{children:[r.jsxs(t.Box,e.__assign({sx:{border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:[r.jsxs(t.Box,e.__assign({sx:{px:1.5,py:.75,bgcolor:"#f9fafb",borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[r.jsx(t.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#374151",fontWeight:600}},{children:n})),r.jsxs(t.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.75}},{children:[r.jsx(m,{isDarkMode:x,onChange:p}),r.jsx(t.Tooltip,e.__assign({title:"Fullscreen",placement:"top"},{children:r.jsx(t.Box,e.__assign({onClick:function(){return j(!0)},sx:{cursor:"pointer",display:"flex",alignItems:"center",p:.3,borderRadius:"4px","&:hover":{bgcolor:"#e5e7eb"}}},{children:r.jsx(u.default,{sx:{fontSize:"0.9rem",color:"#6b7280"}})}))}))]}))]})),r.jsx(t.Box,e.__assign({sx:{height:d,bgcolor:x?"#030202":"#fff"}},{children:r.jsx(b,{content:a,selectedTag:c,highlightVariable:f,isDarkMode:x,height:d,fontSize:12})}))]})),r.jsxs(t.Dialog,e.__assign({open:v,onClose:function(){return j(!1)},maxWidth:!1,PaperProps:{sx:{width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"}}},{children:[r.jsxs(t.Box,e.__assign({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[r.jsx(t.Typography,e.__assign({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:n})),r.jsx(t.IconButton,e.__assign({size:"small",onClick:function(){return j(!1)}},{children:r.jsx(g.default,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),r.jsxs(t.Box,e.__assign({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[s&&r.jsxs(t.Box,e.__assign({sx:{width:"35%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r.jsxs(t.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[r.jsx(t.Chip,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}}),r.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:n}))]})),r.jsx(t.Box,e.__assign({sx:{flex:1,p:2,overflowY:"auto"}},{children:r.jsxs(t.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[r.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),r.jsx(t.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:s}))]}))}))]})),r.jsxs(t.Box,e.__assign({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r.jsxs(t.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[r.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),r.jsx(m,{isDarkMode:x,onChange:p})]})),r.jsx(t.Box,e.__assign({sx:{flex:1,minHeight:0,p:1.5}},{children:r.jsx(b,{content:a,selectedTag:c,highlightVariable:f,isDarkMode:x,height:"100%",fontSize:13})}))]}))]}))]}))]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),o=require("react/jsx-runtime"),r=require("react"),t=require("@mui/material"),i=require("@mui/icons-material/Close"),n=require("@mui/icons-material/Fullscreen"),s=require("@monaco-editor/react"),a=require("@mui/icons-material/DarkMode"),l=require("@mui/icons-material/LightMode");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(i),c=d(n),u=d(s),f=d(a),h=d(l),x={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},p={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},m=function(r){var i=r.isDarkMode,n=r.onChange;return o.jsx(t.Box,e.__assign({onClick:function(){return n(!i)},sx:{width:52,height:24,borderRadius:"12px",bgcolor:i?"#5928ed":"#f0f0f0",border:"1px solid",borderColor:i?"#5928ed":"#d1d5db",display:"flex",alignItems:"center",px:.4,cursor:"pointer",transition:"all 0.2s",justifyContent:i?"flex-end":"flex-start"}},{children:o.jsx(t.Box,e.__assign({sx:{width:18,height:18,borderRadius:"50%",bgcolor:i?"#1e1e2e":"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"}},{children:i?o.jsx(f.default,{sx:{fontSize:11,color:"#fff"}}):o.jsx(h.default,{sx:{fontSize:11,color:"#fff"}})}))}))},b=function(i){var n=i.content,s=i.selectedTag,a=i.highlightVariable,l=i.isDarkMode,d=i.height,g=void 0===d?250:d,c=i.fontSize,f=void 0===c?12:c,h=i.editorBackgroundColor,m=r.useRef(),b=r.useRef(),_=function(){return h?e.__assign(e.__assign({},x),{colors:e.__assign(e.__assign({},x.colors),{"editor.background":h})}):x};return r.useEffect(function(){if(s&&m.current&&b.current){var e=m.current,o=e.getModel();if(o){for(var r=o.getValue().split("\n"),t=-1,i=0;i<r.length;i++){var n=r[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===s.toLowerCase()){t=i+1;break}}if(t>0){var a=t,l="</".concat(s.toLowerCase(),">");for(i=t;i<r.length;i++)if(r[i].toLowerCase().includes(l)){a=i+1;break}e.setSelection(new b.current.Selection(t,1,t,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(t);var d=e.deltaDecorations([],[{range:new b.current.Range(t,1,a,r[a-1].length+1),options:{isWholeLine:!0,className:"promptemon-highlight",inlineClassName:"promptemon-highlight"}}]);setTimeout(function(){return e.deltaDecorations(d,[])},2e3)}}}},[s]),r.useEffect(function(){if(a&&m.current&&b.current){var e=m.current,o=e.getModel();if(o){for(var r=o.getValue().split("\n"),t=[],i=0;i<r.length;i++)for(var n=r[i].indexOf(a);-1!==n;)t.push(new b.current.Range(i+1,n+1,i+1,n+a.length+1)),n=r[i].indexOf(a,n+1);if(0!==t.length){e.revealLineInCenterIfOutsideViewport(t[0].startLineNumber);var s=e.deltaDecorations([],t.map(function(e){return{range:e,options:{inlineClassName:"promptemon-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(s,[])},2e3)}}}},[a]),r.useEffect(function(){b.current&&b.current.editor.setTheme(l?"promptemonDark":"promptemonLight")},[l]),o.jsxs(o.Fragment,{children:[o.jsx("style",{children:"\n .promptemon-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),o.jsxs(t.Box,e.__assign({sx:{width:"100%",height:g,display:"flex",flexDirection:"column"}},{children:[o.jsx(t.Box,{sx:{width:"100%",height:20,bgcolor:l?h||"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),o.jsx(t.Box,e.__assign({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:o.jsx(u.default,{onMount:function(e,o){m.current=e,b.current=o,o.editor.defineTheme("promptemonDark",_()),o.editor.defineTheme("promptemonLight",p),o.editor.setTheme(l?"promptemonDark":"promptemonLight"),o.languages.register({id:"promptemonLang"}),o.languages.setMonarchTokensProvider("promptemonLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),o.languages.registerFoldingRangeProvider("promptemonLang",{provideFoldingRanges:function(e){var o=e.getLinesContent(),r=[],t=[];return o.forEach(function(e,o){var i=o+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),s=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&t.push({tag:n[1],start:i}),s)for(var a=s[1],l=t.length-1;l>=0;l--)if(t[l].tag===a){r.push({start:t[l].start,end:i}),t.splice(l,1);break}}),r}})},beforeMount:function(e){e.editor.defineTheme("promptemonDark",_()),e.editor.defineTheme("promptemonLight",p),e.editor.setTheme(l?"promptemonDark":"promptemonLight")},theme:l?"promptemonDark":"promptemonLight",value:n,language:"promptemonLang",onChange:function(){},options:{fontSize:f,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),o.jsx(t.Box,{sx:{width:"100%",height:20,bgcolor:l?h||"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})};exports.default=function(i){var n=i.title,s=i.description,a=i.content,l=i.height,d=void 0===l?250:l,u=i.selectedTag,f=i.highlightVariable,h=i.className,x=i.style,p=i.showThemeToggle,_=void 0===p||p,v=i.theme,k=void 0===v?"dark":v,j=i.editorBackgroundColor,y=i.fontSize,B=void 0===y?12:y,C=i.titleFontSize,w=i.titleStyle,F=r.useState("dark"===k),S=F[0],z=F[1],L=r.useState(!1),D=L[0],T=L[1];return r.useEffect(function(){z("dark"===k)},[k]),o.jsxs(o.Fragment,{children:[o.jsxs(t.Box,e.__assign({className:h,style:x,sx:{border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:[o.jsxs(t.Box,e.__assign({sx:{px:1.5,py:.75,bgcolor:S?j||"#030202":"#f9fafb",borderBottom:S?"1px solid #333":"1px solid #e5e7eb",display:"flex",alignItems:"center",justify:"space-between"}},{children:[o.jsx(t.Typography,e.__assign({style:w,sx:{fontSize:C||"0.72rem",color:S?"#e5e7eb":"#374151",fontWeight:600}},{children:n})),o.jsxs(t.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.75}},{children:[_&&o.jsx(m,{isDarkMode:S,onChange:z}),o.jsx(t.Tooltip,e.__assign({title:"Fullscreen",placement:"top"},{children:o.jsx(t.Box,e.__assign({onClick:function(){return T(!0)},sx:{cursor:"pointer",display:"flex",alignItems:"center",p:.3,borderRadius:"4px","&:hover":{bgcolor:S?"#333":"#e5e7eb"}}},{children:o.jsx(c.default,{sx:{fontSize:"0.9rem",color:S?"#9ca3af":"#6b7280"}})}))}))]}))]})),o.jsx(t.Box,e.__assign({sx:{height:d,bgcolor:S?j||"#030202":"#fff"}},{children:o.jsx(b,{content:a,selectedTag:u,highlightVariable:f,isDarkMode:S,height:d,fontSize:B,editorBackgroundColor:j})}))]})),o.jsxs(t.Dialog,e.__assign({open:D,onClose:function(){return T(!1)},maxWidth:!1,PaperProps:{sx:{width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"}}},{children:[o.jsxs(t.Box,e.__assign({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[o.jsx(t.Typography,e.__assign({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:n})),o.jsx(t.IconButton,e.__assign({size:"small",onClick:function(){return T(!1)}},{children:o.jsx(g.default,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),o.jsxs(t.Box,e.__assign({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[s&&o.jsxs(t.Box,e.__assign({sx:{width:"35%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[o.jsxs(t.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[o.jsx(t.Chip,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}}),o.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:n}))]})),o.jsx(t.Box,e.__assign({sx:{flex:1,p:2,overflowY:"auto"}},{children:o.jsxs(t.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[o.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),o.jsx(t.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:s}))]}))}))]})),o.jsxs(t.Box,e.__assign({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[o.jsxs(t.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[o.jsx(t.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),_&&o.jsx(m,{isDarkMode:S,onChange:z})]})),o.jsx(t.Box,e.__assign({sx:{flex:1,minHeight:0,p:1.5}},{children:o.jsx(b,{content:a,selectedTag:u,highlightVariable:f,isDarkMode:S,height:"100%",fontSize:13})}))]}))]}))]}))]})};
|
|
2
2
|
//# sourceMappingURL=PromptemonBlockViewer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),o=require("@mui/system"),t=require("@mui/material"),r=require("@mui/icons-material/Close"),s=require("@mui/icons-material/ExpandMore"),a=require("@mui/icons-material"),l=require("@mui/icons-material/AutoAwesome"),c=require("../ChatCitation/ChatCitationRenderer.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=d(r),u=d(s),g=d(l),h=function(e){var n=document.createElement("div");return n.innerHTML=e,Array.from(n.querySelectorAll("li")).map(function(e){return e.innerHTML})},f=function(){return n.jsx(o.Box,e.__assign({component:"svg",viewBox:"0 0 24 24",sx:{width:14,height:14,fill:"#5928ed"}},{children:n.jsx("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}))};exports.default=function(r){var s,l=r.open,d=r.onClose,p=r.data,_=i.useState(null),m=_[0],y=_[1],j=i.useMemo(function(){var e;return m&&p&&null!==(e=p.block_cognitive_citations.find(function(e){return String(e.citation_number)===m}))&&void 0!==e?e:null},[m,p]),v=i.useMemo(function(){return(null==p?void 0:p.block_cognitive_reasoning_html)?h(p.block_cognitive_reasoning_html):[]},[null==p?void 0:p.block_cognitive_reasoning_html]),b=i.useMemo(function(){return(null==p?void 0:p.block_cognitive_gap_html)?h(p.block_cognitive_gap_html):[]},[null==p?void 0:p.block_cognitive_gap_html]),S=function(i,t){for(var r,s,l=[],d=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g,x=0,u=0,g=function(){var g=s[1].replace(/^.*\$/,""),h=s[2],f=m===g;s.index>x&&l.push(n.jsx("span",{children:i.substring(x,s.index)},"txt-".concat(t,"-").concat(u++))),l.push(n.jsxs("span",{children:[n.jsxs("span",e.__assign({onClick:function(){return y(function(e){return e===g?null:g})},style:{color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline"}},{children:[h,n.jsx(a.ChatBubbleOutlineOutlined,{sx:{fontSize:"12px",ml:.2}})]})),f&&j&&n.jsx(o.Box,e.__assign({sx:{maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1}},{children:n.jsx(c.default,{showRootContainer:!1,rootContainer:{relevanceScore:null!==(r=null==p?void 0:p.block_cognitive_confidence)&&void 0!==r?r:0,slotStyles:{container:{border:"",paddingLeft:"-20px",color:"black"}}},ruleBookContainer:{title:j.title||j.section_ref||"Rule Book",data:{content:j.content||j.paraphrase||"",highlighted_texts:Array.isArray(j.highlight)?j.highlight:j.highlight?[j.highlight]:[]},slotStyles:{outerContainer:{margin:"0",color:"black",minHeight:"350px"}}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})}))]},"anchor-".concat(t,"-").concat(g))),x=d.lastIndex};null!==(s=d.exec(i));)g();return x<i.length&&l.push(n.jsx("span",{children:i.substring(x)},"txt-end-".concat(t,"-").concat(u++))),l};return l?n.jsxs(o.Box,e.__assign({sx:{width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff"}},{children:[n.jsxs(o.Box,e.__assign({sx:{px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd"}},{children:[n.jsxs(o.Box,e.__assign({display:"flex",alignItems:"center",gap:1},{children:[n.jsx(f,{}),n.jsx(t.Typography,e.__assign({fontWeight:500,sx:{fontSize:"0.72rem"}},{children:"Cognitive Decisioning AI"}))]})),n.jsxs(o.Box,e.__assign({display:"flex",alignItems:"center",gap:1},{children:[n.jsx(t.Chip,{icon:n.jsx(g.default,{sx:{fontSize:12}}),label:"AI Relevance: ".concat(null!==(s=null==p?void 0:p.block_cognitive_confidence)&&void 0!==s?s:0,"%"),size:"small",sx:{fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75}}}),n.jsx(t.IconButton,e.__assign({size:"small",onClick:d},{children:n.jsx(x.default,{fontSize:"small"})}))]}))]})),n.jsxs(o.Box,e.__assign({sx:{flex:1,overflowY:"auto",p:.5}},{children:[n.jsxs(t.Accordion,e.__assign({defaultExpanded:!0,disableGutters:!0,elevation:0},{children:[n.jsx(t.AccordionSummary,e.__assign({expandIcon:n.jsx(u.default,{})},{children:n.jsxs(t.Typography,e.__assign({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[n.jsx(o.Box,e.__assign({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:n.jsx(a.LightbulbOutlined,{sx:{fontSize:14,color:"#5928ed"}})})),"Decision Making Factors"]}))})),n.jsx(t.AccordionDetails,{children:n.jsx(o.Box,e.__assign({sx:{padding:0,margin:0}},{children:v.length>0?v.map(function(i,r){return n.jsxs(o.Box,e.__assign({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n.jsxs(t.Typography,e.__assign({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[r+1,"."]})),n.jsx(o.Box,e.__assign({sx:{flex:1}},{children:n.jsx(t.Typography,e.__assign({variant:"body2",component:"span",sx:{fontSize:"0.75rem"}},{children:S(i,r)}))}))]}),r)}):n.jsx(t.Typography,e.__assign({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Reasons Found"}))}))})]})),n.jsx(t.Divider,{}),n.jsxs(t.Accordion,e.__assign({disableGutters:!0,elevation:0},{children:[n.jsx(t.AccordionSummary,e.__assign({expandIcon:n.jsx(u.default,{})},{children:n.jsxs(t.Typography,e.__assign({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[n.jsx(o.Box,e.__assign({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:n.jsx(a.ManageSearchOutlined,{sx:{fontSize:14,color:"#5928ed"}})})),"Gaps in Decision"]}))})),n.jsx(t.AccordionDetails,{children:n.jsx(o.Box,e.__assign({sx:{padding:0,margin:0}},{children:b.length>0?b.map(function(i,r){return n.jsxs(o.Box,e.__assign({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n.jsxs(t.Typography,e.__assign({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[r+1,"."]})),n.jsx(t.Typography,{variant:"body2",component:"span",sx:{fontSize:"0.75rem"},dangerouslySetInnerHTML:{__html:i}})]}),r)}):n.jsx(t.Typography,e.__assign({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Gaps Found"}))}))})]}))]}))]})):null};
|
|
2
|
+
//# sourceMappingURL=Cognitivereasoningpanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cognitivereasoningpanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material/Dialog"),i=require("@mui/icons-material/Fullscreen"),a=require("@mui/icons-material/CloseFullscreen");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(t),l=s(r),c=s(i),d=s(a),u=170,f=48,g=["#ede9fe","#e0f2fe","#fef3c7","#dcfce7","#ffe4e6","#f0fdf4","#fef9c3","#e0e7ff","#fce7f3","#f1f5f9"],h=["#7c3aed","#0284c7","#b45309","#16a34a","#e11d48","#15803d","#a16207","#4338ca","#db2777","#475569"],p=["⚙","◈","⟐","✦","◎","⬡","◇","⊕","✶","◉"],x=["#a78bfa","#7dd3fc","#fbbf24","#86efac","#fda4af","#6ee7b7","#fde047","#a5b4fc","#f9a8d4","#94a3b8"],y=["linear-gradient(135deg,#7c3aed,#a78bfa)","linear-gradient(135deg,#0284c7,#38bdf8)","linear-gradient(135deg,#b45309,#fbbf24)","linear-gradient(135deg,#16a34a,#86efac)","linear-gradient(135deg,#e11d48,#fda4af)","linear-gradient(135deg,#15803d,#6ee7b7)","linear-gradient(135deg,#a16207,#fde047)","linear-gradient(135deg,#4338ca,#a5b4fc)","linear-gradient(135deg,#db2777,#f9a8d4)","linear-gradient(135deg,#475569,#94a3b8)"];function v(n){var t=Array.isArray(null==n?void 0:n.clusters)?n.clusters:[],r=Array.isArray(null==n?void 0:n.nodes)?n.nodes:[],i=Array.isArray(null==n?void 0:n.edges)?n.edges:[],a=function(n,t,r){var i;void 0===n&&(n=[]),void 0===t&&(t=[]),void 0===r&&(r=[]);var a=Array.isArray(n)?n:[],s=Array.isArray(t)?t:[],o=Array.isArray(r)?r:[],l=a.length;if(0===l)return new Map;var c={};a.forEach(function(e,n){c[e.id]=n});var d={},u={};a.forEach(function(e){d[e.id]=[],u[e.id]=[]}),s.forEach(function(e){d[e.source]&&d[e.source].push(e.target),u[e.target]&&u[e.target].push(e.source)});var f={};a.forEach(function(e){f[e.id]=0});for(var g=0;g<l;g++){for(var h=!1,p=0,x=s;p<x.length;p++){var y=x[p],v=(f[y.source]||0)+1;v>(f[y.target]||0)&&v<l&&(f[y.target]=v,h=!0)}if(!h)break}var b={};o.forEach(function(e,n){b[e.id]=n});var _={};o.forEach(function(e){_[e.id]=[]}),a.forEach(function(e){var n;null===(n=_[e.cluster_id])||void 0===n||n.push(e)}),Object.values(_).forEach(function(e){return e.sort(function(e,n){return(f[e.id]||0)-(f[n.id]||0)})});for(var m=new Float64Array(l),j=new Float64Array(l),w=new Float64Array(l),M=new Float64Array(l),k=function(e){var n=null!==(i=b[e.id])&&void 0!==i?i:0;(_[e.id]||[]).forEach(function(e,t){var r=c[e.id];m[r]=520*n+280,j[r]=200*t+120})},S=0,C=o;S<C.length;S++)k(V=C[S]);for(var z=.0015,A=Math.max.apply(Math,e.__spreadArray(e.__spreadArray([],a.map(function(e){return f[e.id]||0}),!1),[1],!1)),E=new Float64Array(l),F=0;F<l;F++)E[F]=(f[a[F].id]||0)/A*(200*l*.6)+120;for(var R=0;R<350;R++){var I=Math.max(.015,1-R/350),W=new Float64Array(l),D=new Float64Array(l);for(F=0;F<l;F++)for(var Y=F+1;Y<l;Y++){var P=(Q=m[F]-m[Y])*Q+(U=j[F]-j[Y])*U;P<400&&(P=(Q=12*(F-Y))*Q+(U=8*(F+Y))*U);var q=Q/(O=Math.sqrt(P))*(H=48e4/P),B=U/O*H;W[F]+=q,D[F]+=B,W[Y]-=q,D[Y]-=B}for(var L=0,X=s;L<X.length;L++){y=X[L];var N=c[y.source],T=c[y.target];if(void 0!==N&&void 0!==T){var O,H,Q=m[T]-m[N],U=j[T]-j[N];if(!((O=Math.sqrt(Q*Q+U*U))<1))q=Q/O*(H=.004*(O-380)),B=U/O*H,W[N]+=q,D[N]+=B,W[T]-=q,D[T]-=B}}var G={},J={},K={};for(F=0;F<l;F++)G[V=a[F].cluster_id]=(G[V]||0)+m[F],J[V]=(J[V]||0)+j[F],K[V]=(K[V]||0)+1;for(F=0;F<l;F++){var V=a[F].cluster_id;W[F]+=(G[V]/K[V]-m[F])*z,D[F]+=(J[V]/K[V]-j[F])*z}for(F=0;F<l;F++)D[F]+=.002*(E[F]-j[F]);for(F=0;F<l;F++)w[F]=.84*(w[F]+W[F])*I,M[F]=.84*(M[F]+D[F])*I,m[F]+=w[F],j[F]+=M[F]}for(g=0;g<40;g++){var Z=!1;for(F=0;F<l;F++)for(Y=F+1;Y<l;Y++){Q=m[F]-m[Y],U=j[F]-j[Y];var $=270-Math.abs(Q),ee=128-Math.abs(U);if($>0&&ee>0)if(Z=!0,$<ee){var ne=$/2+5;m[F]+=Q>0?ne:-ne,m[Y]-=Q>0?ne:-ne}else ne=ee/2+5,j[F]+=U>0?ne:-ne,j[Y]-=U>0?ne:-ne}if(!Z)break}var te=1/0,re=1/0;for(F=0;F<l;F++)te=Math.min(te,m[F]),re=Math.min(re,j[F]);var ie=new Map;for(F=0;F<l;F++)ie.set(a[F].id,{x:Math.round(m[F]-te+80),y:Math.round(j[F]-re+80)});return ie}(r,i,t),s=r.map(function(n){var t=a.get(n.id)||{x:0,y:0};return e.__assign(e.__assign({},n),{x:t.x,y:t.y})}),o={};t.forEach(function(e,n){o[e.id]=n});var l={};t.forEach(function(e){l[e.id]=[]}),s.forEach(function(e){var n;null===(n=l[e.cluster_id])||void 0===n||n.push(e)});var c=36,d=t.map(function(e){var n=l[e.id];if(!n.length)return null;var t=Math.min.apply(Math,n.map(function(e){return e.x})),r=Math.min.apply(Math,n.map(function(e){return e.y})),i=Math.max.apply(Math,n.map(function(e){return e.x+u})),a=Math.max.apply(Math,n.map(function(e){return e.y+f}));return{id:e.id,label:e.label,idx:o[e.id],x:t-c,y:r-c,width:i-t+72,height:a-r+72+22}}).filter(function(e){return null!==e});return{nodes:s.map(function(n){var t;return e.__assign(e.__assign({},n),{cluster:null!==(t=o[n.cluster_id])&&void 0!==t?t:0})}),edges:i,clusterBounds:d,canvasW:Math.max.apply(Math,s.map(function(e){return e.x+u}))+72,canvasH:Math.max.apply(Math,s.map(function(e){return e.y+f}))+72}}function b(e,n,t){var r=n[e.source],i=n[e.target];if(!r||!i)return"";var a=function(e,n){var t=e.x+85,r=e.y+24,i=n.x+85,a=n.y+24;function s(e,n,t,r){var i=t-e,a=r-n;return Math.abs(a)>.4*Math.abs(i)?a>0?{x:e,y:n+24}:{x:e,y:n-24}:i>0?{x:e+85,y:n}:{x:e-85,y:n}}return{source:s(t,r,i,a),target:s(i,a,t,r)}}(r,i),s=a.source,o=a.target,l=o.x-s.x,c=o.y-s.y,d=Math.sqrt(l*l+c*c);if(d<5)return"M ".concat(s.x," ").concat(s.y," L ").concat(o.x," ").concat(o.y);if(i.y+150<r.y&&i.y<r.y-f){var u=Math.min(r.x,i.x)-110;return"M ".concat(s.x," ").concat(s.y," C ").concat(u," ").concat(s.y,", ").concat(u," ").concat(o.y,", ").concat(o.x," ").concat(o.y)}var g=-c/d,h=l/d;if(t.some(function(n){return n.source===e.target&&n.target===e.source})){var p=e.source<e.target?1:-1,x=Math.max(.18*d,40)*p,y=(s.x+o.x)/2+g*x,v=(s.y+o.y)/2+h*x;return"M ".concat(s.x," ").concat(s.y," Q ").concat(y," ").concat(v," ").concat(o.x," ").concat(o.y)}var b=Math.min(.12*d,55),_=(s.x+o.x)/2+g*b,m=(s.y+o.y)/2+h*b;return"M ".concat(s.x," ").concat(s.y," Q ").concat(_," ").concat(m," ").concat(o.x," ").concat(o.y)}function _(r){var i,a,s=r.data,o=r.onFullscreen,l=r.isFullscreen,_=r.isDarkMode,m=void 0!==_&&_,j=t.useRef(null),w=t.useState({x:0,y:0}),M=w[0],k=w[1],S=t.useState(.5),C=S[0],z=S[1],A=t.useState(!1),E=A[0],F=A[1],R=t.useRef({x:0,y:0}),I=t.useRef({x:0,y:0}),W=t.useState(null),D=W[0],Y=W[1],P=t.useState(null),q=P[0],B=P[1],L=t.useState(null),X=L[0],N=L[1],T=t.useState(null),O=T[0],H=T[1],Q=t.useMemo(function(){return v(s)},[s]),U=t.useMemo(function(){var e={};return Q.nodes.forEach(function(n){e[n.id]=n}),e},[Q]),G=t.useMemo(function(){var e={};return s.clusters.forEach(function(n,t){e[n.id]=t}),e},[s]),J=t.useMemo(function(){return O?new Set(Q.edges.filter(function(e){return e.source===O||e.target===O}).map(function(e){return e.id})):new Set},[O,Q.edges]),K=t.useMemo(function(){if(!O)return new Set;var e=new Set([O]);return Q.edges.forEach(function(n){n.source===O&&e.add(n.target),n.target===O&&e.add(n.source)}),e},[O,Q.edges]),V=t.useMemo(function(){return new Date(s.last_analyzed_at).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,day:"numeric",month:"short",year:"numeric"})},[s.last_analyzed_at]),Z=t.useCallback(function(n){n.target.closest("[data-edge-hit]")||n.target.closest("[data-node]")||(F(!0),R.current={x:n.clientX,y:n.clientY},I.current=e.__assign({},M),n.currentTarget.style.cursor="grabbing")},[M]),$=t.useCallback(function(e){E&&k({x:I.current.x+(e.clientX-R.current.x),y:I.current.y+(e.clientY-R.current.y)})},[E]),ee=t.useCallback(function(){F(!1),j.current&&(j.current.style.cursor="grab")},[]),ne=t.useCallback(function(e){e.preventDefault(),z(function(n){return Math.min(2.5,Math.max(.2,n-.001*e.deltaY))})},[]);t.useEffect(function(){var e=j.current;return e&&e.addEventListener("wheel",ne,{passive:!1}),function(){return null==e?void 0:e.removeEventListener("wheel",ne)}},[ne]);var te={width:32,height:32,border:"none",background:"transparent",borderRadius:8,cursor:"pointer",fontSize:16,color:m?"#cbd5e1":"#475569",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500};return n.jsxs("div",e.__assign({style:{width:"100%",height:"100%",background:m?"#090d16":"#ffffff",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",position:"relative",overflow:"hidden"}},{children:[n.jsxs("div",e.__assign({style:{position:"absolute",top:0,left:0,right:0,zIndex:20,borderBottom:l?m?"1px solid #1e293b":"1px solid #f1f5f9":"none",background:m?"#090d16":l?"#fff":"transparent"}},{children:[n.jsxs("div",e.__assign({style:{padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[n.jsxs("div",{children:[l&&n.jsx("h2",e.__assign({style:{margin:0,fontSize:17,fontWeight:700,color:m?"#f8fafc":"#1e293b"}},{children:"Dependency Graph"})),n.jsxs("p",e.__assign({style:{margin:"2px 0 0",fontSize:12,color:"#94a3b8"}},{children:["Last analyzed: ".concat(V||""," · "),"Click a node or connection to explore details and dependencies."]}))]}),n.jsxs("div",e.__assign({style:{display:"flex",gap:6,alignItems:"center"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",gap:2,background:m?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:m?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:[n.jsx("button",e.__assign({onClick:function(){return z(function(e){return Math.max(.2,e-.15)})},style:te},{children:"−"})),n.jsxs("button",e.__assign({onClick:function(){z(.5),k({x:0,y:0})},style:e.__assign(e.__assign({},te),{fontSize:11,width:52,fontWeight:600})},{children:[Math.round(100*C)||0,"%"]})),n.jsx("button",e.__assign({onClick:function(){return z(function(e){return Math.min(2.5,e+.15)})},style:te},{children:"+"}))]})),o&&n.jsx("div",e.__assign({style:{display:"flex",background:m?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:m?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:n.jsx("button",e.__assign({onClick:o,style:te},{children:l?n.jsx(d.default,{style:{fontSize:16}}):n.jsx(c.default,{style:{fontSize:16}})}))}))]}))]})),q&&n.jsx("div",e.__assign({style:{margin:"0 20px 14px",width:"30%",minWidth:280,borderRadius:12,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",border:"1px solid #e2e8f0",animation:"slideDown 0.2s ease-out"}},{children:function(){var t,r,i=q.node,a=null!==(t=G[i.cluster_id])&&void 0!==t?t:0;return Q.edges.filter(function(e){return e.source===i.id}).length,Q.edges.filter(function(e){return e.target===i.id}).length,n.jsxs("div",{children:[n.jsxs("div",e.__assign({style:{padding:"10px 14px",background:y[a%y.length||0],color:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[n.jsx("span",e.__assign({style:{width:28,height:28,borderRadius:8,background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14}},{children:p[a%p.length||0]})),n.jsxs("div",{children:[n.jsx("div",e.__assign({style:{fontSize:9,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.75}},{children:(null===(r=s.clusters[a])||void 0===r?void 0:r.label)||"Cluster Name"})),n.jsx("div",e.__assign({style:{fontSize:14,fontWeight:700,marginTop:1}},{children:i.label||"Cluster Name"}))]})]})),n.jsx("button",e.__assign({onClick:function(){B(null),H(null)},style:{background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:"×"}))]})),n.jsx("div",e.__assign({style:{padding:"10px 14px",fontSize:13,lineHeight:1.6,color:m?"#cbd5e1":"#475569",background:m?"#1e293b":"#fff"}},{children:i.description||"No description available..."}))]})}()}))]})),n.jsxs("div",e.__assign({ref:j,onPointerDown:Z,onPointerMove:$,onPointerUp:ee,onPointerLeave:ee,onClick:function(){Y(null),B(null),H(null)},style:{width:"100%",height:"100%",cursor:E?"grabbing":"grab",position:"relative"}},{children:[n.jsx("div",e.__assign({style:{transform:"translate(".concat(M.x,"px, ").concat(M.y,"px) scale(").concat(C,")"),transformOrigin:"top left",position:"absolute",top:l?70:50,left:20,transition:E?"none":"transform 0.08s ease-out"}},{children:n.jsxs("svg",e.__assign({width:Q.canvasW,height:Q.canvasH,style:{overflow:"visible"}},{children:[Q.clusterBounds.map(function(t){return n.jsxs("g",{children:[n.jsx("rect",{x:t.x,y:t.y,width:t.width,height:t.height,rx:"16",fill:m?"rgba(30, 41, 59, 0.35)":"none",stroke:m?"#334155":"#e2e8f0",strokeWidth:"1.5",strokeDasharray:"8 4"}),n.jsx("text",e.__assign({x:t.x+14,y:t.y+t.height-10,fontSize:"11",fill:"#94a3b8",fontFamily:"Inter, sans-serif",fontWeight:"500"},{children:t.label||"Cluster Name"}))]},t.id)}),Q.edges.map(function(t){var r=b(t,U,Q.edges);if(!r)return null;var i=J.has(t.id),a=(null==D?void 0:D.edge.id)===t.id,s=X===t.id,o=!!O&&!i,l=i||a?"#6366f1":s?"#818cf8":m?"#475569":"#cbd5e1",c=i||a?2.5:s?2:1.5;return n.jsxs("g",e.__assign({style:{opacity:o?.1:1,transition:"opacity 0.25s"}},{children:[n.jsx("path",{"data-edge-hit":"true",d:r,fill:"none",stroke:"transparent",strokeWidth:18,style:{cursor:"pointer"},onClick:function(e){return function(e,n){e.stopPropagation();var t=j.current.getBoundingClientRect();Y({edge:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),B(null),H(null)}(e,t)},onMouseEnter:function(){return N(t.id)},onMouseLeave:function(){return N(null)}}),n.jsx("path",{d:r,fill:"none",stroke:l,strokeWidth:c,style:{transition:"stroke 0.2s, stroke-width 0.2s",pointerEvents:"none"}}),(i||a)&&n.jsxs(n.Fragment,{children:[n.jsx("circle",e.__assign({r:4,fill:"#6366f1"},{children:n.jsx("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:r})})),n.jsx("circle",e.__assign({r:6,fill:"#6366f1",opacity:.2},{children:n.jsx("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:r})}))]})]}),t.id)}),Q.nodes.map(function(t){var r,i=O===t.id,a=K.has(t.id),s=!!O&&!a,o=(null!==(r=G[t.cluster_id])&&void 0!==r?r:0)%x.length,l=x[o||0];return n.jsx("g",e.__assign({"data-node":"true",onClick:function(e){return function(e,n){e.stopPropagation();var t=j.current.getBoundingClientRect();O===n.id?(H(null),B(null)):(H(n.id),B({node:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),Y(null))}(e,t)},style:{cursor:"pointer",opacity:s?.15:1,transition:"opacity 0.25s"}},{children:n.jsx("foreignObject",e.__assign({x:t.x,y:t.y,width:u,height:f},{children:n.jsxs("div",e.__assign({style:{background:m?"#1e293b":"#fff",border:i?"2.5px solid ".concat(l):m?"1.5px solid #334155":"1.5px solid #e2e8f0",borderRadius:10,padding:"8px 14px",fontSize:13,fontWeight:600,color:m?"#f1f5f9":"#334155",fontFamily:"'Inter', sans-serif",display:"flex",alignItems:"center",gap:8,boxShadow:i?"0 0 0 3px ".concat(l,"33, 0 2px 8px rgba(0,0,0,0.4)"):m?"0 2px 6px rgba(0,0,0,0.3)":"0 1px 3px rgba(0,0,0,0.05)",whiteSpace:"nowrap",userSelect:"none",height:46,boxSizing:"border-box",transition:"border 0.2s, box-shadow 0.2s"}},{children:[n.jsx("span",e.__assign({style:{width:22,height:22,borderRadius:6,background:g[o],display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,flexShrink:0,color:h[o]}},{children:p[o]})),n.jsx("span",e.__assign({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:t.label||"Node name"}))]}))}))}),t.id)})]}))})),D&&n.jsxs("div",e.__assign({onClick:function(e){return e.stopPropagation()},style:e.__assign(e.__assign({position:"absolute"},function(e,n,t,r){if(!j.current)return{};var i=j.current.getBoundingClientRect(),a=e+14,s=n-r/2;return a+t>i.width&&(a=e-t-14),s<8&&(s=8),s+r>i.height&&(s=i.height-r-8),{left:a,top:s}}(D.screenX,D.screenY,320,180)),{width:320,background:"#fff",borderRadius:14,boxShadow:"0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",border:"1px solid #e2e8f0",zIndex:30,animation:"popIn 0.18s ease-out",overflow:"hidden"})},{children:[n.jsxs("div",e.__assign({style:{padding:"12px 16px 10px",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",color:"#fff"}},{children:[n.jsx("div",e.__assign({style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.8}},{children:"Edge Reasoning"})),n.jsxs("div",e.__assign({style:{fontSize:13,fontWeight:600,marginTop:4}},{children:[(null===(i=U[D.edge.source])||void 0===i?void 0:i.label)||"Source",n.jsx("span",e.__assign({style:{opacity:.6,margin:"0 6px"}},{children:"→"})),(null===(a=U[D.edge.target])||void 0===a?void 0:a.label)||"Target"]}))]})),n.jsx("div",e.__assign({style:{padding:"12px 16px 14px",fontSize:13,lineHeight:1.6,color:"#475569",whiteSpace:"pre-line"}},{children:D.edge.reasoning||"No Reasoning available..."})),n.jsx("button",e.__assign({onClick:function(){return Y(null)},style:{position:"absolute",top:8,right:10,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"}},{children:"×"}))]}))]})),n.jsx("style",{children:"\n @keyframes popIn { from { opacity:0; transform:scale(0.95) translateY(4px); } to { opacity:1; transform:scale(1) translateY(0); } }\n @keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }\n "})]}))}var m=o.default.memo(function(r){var i=r.data,a=r.isDarkMode,s=void 0!==a&&a,o=r.style,c=t.useState(!1),d=c[0],u=c[1],f=t.useCallback(function(){u(!0)},[]),g=t.useCallback(function(){u(!1)},[]);return n.jsxs(n.Fragment,{children:[n.jsx("div",e.__assign({style:e.__assign({position:"relative",width:"100%",height:"500px"},o)},{children:n.jsx(_,{data:i,onFullscreen:f,isDarkMode:s})})),n.jsx(l.default,e.__assign({open:d,onClose:g,maxWidth:!1,PaperProps:{style:{width:"95vw",height:"92vh",maxWidth:"none",borderRadius:12,overflow:"hidden",background:s?"#090d16":"#ffffff"}}},{children:n.jsx("div",e.__assign({style:{width:"100%",height:"100%",position:"relative"}},{children:n.jsx(_,{data:i,onFullscreen:g,isFullscreen:!0,isDarkMode:s})}))}))]})});exports.default=m;
|
|
2
|
+
//# sourceMappingURL=DependencyGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyGraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),o=require("@mui/material");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(require("@monaco-editor/react")),a={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},d={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},u=function(i){var u=i.content,l=i.selectedTag,s=i.highlightVariable,g=i.isDarkMode,f=i.height,m=void 0===f?250:f,c=i.fontSize,h=void 0===c?12:c,p=t.useRef(),b=t.useRef();return t.useEffect(function(){if(l&&p.current&&b.current){var e=p.current,r=e.getModel();if(r){for(var t=r.getValue().split("\n"),o=-1,i=0;i<t.length;i++){var n=t[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===l.toLowerCase()){o=i+1;break}}if(o>0){var a=o,d="</".concat(l.toLowerCase(),">");for(i=o;i<t.length;i++)if(t[i].toLowerCase().includes(d)){a=i+1;break}e.setSelection(new b.current.Selection(o,1,o,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(o);var u=e.deltaDecorations([],[{range:new b.current.Range(o,1,a,t[a-1].length+1),options:{isWholeLine:!0,className:"promptemon-viewer-highlight",inlineClassName:"promptemon-viewer-highlight"}}]);setTimeout(function(){return e.deltaDecorations(u,[])},2e3)}}}},[l]),t.useEffect(function(){if(s&&p.current&&b.current){var e=p.current,r=e.getModel();if(r){for(var t=r.getValue().split("\n"),o=[],i=0;i<t.length;i++)for(var n=t[i].indexOf(s);-1!==n;)o.push(new b.current.Range(i+1,n+1,i+1,n+s.length+1)),n=t[i].indexOf(s,n+1);if(0!==o.length){e.revealLineInCenterIfOutsideViewport(o[0].startLineNumber);var a=e.deltaDecorations([],o.map(function(e){return{range:e,options:{inlineClassName:"promptemon-viewer-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(a,[])},2e3)}}}},[s]),t.useEffect(function(){b.current&&b.current.editor.setTheme(g?"promptemonViewerDark":"promptemonViewerLight")},[g]),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:"\n .promptemon-viewer-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-viewer-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),r.jsxs(o.Box,e.__assign({sx:{width:"100%",height:m,display:"flex",flexDirection:"column"}},{children:[r.jsx(o.Box,{sx:{width:"100%",height:20,bgcolor:g?"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),r.jsx(o.Box,e.__assign({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:r.jsx(n.default,{onMount:function(e,r){p.current=e,b.current=r,r.editor.defineTheme("promptemonViewerDark",a),r.editor.defineTheme("promptemonViewerLight",d),r.editor.setTheme(g?"promptemonViewerDark":"promptemonViewerLight"),r.languages.register({id:"promptemonViewerLang"}),r.languages.setMonarchTokensProvider("promptemonViewerLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),r.languages.registerFoldingRangeProvider("promptemonViewerLang",{provideFoldingRanges:function(e){var r=e.getLinesContent(),t=[],o=[];return r.forEach(function(e,r){var i=r+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),a=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&o.push({tag:n[1],start:i}),a)for(var d=a[1],u=o.length-1;u>=0;u--)if(o[u].tag===d){t.push({start:o[u].start,end:i}),o.splice(u,1);break}}),t}})},beforeMount:function(e){e.editor.defineTheme("promptemonViewerDark",a),e.editor.defineTheme("promptemonViewerLight",d),e.editor.setTheme(g?"promptemonViewerDark":"promptemonViewerLight")},theme:g?"promptemonViewerDark":"promptemonViewerLight",value:u,language:"promptemonViewerLang",onChange:function(){},options:{fontSize:h,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),r.jsx(o.Box,{sx:{width:"100%",height:20,bgcolor:g?"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})};exports.InternalEditor=u,exports.default=u;
|
|
2
|
+
//# sourceMappingURL=Internaleditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Internaleditor.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),i=require("react-markdown"),t=require("rehype-raw"),o=require("@mui/material"),a=require("react-syntax-highlighter"),l=require("react-syntax-highlighter/dist/esm/styles/prism"),s=require("@mui/icons-material"),d=require("@mui/icons-material/ExpandMoreOutlined"),c=require("./Cognitivereasoningpanel.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(r),f=u(i),g=u(t),h=u(d),v=function(e){var n,r,i;void 0===e&&(e="");var t=null==e?void 0:e.replace(/\\`/g,"`");return t=null==(t=null==(t=null===(i=null==(t=null===(r=null===(n=null==(t=null==t?void 0:t.replace(/```json\s*([\s\S]*?)```/g,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}))?void 0:t.replace(/^```.*\n?/,""))||void 0===n?void 0:n.replace(/\n?```$/,""))||void 0===r?void 0:r.trim())?void 0:t.replace(/^```/,""))||void 0===i?void 0:i.replace(/```$/,""))?void 0:t.replace(/<\/summary>/g,"</summary>\n"))?void 0:t.replace(/<details>/g,"\n<details>")},_=function(i){var t=i.text,o=r.useState(!1),a=o[0],l=o[1];return n.jsxs("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(t)];case 1:return e.sent(),l(!0),setTimeout(function(){return l(!1)},2e3),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})},"aria-label":"Copy code",style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",fontSize:"0.68rem",fontWeight:500,fontFamily:"inherit",color:a?"#16a34a":"#6B7280",background:a?"#f0fdf4":"#f3f4f6",border:"1px solid ".concat(a?"#bbf7d0":"#e5e7eb"),borderRadius:6,cursor:"pointer",transition:"all 0.2s",opacity:.85},onMouseEnter:function(e){e.currentTarget.style.opacity="1"},onMouseLeave:function(e){e.currentTarget.style.opacity="0.85"}},{children:[a?n.jsx(s.Check,{style:{fontSize:13}}):n.jsx(s.ContentCopy,{style:{fontSize:13}}),a?"Copied":"Copy"]}))},x=function(i){i.node;var t=e.__rest(i,["node"]),o=r.useState(!1),a=o[0],l=o[1],d=r.useRef(null),c=p.default.Children.toArray(t.children),u=c.find(function(e){var n;return null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-codebase-name"]}),f=!!u,g=f?u.props["data-codebase-name"]:"",h=c.map(function(e){var n;return"string"==typeof e?e:(null===(n=e.props)||void 0===n?void 0:n.children)||""}).join("").replace(/\*\*/g,"").trim(),v=f?"From ".concat(g," codebase"):h||"Accordion title not found";return r.useEffect(function(){var e,n=null===(e=d.current)||void 0===e?void 0:e.parentElement;if(n){var r=function(){return l(n.open)};return r(),n.addEventListener("toggle",r),function(){return n.removeEventListener("toggle",r)}}},[]),n.jsxs("summary",e.__assign({ref:d,style:{padding:"8px 12px",listStyleType:"none",cursor:"pointer",fontWeight:600,fontSize:"0.82rem",color:"#6932E2",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,borderRadius:8,background:a?"#f5f3ff":"transparent",transition:"background 0.2s"}},{children:[n.jsx("span",{children:v}),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",flexShrink:0,color:"#6932E2"}},{children:a?n.jsx(s.ExpandLess,{sx:{fontSize:"1.1rem"}}):n.jsx(s.ExpandMore,{sx:{fontSize:"1.1rem"}})}))]}))},m=function(i){var t=i.message,s=i.fontSize,d=i.extraMetaData,u=i.isDarkMode,m=void 0!==u&&u,b=i.style,y=i.sx,j=null!=s?s:"0.88rem",S=m?"#e2e8f0":"#1f2937",k=m?"#f8fafc":"#111827",w=r.useState({open:!1,data:null,activeKey:null}),M=w[0],C=w[1],z=function(){return C({open:!1,data:null,activeKey:null})},R=r.useMemo(function(){var e=function(e){var n={};return{processed:e.replace(/<!--\s*<ai_reasoning>\s*([\s\S]*?)\s*<\/ai_reasoning>\s*-->/g,function(e,r){try{var i=JSON.parse(r.trim()),t=i.id||"reasoning_".concat(Object.keys(n).length);return n[t]=i,'<aireasoning data-reasoning-key="'.concat(t,'">').concat(t,"</aireasoning>")}catch(e){return console.warn("[ai_reasoning] Failed to parse block:",e),""}}),reasoningMap:n}}(t||"");return{processedMessage:e.processed,inlineReasoningMap:e.reasoningMap}},[t]),W=R.processedMessage,E=R.inlineReasoningMap,q=r.useMemo(function(){return{aireasoning:function(r){r.node;var i=e.__rest(r,["node"])["data-reasoning-key"],t=E[i];if(!t)return null;var a=M.open&&M.activeKey===i;return n.jsxs("div",e.__assign({style:{margin:"6px 0"}},{children:[n.jsxs("span",e.__assign({onClick:function(e){e.stopPropagation();var n=function(e){var n,r,i,t,o,a=[];return(null!==(r=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==r?r:[]).forEach(function(e){var n,r,i,t,o,l,s,d,c,u,p=null!==(r=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==r?r:[],f=null!==(t=null===(i=e.customMetadata)||void 0===i?void 0:i.training_data_title)&&void 0!==t?t:[],g=null!==(l=null===(o=e.customMetadata)||void 0===o?void 0:o.paraphrase)&&void 0!==l?l:[],h=null===(s=p[0])||void 0===s?void 0:s.match(/<highlight>([\s\S]*?)<\/highlight>/),v=h?h[1].trim():null!==(d=p[0])&&void 0!==d?d:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(c=f[0])&&void 0!==c?c:"",paraphrase:null!==(u=g[0])&&void 0!==u?u:"",highlight:v})}),{block_cognitive_reasoning_html:null!==(i=e.reasoning)&&void 0!==i?i:"",block_cognitive_gap_html:null!==(t=e.Gap)&&void 0!==t?t:"",block_cognitive_confidence:Number(null!==(o=e.decision_strength)&&void 0!==o?o:0),block_cognitive_citations:a}}(t);C(function(e){return e.open&&e.activeKey===i?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:i}})},style:{display:"inline-flex",alignItems:"center",gap:6,cursor:"pointer",color:m?"#a78bfa":"#6932E2",fontWeight:500,fontSize:j,transition:"all 0.2s",padding:"2px 0"}},{children:[n.jsx("span",{children:i}),n.jsx("span",e.__assign({style:{display:"inline-flex",alignItems:"center",gap:2,border:m?"1px solid #334155":"1px solid #e2e8f0",borderRadius:5,padding:"4px 2px"}},{children:n.jsx(h.default,{sx:{fontSize:"1rem",color:m?"#94a3b8":"#475569",transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})}))]})),a&&M.data&&n.jsx(o.Box,e.__assign({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:n.jsx(c.default,{open:!0,onClose:z,data:M.data})}))]}))},codebasename:function(r){var i=r.children,t=("string"==typeof i[0]?i[0]:"").trim();return""!==t?n.jsxs("div",e.__assign({"data-codebase-name":t,style:{position:"relative",margin:"12px 0"}},{children:[n.jsx(_,{text:String(i).replace(/\n$/,"")}),n.jsx(a.Prism,e.__assign({style:l.oneLight,language:"json",PreTag:"div",customStyle:{borderRadius:8,padding:"1rem",fontSize:"0.8rem",border:m?"1px solid #334155":"1px solid #e5e7eb",margin:0,lineHeight:1.6}},{children:String(i).replace(/\n$/,"")}))]})):n.jsx(n.Fragment,{})},details:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("details",e.__assign({},i,{style:{borderRadius:8,border:m?"1px solid #334155":"1px solid #e9e5f5",backgroundColor:"transparent",margin:"8px 0",overflow:"hidden"}},{children:i.children}))},summary:x,p:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("p",e.__assign({style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",maxWidth:"100%",fontSize:j,lineHeight:1.7,margin:"4px 0",color:S}},{children:null==i?void 0:i.children}))},strong:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("strong",e.__assign({style:{fontWeight:650,color:k}},{children:null==i?void 0:i.children}))},h1:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("h1",e.__assign({style:{fontSize:"1.35rem",fontWeight:700,color:k,margin:"20px 0 8px",lineHeight:1.3,letterSpacing:"-0.01em"}},{children:i.children}))},h2:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("h2",e.__assign({style:{fontSize:"1.15rem",fontWeight:650,color:k,margin:"16px 0 6px",lineHeight:1.35}},{children:i.children}))},h3:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("h3",e.__assign({style:{fontSize:"1rem",fontWeight:600,color:k,margin:"14px 0 4px",lineHeight:1.4}},{children:i.children}))},h4:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("h4",e.__assign({style:{fontSize:"0.92rem",fontWeight:600,color:S,margin:"12px 0 4px",lineHeight:1.4}},{children:i.children}))},ol:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("ol",e.__assign({style:{listStyleType:"decimal",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==i?void 0:i.children}))},ul:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("ul",e.__assign({style:{listStyleType:"disc",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==i?void 0:i.children}))},li:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("li",e.__assign({style:{fontSize:j,lineHeight:1.7,color:S,paddingLeft:4}},{children:i.children}))},blockquote:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("blockquote",e.__assign({style:{margin:"12px 0",padding:"8px 16px",borderLeft:"3px solid #8b5cf6",background:m?"#1e1b4b":"#faf5ff",borderRadius:"0 6px 6px 0",color:m?"#cbd5e1":"#4b5563",fontStyle:"italic",fontSize:j,lineHeight:1.65}},{children:i.children}))},hr:function(){return n.jsx("hr",{style:{border:"none",height:1,background:m?"linear-gradient(to right, transparent, #334155, transparent)":"linear-gradient(to right, transparent, #d1d5db, transparent)",margin:"16px 0"}})},table:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("div",e.__assign({style:{overflowX:"auto",margin:"12px 0",borderRadius:8,border:m?"1px solid #334155":"1px solid #e5e7eb"}},{children:n.jsx("table",e.__assign({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem",lineHeight:1.5}},{children:i.children}))}))},thead:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("thead",e.__assign({style:{background:m?"#1e293b":"#f9fafb",borderBottom:m?"2px solid #334155":"2px solid #e5e7eb"}},{children:i.children}))},th:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("th",e.__assign({style:{padding:"8px 12px",textAlign:"left",fontWeight:600,fontSize:"0.76rem",color:m?"#cbd5e1":"#374151",whiteSpace:"nowrap"}},{children:i.children}))},td:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("td",e.__assign({style:{padding:"8px 12px",borderTop:m?"1px solid #334155":"1px solid #f3f4f6",color:m?"#94a3b8":"#4b5563",fontSize:"0.8rem"}},{children:i.children}))},a:function(r){var i=r.children;r.node;var t=e.__rest(r,["children","node"]),a=t["data-cognitive-reasoning"];if(a&&(null==d?void 0:d[a]))return n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({onClick:function(e){e.stopPropagation();var n=function(e){var n,r,i,t,o;if(!e)return null;var a=[];return(null!==(r=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==r?r:[]).forEach(function(e){var n,r,i,t,o,l,s,d,c,u,p=null!==(r=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==r?r:[],f=null!==(t=null===(i=e.customMetadata)||void 0===i?void 0:i.training_data_title)&&void 0!==t?t:[],g=null!==(l=null===(o=e.customMetadata)||void 0===o?void 0:o.paraphrase)&&void 0!==l?l:[],h=null===(s=p[0])||void 0===s?void 0:s.match(/<highlight>([\s\S]*?)<\/highlight>/),v=h?h[1].trim():null!==(d=p[0])&&void 0!==d?d:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(c=f[0])&&void 0!==c?c:"",paraphrase:null!==(u=g[0])&&void 0!==u?u:"",highlight:v})}),{block_cognitive_reasoning_html:null!==(i=e.Reasoning)&&void 0!==i?i:"",block_cognitive_gap_html:null!==(t=e.Gap)&&void 0!==t?t:"",block_cognitive_confidence:Number(null!==(o=e.Confidence_score)&&void 0!==o?o:0),block_cognitive_citations:a}}(d[a]);C(function(e){return e.open&&e.activeKey===a?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:a}})},style:{color:m?"#a78bfa":"#6932E2",fontWeight:500,cursor:"pointer",transition:"all 0.2s",padding:"0 2px",position:"relative",display:"flex",alignItems:"center",gap:6,width:"fit-content"}},{children:[i||"",n.jsx("span",e.__assign({style:{cursor:"pointer",padding:"4px 2px",display:"flex",alignItems:"center",gap:2,border:m?"1px solid #334155":"1px solid #e2e8f0",borderRadius:"5px",width:"fit-content"}},{children:n.jsx(h.default,{sx:{fontSize:"1rem",color:m?"#94a3b8":"#475569",transition:"transform 0.2s"}})}))]})),M.open&&M.activeKey===a&&M.data&&n.jsx(o.Box,e.__assign({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:n.jsx(c.default,{open:!0,onClose:z,data:M.data})}))]});var l=!1;try{l=new URL(null==t?void 0:t.href).protocol.startsWith("http")}catch(e){l=!1}return l?n.jsx("a",e.__assign({href:null==t?void 0:t.href,style:{color:m?"#a78bfa":"#6932E2",textDecoration:"none",fontWeight:500,borderBottom:m?"1px solid #7c3aed":"1px solid #c4b5fd",transition:"border-color 0.2s, color 0.2s"},target:"_blank",rel:"noopener noreferrer",onMouseEnter:function(e){e.currentTarget.style.borderBottomColor=m?"#a78bfa":"#6932E2"},onMouseLeave:function(e){e.currentTarget.style.borderBottomColor=m?"#7c3aed":"#c4b5fd"}},{children:i})):n.jsx("span",{children:i})},sup:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx(o.Tooltip,e.__assign({title:i.children,placement:"top",arrow:!0},{children:n.jsx(o.Box,e.__assign({component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:m?"#3730a3":"#ede9fe",color:m?"#c084fc":"#7c3aed",fontSize:"0.6rem",fontWeight:700,verticalAlign:"super",cursor:"pointer",userSelect:"none",lineHeight:1,transition:"all 0.2s","&:hover":{background:m?"#6d28d9":"#7c3aed",color:"#fff"}},"aria-label":"Info",role:"button"},{children:"i"}))}))},code:function(r){var i=r.children;return n.jsx("code",e.__assign({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.82em",color:m?"#e9d5ff":"#9333ea",background:m?"#2e1065":"#faf5ff",padding:"1.5px 5px",borderRadius:4,border:m?"1px solid #581c87":"1px solid #f3e8ff",fontWeight:500}},{children:i}))},pre:function(r){var i=r.children,t=function(e){var n;return"string"==typeof e?e:(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?(Array.isArray(e.props.children)?e.props.children:[e.props.children]).map(t).join(""):""},o=p.default.Children.toArray(i).map(t).join("");return n.jsxs("div",e.__assign({style:{position:"relative",margin:"12px 0"}},{children:[n.jsx(_,{text:o}),n.jsx("pre",e.__assign({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.8rem",lineHeight:1.6,color:S,background:m?"#0f172a":"#f9fafb",border:m?"1px solid #334155":"1px solid #e5e7eb",borderRadius:8,padding:"14px 16px",margin:0,overflowX:"auto",whiteSpace:"pre"}},{children:i}))]}))},img:function(r){r.node;var i=e.__rest(r,["node"]);return n.jsx("img",e.__assign({},i,{style:{maxWidth:"100%",height:"auto",borderRadius:8,margin:"8px 0",border:m?"1px solid #334155":"1px solid #e5e7eb"},loading:"lazy"}))}}},[t,j,d,M.activeKey,M.open,E,m,S,k]);return n.jsx(o.Box,e.__assign({className:"pg-markdown-renderer",style:b,sx:e.__assign(e.__assign({fontSize:j,lineHeight:1.7,color:S,wordBreak:"break-word",position:"relative"},y),{"& span[style*='color'], & font[color]":m?{color:"#60a5fa !important"}:{},"& a":{color:m?"#a78bfa !important":"#6932E2 !important"},"& strong":{color:m?"#f8fafc !important":"#111827 !important"},"& h1, & h2, & h3, & h4, & h5, & h6":{color:m?"#f1f5f9 !important":"#111827 !important"}})},{children:n.jsx(f.default,e.__assign({components:q,rehypePlugins:[g.default],className:"react-markdown-renderer-with-overrides"},{children:v(W)}))}))};exports.MarkdownRenderer=m,exports.default=m;
|
|
2
|
+
//# sourceMappingURL=Markdownrenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdownrenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),o=require("@mui/material"),s=require("@mui/icons-material/ExpandMore"),t=require("@mui/icons-material/Fullscreen"),r=require("@mui/icons-material/Close"),l=require("@mui/icons-material/NearMeOutlined"),a=require("@mui/icons-material/ChevronLeft"),d=require("@mui/icons-material/ChevronRight"),c=require("./DependencyGraph.js"),x=require("./Markdownrenderer.js"),p=require("./Internaleditor.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=h(s),g=h(t),f=h(r),_=h(l),m=h(a),y=h(d),j=function(s){var t=s.text,r=s.detailedSummary,l=s.extraMetaData,a=s.isDarkMode,d=void 0!==a&&a,c=s.markdownRendererStyle,p=n.useState(!1),h=p[0],u=p[1],g=function(e,i){void 0===i&&(i=220);var n=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(n.length<=i)return{preview:n,truncated:!1};var o=n.slice(0,i),s=o.lastIndexOf(" ");return{preview:(s>0?o.slice(0,s):o).trim(),truncated:!0}}(t),f=g.preview,_=g.truncated;return i.jsx(o.Box,{children:h?i.jsxs(o.Box,{children:[i.jsx(x.MarkdownRenderer,{message:t,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),(null==r?void 0:r.trim())&&i.jsx(x.MarkdownRenderer,{message:r,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:d?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[f,_&&"…"]})),(_||(null==r?void 0:r.trim()))&&i.jsx(o.Box,e.__assign({sx:{display:"flex",justifyContent:"flex-end"}},{children:i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},v=function(s){var t=s.text,r=n.useState(!1),l=r[0],a=r[1],d=n.useState(!1),c=d[0],x=d[1],p=n.useRef(null);return n.useEffect(function(){var e=p.current;e&&x(e.scrollWidth>e.clientWidth)},[t]),i.jsx(o.Box,e.__assign({sx:{pl:1}},{children:l?i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[t," ",i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return a(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]})):i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({ref:p,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:t})),c&&i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return a(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))};exports.default=function(s){var t,r=s.promptContent,l=s.promptTitle,a=s.isLoading,d=void 0!==a&&a,h=s.overviewSummary,b=s.functionalityOfSPB,S=void 0===b?[]:b,w=s.spbAdditionalInfo,B=s.showCodePanel,k=void 0===B||B,E=s.showCollapseStrip,z=void 0===E||E,D=s.showFullscreenButton,T=void 0===D||D,A=s.showFullscreenModal,M=void 0===A||A,C=s.showThemeToggle,R=void 0===C||C,F=s.isDarkMode,I=void 0===F||F,W=s.styles,H=s.className,P=s.style,L=s.sx,q=n.useState(null),O=q[0],G=q[1],N=n.useState(null),X=N[0],Y=N[1],J=n.useState(""),K=J[0],Q=J[1],U=void 0!==(null==W?void 0:W.isDarkMode)?W.isDarkMode:I,V=n.useState(U),Z=V[0],$=V[1],ee=n.useState(null),ie=ee[0],ne=ee[1];n.useEffect(function(){void 0!==(null==W?void 0:W.isDarkMode)&&$(W.isDarkMode)},[null==W?void 0:W.isDarkMode]);var oe=n.useState(!1),se=oe[0],te=oe[1],re=n.useState(480),le=re[0],ae=re[1],de=n.useRef(!1),ce=n.useRef(null);n.useEffect(function(){var e,i,n;S.length>0&&G((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),n=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(n||"")))},[S]),n.useEffect(function(){d&&G(null)},[d]),n.useEffect(function(){ie&&(Q(""),setTimeout(function(){return Q(ie.ref)},500))},[ie]);return i.jsxs(o.Box,e.__assign({className:H,style:e.__assign(e.__assign({},null==W?void 0:W.root),P),sx:e.__assign({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},L)},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==W?void 0:W.header)},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==W?void 0:W.headerTitle)},{children:l||"SPB Analysis"})),i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:"0.7rem",color:"#9CA3AF"},null==W?void 0:W.headerSubtitle)},{children:O?"Last Analyzed at ".concat(O):""}))]}))})),i.jsxs(o.Box,e.__assign({ref:ce,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({width:k?se&&z?0:le:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:de.current?"none":"width 0.15s",borderRight:!k||se&&z?"none":"1px solid #e5e7eb"},null==W?void 0:W.leftPanel)},{children:i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==W?void 0:W.overviewSection)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==W?void 0:W.overviewTitle)},{children:"Overview"})),i.jsx(o.Box,e.__assign({sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==W?void 0:W.overviewContent)},{children:(null===(t=null==h?void 0:h.overallSummary)||void 0===t?void 0:t.trim())?i.jsx(j,{text:h.overallSummary,detailedSummary:h.detailedSummary,extraMetaData:h.extraMetaData,isDarkMode:Z,markdownRendererStyle:null==W?void 0:W.markdownRenderer}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"95%",height:14})]}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==W?void 0:W.functionalitySection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==W?void 0:W.functionalityTitle)},{children:"Functionality of SPB"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:S.length>0?S.map(function(n,s){return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:0===s,sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==W?void 0:W.functionalityItem)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i.jsxs(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[s+1,". ",n.name||n.section_name]}))})),i.jsxs(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:n.description||n.reason_for_inclusion})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,s){var t="string"==typeof n?n:n.apb_name,r=X===t;return i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i.jsxs(o.Box,e.__assign({onClick:function(){return function(e){X===e?(Y(null),Q("")):(Y(e),Q(""),setTimeout(function(){return Q(e)},50))}(t)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.78rem",color:r?"#5928ed":"#DB2877",fontWeight:500}},{children:[s+1,". ",t]})),i.jsx(_.default,{sx:{fontSize:"0.75rem",color:r?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&i.jsx(v,{text:n.description||n.context||""})]}),s)})}))]}))]}),s)}):i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"40%",height:16}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==W?void 0:W.applicabilitySection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==W?void 0:W.applicabilityTitle)},{children:"Applicability"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:i.jsx(o.Box,e.__assign({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==w?void 0:w.when_to_apply},{label:"When NOT to apply",content:null==w?void 0:w.when_not_to_apply}].map(function(n){var s=n.label,t=n.content;return i.jsxs(o.Box,e.__assign({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:s})),t?i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:t,isDarkMode:Z,style:null==W?void 0:W.markdownRenderer}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),s)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==W?void 0:W.specificationsSection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==W?void 0:W.specificationsTitle)},{children:"Specifications"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==w?void 0:w.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==w?void 0:w.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==w?void 0:w.output_analysis}].map(function(n){var s=n.label,t=n.tooltip,r=n.content,l="Output"===s,a=l&&r?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,n){return i.push(n.trim()),""}).trim(),code:i.join("\n\n")}}(r):null,c=a?a.text:r,h=a?a.code:"";return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===s,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:s})),t&&i.jsx(o.Tooltip,e.__assign({title:t,placement:"top"},{children:i.jsx(o.Box,e.__assign({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.25,pb:1.25,pt:0}},{children:r?i.jsxs(i.Fragment,{children:[c&&i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:c,isDarkMode:Z,style:null==W?void 0:W.markdownRenderer}),l&&h&&i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i.jsxs(o.Box,e.__assign({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Typography,e.__assign({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),i.jsx(o.Tooltip,e.__assign({title:"Copy Code to clipboard"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return e=h,navigator.clipboard.writeText(e);var e}},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),i.jsx(o.Box,e.__assign({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:i.jsx(p.InternalEditor,{content:h,isDarkMode:Z,height:"100%",fontSize:10})}))]}))]}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"75%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),s)})}))]})),i.jsxs(o.Accordion,e.__assign({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==W?void 0:W.dependencyGraphSection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==W?void 0:W.dependencyGraphTitle)},{children:"Dependency Graph"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:0,pb:0,pt:0}},{children:(null==w?void 0:w.dependency_graph)?i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[i.jsx(o.Box,e.__assign({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:i.jsx(c.default,{data:w.dependency_graph,isDarkMode:Z,style:null==W?void 0:W.dependencyGraph})})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[i.jsx(o.Skeleton,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),k&&z&&i.jsx(o.Box,e.__assign({onClick:function(){return te(function(e){return!e})},sx:e.__assign({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==W?void 0:W.collapseStrip)},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),k&&z&&i.jsx(o.Box,e.__assign({onClick:function(){return te(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),de.current=!0;var i=function(e){if(de.current&&ce.current){var o=ce.current.getBoundingClientRect(),s=o.left,t=o.width,r=e.clientX-s;if(r<200)return te(!0),de.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",n);r>.7*t||(te(!1),ae(r))}},n=function(){de.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},sx:e.__assign({position:"absolute",left:se?20:le+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==W?void 0:W.dragHandle)},{children:se?i.jsx(y.default,{sx:{fontSize:12,color:"#6b7280"}}):i.jsx(m.default,{sx:{fontSize:12,color:"#6b7280"}})})),k&&i.jsxs(o.Box,e.__assign({sx:e.__assign({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==W?void 0:W.codePanel)},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==W?void 0:W.codePanelHeader)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:13,fontWeight:600,color:"#374151"},null==W?void 0:W.codePanelTitle)},{children:l||"SPB Analysis"})),i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[R&&i.jsx(o.Switch,{checked:Z,onChange:function(e){return $(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),T&&M&&i.jsx(o.Tooltip,e.__assign({title:"Fullscreen",placement:"top"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return ne({ref:K||"",description:""})},sx:{color:"#6b7280"}},{children:i.jsx(g.default,{sx:{fontSize:16}})}))}))]}))]})),i.jsx(o.Box,e.__assign({sx:e.__assign({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==W?void 0:W.editorContainer)},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:K,isDarkMode:Z,height:"100%",fontSize:13})}))]}))]})),M&&i.jsxs(o.Dialog,e.__assign({open:!!ie,onClose:function(){return ne(null)},maxWidth:!1,PaperProps:{sx:e.__assign({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==W?void 0:W.fullscreenModal)}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return ne(null)}},{children:i.jsx(f.default,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i.jsxs(o.Box,e.__assign({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[i.jsx(o.Tooltip,e.__assign({title:"Atomic Prompt Block",placement:"top"},{children:i.jsx(o.Chip,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==ie?void 0:ie.ref}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==ie?void 0:ie.description}))]})),i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:r.split("\n").length}))]}))]}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),i.jsx(o.Switch,{checked:Z,onChange:function(e){return $(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),i.jsx(o.Box,e.__assign({sx:{flex:1,minHeight:0,p:1.5}},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:K,isDarkMode:Z,height:"100%",fontSize:13})}))]}))]}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=Spbanalysispanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spbanalysispanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),p=require("./features/ChatCitation/ChatCitationRenderer.js"),l=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),d=require("./features/PdfViewer/PdfViewer.js"),f=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),x=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),g=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),m=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),c=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),q=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),j=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/TableCitation/TableCitationContent.js"),S=require("./features/CitationViewer/CitationsViewer.js"),w=require("./features/ExcelCitation/ExcelCitations.js"),I=require("./features/ScannedDocCitation/ScannedDocCitation.js"),P=require("./features/ChatDrawer/ChatDrawer.js"),T=require("./features/ChatDrawer/constants/ChatDrawer.js"),D=require("./features/SplitterCitations/SplitterCitationsComponent.js"),b=require("./features/DualCitation/SourceBQDataCompnent.js"),A=require("./features/CognitiveCompare/CognitiveCompare.js"),E=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),V=require("./features/TextualGuidelines/TextualGuideLinesComponent.js"),W=require("./features/RulebookCitations/RuleBookCitationWrapper.js"),h=require("./features/IngestionStatus/IngestionStatusComponent.js"),B=require("./features/ManageRemainders/ManageReminders.js"),k=require("./features/PromptemonBlockViewer/PromptemonBlockViewer.js"),v=require("./features/PromptemonViewer/PromptemonViewer.js"),F=require("./features/SPBAnalysisPanel/Spbanalysispanel.js"),G=require("./features/GptWebCitation/GptWebCitation.js"),U=require("./hooks/useOnDemandCitationFetch.js"),_=require("./features/InstantLearningCitation/InstantLearningCitationComponent.js"),M=require("./features/BPACitationRenderer/BPACitationRenderer.js"),y=require("./features/GptWebCitation/utils/citationData.utils.js"),L=require("./features/GptWebCitation/types.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=r.default,exports.PdfCitation=o.PdfEditorCitation,exports.CitationRenderer=n.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.InternalgptReasoningComponent=C.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=p.default,exports.CognitiveDecisioningCard=l.default,exports.PdfViewer=d.default,exports.FaqCitation=f.default,exports.ImageCitationContent=x.default,exports.VideoCitationContent=g.default,exports.FileCitationContent=m.default,exports.WebCitationWithImageContent=c.default,exports.MarkdownWithImageCitation=q.default,exports.AiReasoningCitation=j.default,exports.TableCitationContent=R.default,exports.CitationsViewer=S.default,exports.ExcelCitation=w.default,exports.ScannedDocCitation=I.default,exports.ChatDrawer=P.default,exports.FILE_INGESTION_STATUS=T.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=T.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=T.TRUNCATE_THRESHOLD,exports.SplitterCitationsComponent=D.default,exports.SourcesBQCitation=b.SourcesBQCitation,exports.findSourceCitation=b.findSourceCitation,exports.parseSourcesBQHref=b.parseSourcesBQHref,exports.CognitiveCompare=A.default,exports.CognitiveInternalgptCoreComponent=E.default,exports.TextualGuideLinesComponent=V.default,exports.RuleBookCitationWrapper=W.default,exports.IngestionStatusChip=h.IngestionStatusChip,exports.IngestionStatusComponent=h.IngestionStatusComponent,exports.ManageReminders=B.ManageReminders,exports.PromptemonBlockViewer=k.default,exports.PromptemonViewer=v.default,exports.SPBAnalysisPanel=F.default,exports.GptWebCitation=G.default,exports.useOnDemandCitationFetch=U.useOnDemandCitationFetch,exports.InstantLearningCitationWrapper=_.default,exports.BPACitationRenderer=M.default,exports.extractLearnedFromUrl=y.extractLearnedFromUrl,exports.extractRelevanceScoreFromContent=y.extractRelevanceScoreFromContent,exports.extractTopicFromContent=y.extractTopicFromContent,exports.getWebCitationImageUrl=y.getWebCitationImageUrl,exports.mapCitationDataToDisplay=y.mapCitationDataToDisplay,exports.resolveSkeletonVisitUrl=y.resolveSkeletonVisitUrl,exports.sanitizeExternalUrl=y.sanitizeExternalUrl,Object.defineProperty(exports,"CitationType",{enumerable:!0,get:function(){return L.CitationType}}),exports.allowsGptCitationView=L.allowsGptCitationView,exports.allowsWebCitationView=L.allowsWebCitationView,exports.showsCitationViewToggle=L.showsCitationViewToggle;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as r,Fragment as o,jsx as t}from"react/jsx-runtime";import{useState as i,
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as r,Fragment as o,jsx as t}from"react/jsx-runtime";import{useState as i,useEffect as n,useRef as l}from"react";import{Box as a,Typography as d,Tooltip as s,Dialog as c,IconButton as f,Chip as h}from"@mui/material";import g from"@mui/icons-material/Close";import u from"@mui/icons-material/Fullscreen";import m from"@monaco-editor/react";import p from"@mui/icons-material/DarkMode";import b from"@mui/icons-material/LightMode";var x={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},v={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},k=function(r){var o=r.isDarkMode,i=r.onChange;return t(a,e({onClick:function(){return i(!o)},sx:{width:52,height:24,borderRadius:"12px",bgcolor:o?"#5928ed":"#f0f0f0",border:"1px solid",borderColor:o?"#5928ed":"#d1d5db",display:"flex",alignItems:"center",px:.4,cursor:"pointer",transition:"all 0.2s",justifyContent:o?"flex-end":"flex-start"}},{children:t(a,e({sx:{width:18,height:18,borderRadius:"50%",bgcolor:o?"#1e1e2e":"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"}},{children:t(o?p:b,{sx:{fontSize:11,color:"#fff"}})}))}))},w=function(i){var d=i.content,s=i.selectedTag,c=i.highlightVariable,f=i.isDarkMode,h=i.height,g=void 0===h?250:h,u=i.fontSize,p=void 0===u?12:u,b=i.editorBackgroundColor,k=l(),w=l(),y=function(){return b?e(e({},x),{colors:e(e({},x.colors),{"editor.background":b})}):x};return n(function(){if(s&&k.current&&w.current){var e=k.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=-1,i=0;i<o.length;i++){var n=o[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===s.toLowerCase()){t=i+1;break}}if(t>0){var l=t,a="</".concat(s.toLowerCase(),">");for(i=t;i<o.length;i++)if(o[i].toLowerCase().includes(a)){l=i+1;break}e.setSelection(new w.current.Selection(t,1,t,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(t);var d=e.deltaDecorations([],[{range:new w.current.Range(t,1,l,o[l-1].length+1),options:{isWholeLine:!0,className:"promptemon-highlight",inlineClassName:"promptemon-highlight"}}]);setTimeout(function(){return e.deltaDecorations(d,[])},2e3)}}}},[s]),n(function(){if(c&&k.current&&w.current){var e=k.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=[],i=0;i<o.length;i++)for(var n=o[i].indexOf(c);-1!==n;)t.push(new w.current.Range(i+1,n+1,i+1,n+c.length+1)),n=o[i].indexOf(c,n+1);if(0!==t.length){e.revealLineInCenterIfOutsideViewport(t[0].startLineNumber);var l=e.deltaDecorations([],t.map(function(e){return{range:e,options:{inlineClassName:"promptemon-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(l,[])},2e3)}}}},[c]),n(function(){w.current&&w.current.editor.setTheme(f?"promptemonDark":"promptemonLight")},[f]),r(o,{children:[t("style",{children:"\n .promptemon-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),r(a,e({sx:{width:"100%",height:g,display:"flex",flexDirection:"column"}},{children:[t(a,{sx:{width:"100%",height:20,bgcolor:f?b||"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),t(a,e({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:t(m,{onMount:function(e,r){k.current=e,w.current=r,r.editor.defineTheme("promptemonDark",y()),r.editor.defineTheme("promptemonLight",v),r.editor.setTheme(f?"promptemonDark":"promptemonLight"),r.languages.register({id:"promptemonLang"}),r.languages.setMonarchTokensProvider("promptemonLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),r.languages.registerFoldingRangeProvider("promptemonLang",{provideFoldingRanges:function(e){var r=e.getLinesContent(),o=[],t=[];return r.forEach(function(e,r){var i=r+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),l=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&t.push({tag:n[1],start:i}),l)for(var a=l[1],d=t.length-1;d>=0;d--)if(t[d].tag===a){o.push({start:t[d].start,end:i}),t.splice(d,1);break}}),o}})},beforeMount:function(e){e.editor.defineTheme("promptemonDark",y()),e.editor.defineTheme("promptemonLight",v),e.editor.setTheme(f?"promptemonDark":"promptemonLight")},theme:f?"promptemonDark":"promptemonLight",value:d,language:"promptemonLang",onChange:function(){},options:{fontSize:p,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),t(a,{sx:{width:"100%",height:20,bgcolor:f?b||"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})},y=function(l){var m=l.title,p=l.description,b=l.content,x=l.height,v=void 0===x?250:x,y=l.selectedTag,C=l.highlightVariable,F=l.className,L=l.style,z=l.showThemeToggle,B=void 0===z||z,S=l.theme,D=void 0===S?"dark":S,R=l.editorBackgroundColor,E=l.fontSize,T=void 0===E?12:E,I=l.titleFontSize,A=l.titleStyle,M=i("dark"===D),W=M[0],N=M[1],V=i(!1),P=V[0],j=V[1];return n(function(){N("dark"===D)},[D]),r(o,{children:[r(a,e({className:F,style:L,sx:{border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:[r(a,e({sx:{px:1.5,py:.75,bgcolor:W?R||"#030202":"#f9fafb",borderBottom:W?"1px solid #333":"1px solid #e5e7eb",display:"flex",alignItems:"center",justify:"space-between"}},{children:[t(d,e({style:A,sx:{fontSize:I||"0.72rem",color:W?"#e5e7eb":"#374151",fontWeight:600}},{children:m})),r(a,e({sx:{display:"flex",alignItems:"center",gap:.75}},{children:[B&&t(k,{isDarkMode:W,onChange:N}),t(s,e({title:"Fullscreen",placement:"top"},{children:t(a,e({onClick:function(){return j(!0)},sx:{cursor:"pointer",display:"flex",alignItems:"center",p:.3,borderRadius:"4px","&:hover":{bgcolor:W?"#333":"#e5e7eb"}}},{children:t(u,{sx:{fontSize:"0.9rem",color:W?"#9ca3af":"#6b7280"}})}))}))]}))]})),t(a,e({sx:{height:v,bgcolor:W?R||"#030202":"#fff"}},{children:t(w,{content:b,selectedTag:y,highlightVariable:C,isDarkMode:W,height:v,fontSize:T,editorBackgroundColor:R})}))]})),r(c,e({open:P,onClose:function(){return j(!1)},maxWidth:!1,PaperProps:{sx:{width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"}}},{children:[r(a,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[t(d,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:m})),t(f,e({size:"small",onClick:function(){return j(!1)}},{children:t(g,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),r(a,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[p&&r(a,e({sx:{width:"35%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r(a,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[t(h,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}}),t(d,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:m}))]})),t(a,e({sx:{flex:1,p:2,overflowY:"auto"}},{children:r(a,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[t(d,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),t(d,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:p}))]}))}))]})),r(a,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r(a,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(d,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),B&&t(k,{isDarkMode:W,onChange:N})]})),t(a,e({sx:{flex:1,minHeight:0,p:1.5}},{children:t(w,{content:b,selectedTag:y,highlightVariable:C,isDarkMode:W,height:"100%",fontSize:13})}))]}))]}))]}))]})};export{y as default};
|
|
2
2
|
//# sourceMappingURL=PromptemonBlockViewer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as o,useMemo as t}from"react";import{Box as r}from"@mui/system";import{Typography as l,Chip as a,IconButton as c,Accordion as d,AccordionSummary as s,AccordionDetails as h,Divider as f}from"@mui/material";import m from"@mui/icons-material/Close";import u from"@mui/icons-material/ExpandMore";import{LightbulbOutlined as g,ManageSearchOutlined as p,ChatBubbleOutlineOutlined as x}from"@mui/icons-material";import v from"@mui/icons-material/AutoAwesome";import b from"../ChatCitation/ChatCitationRenderer.js";var y=function(e){var n=document.createElement("div");return n.innerHTML=e,Array.from(n.querySelectorAll("li")).map(function(e){return e.innerHTML})},_=function(){return i(r,e({component:"svg",viewBox:"0 0 24 24",sx:{width:14,height:14,fill:"#5928ed"}},{children:i("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}))},k=function(k){var S,C=k.open,z=k.onClose,w=k.data,I=o(null),A=I[0],R=I[1],B=t(function(){var e;return A&&w&&null!==(e=w.block_cognitive_citations.find(function(e){return String(e.citation_number)===A}))&&void 0!==e?e:null},[A,w]),W=t(function(){return(null==w?void 0:w.block_cognitive_reasoning_html)?y(w.block_cognitive_reasoning_html):[]},[null==w?void 0:w.block_cognitive_reasoning_html]),D=t(function(){return(null==w?void 0:w.block_cognitive_gap_html)?y(w.block_cognitive_gap_html):[]},[null==w?void 0:w.block_cognitive_gap_html]),M=function(o,t){for(var l,a,c=[],d=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g,s=0,h=0,f=function(){var f=a[1].replace(/^.*\$/,""),m=a[2],u=A===f;a.index>s&&c.push(i("span",{children:o.substring(s,a.index)},"txt-".concat(t,"-").concat(h++))),c.push(n("span",{children:[n("span",e({onClick:function(){return R(function(e){return e===f?null:f})},style:{color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline"}},{children:[m,i(x,{sx:{fontSize:"12px",ml:.2}})]})),u&&B&&i(r,e({sx:{maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1}},{children:i(b,{showRootContainer:!1,rootContainer:{relevanceScore:null!==(l=null==w?void 0:w.block_cognitive_confidence)&&void 0!==l?l:0,slotStyles:{container:{border:"",paddingLeft:"-20px",color:"black"}}},ruleBookContainer:{title:B.title||B.section_ref||"Rule Book",data:{content:B.content||B.paraphrase||"",highlighted_texts:Array.isArray(B.highlight)?B.highlight:B.highlight?[B.highlight]:[]},slotStyles:{outerContainer:{margin:"0",color:"black",minHeight:"350px"}}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})}))]},"anchor-".concat(t,"-").concat(f))),s=d.lastIndex};null!==(a=d.exec(o));)f();return s<o.length&&c.push(i("span",{children:o.substring(s)},"txt-end-".concat(t,"-").concat(h++))),c};return C?n(r,e({sx:{width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff"}},{children:[n(r,e({sx:{px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd"}},{children:[n(r,e({display:"flex",alignItems:"center",gap:1},{children:[i(_,{}),i(l,e({fontWeight:500,sx:{fontSize:"0.72rem"}},{children:"Cognitive Decisioning AI"}))]})),n(r,e({display:"flex",alignItems:"center",gap:1},{children:[i(a,{icon:i(v,{sx:{fontSize:12}}),label:"AI Relevance: ".concat(null!==(S=null==w?void 0:w.block_cognitive_confidence)&&void 0!==S?S:0,"%"),size:"small",sx:{fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75}}}),i(c,e({size:"small",onClick:z},{children:i(m,{fontSize:"small"})}))]}))]})),n(r,e({sx:{flex:1,overflowY:"auto",p:.5}},{children:[n(d,e({defaultExpanded:!0,disableGutters:!0,elevation:0},{children:[i(s,e({expandIcon:i(u,{})},{children:n(l,e({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[i(r,e({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:i(g,{sx:{fontSize:14,color:"#5928ed"}})})),"Decision Making Factors"]}))})),i(h,{children:i(r,e({sx:{padding:0,margin:0}},{children:W.length>0?W.map(function(o,t){return n(r,e({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n(l,e({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[t+1,"."]})),i(r,e({sx:{flex:1}},{children:i(l,e({variant:"body2",component:"span",sx:{fontSize:"0.75rem"}},{children:M(o,t)}))}))]}),t)}):i(l,e({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Reasons Found"}))}))})]})),i(f,{}),n(d,e({disableGutters:!0,elevation:0},{children:[i(s,e({expandIcon:i(u,{})},{children:n(l,e({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[i(r,e({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:i(p,{sx:{fontSize:14,color:"#5928ed"}})})),"Gaps in Decision"]}))})),i(h,{children:i(r,e({sx:{padding:0,margin:0}},{children:D.length>0?D.map(function(o,t){return n(r,e({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n(l,e({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[t+1,"."]})),i(l,{variant:"body2",component:"span",sx:{fontSize:"0.75rem"},dangerouslySetInnerHTML:{__html:o}})]}),t)}):i(l,e({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Gaps Found"}))}))})]}))]}))]})):null};export{k as default};
|
|
2
|
+
//# sourceMappingURL=Cognitivereasoningpanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cognitivereasoningpanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as t,Fragment as r,jsx as i}from"react/jsx-runtime";import a,{useState as o,useCallback as l,useRef as c,useMemo as d,useEffect as s}from"react";import f from"@mui/material/Dialog";import u from"@mui/icons-material/Fullscreen";import h from"@mui/icons-material/CloseFullscreen";var p=170,g=48,y=["#ede9fe","#e0f2fe","#fef3c7","#dcfce7","#ffe4e6","#f0fdf4","#fef9c3","#e0e7ff","#fce7f3","#f1f5f9"],v=["#7c3aed","#0284c7","#b45309","#16a34a","#e11d48","#15803d","#a16207","#4338ca","#db2777","#475569"],x=["⚙","◈","⟐","✦","◎","⬡","◇","⊕","✶","◉"],b=["#a78bfa","#7dd3fc","#fbbf24","#86efac","#fda4af","#6ee7b7","#fde047","#a5b4fc","#f9a8d4","#94a3b8"],m=["linear-gradient(135deg,#7c3aed,#a78bfa)","linear-gradient(135deg,#0284c7,#38bdf8)","linear-gradient(135deg,#b45309,#fbbf24)","linear-gradient(135deg,#16a34a,#86efac)","linear-gradient(135deg,#e11d48,#fda4af)","linear-gradient(135deg,#15803d,#6ee7b7)","linear-gradient(135deg,#a16207,#fde047)","linear-gradient(135deg,#4338ca,#a5b4fc)","linear-gradient(135deg,#db2777,#f9a8d4)","linear-gradient(135deg,#475569,#94a3b8)"];function w(t){var r=Array.isArray(null==t?void 0:t.clusters)?t.clusters:[],i=Array.isArray(null==t?void 0:t.nodes)?t.nodes:[],a=Array.isArray(null==t?void 0:t.edges)?t.edges:[],o=function(e,t,r){var i;void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===r&&(r=[]);var a=Array.isArray(e)?e:[],o=Array.isArray(t)?t:[],l=Array.isArray(r)?r:[],c=a.length;if(0===c)return new Map;var d={};a.forEach(function(e,n){d[e.id]=n});var s={},f={};a.forEach(function(e){s[e.id]=[],f[e.id]=[]}),o.forEach(function(e){s[e.source]&&s[e.source].push(e.target),f[e.target]&&f[e.target].push(e.source)});var u={};a.forEach(function(e){u[e.id]=0});for(var h=0;h<c;h++){for(var p=!1,g=0,y=o;g<y.length;g++){var v=y[g],x=(u[v.source]||0)+1;x>(u[v.target]||0)&&x<c&&(u[v.target]=x,p=!0)}if(!p)break}var b={};l.forEach(function(e,n){b[e.id]=n});var m={};l.forEach(function(e){m[e.id]=[]}),a.forEach(function(e){var n;null===(n=m[e.cluster_id])||void 0===n||n.push(e)}),Object.values(m).forEach(function(e){return e.sort(function(e,n){return(u[e.id]||0)-(u[n.id]||0)})});for(var w=new Float64Array(c),M=new Float64Array(c),k=new Float64Array(c),S=new Float64Array(c),C=function(e){var n=null!==(i=b[e.id])&&void 0!==i?i:0;(m[e.id]||[]).forEach(function(e,t){var r=d[e.id];w[r]=520*n+280,M[r]=200*t+120})},z=0,E=l;z<E.length;z++)C(V=E[z]);for(var A=.0015,F=Math.max.apply(Math,n(n([],a.map(function(e){return u[e.id]||0}),!1),[1],!1)),I=new Float64Array(c),W=0;W<c;W++)I[W]=(u[a[W].id]||0)/F*(200*c*.6)+120;for(var R=0;R<350;R++){var D=Math.max(.015,1-R/350),Y=new Float64Array(c),_=new Float64Array(c);for(W=0;W<c;W++)for(var j=W+1;j<c;j++){var P=(Q=w[W]-w[j])*Q+(U=M[W]-M[j])*U;P<400&&(P=(Q=12*(W-j))*Q+(U=8*(W+j))*U);var B=Q/(O=Math.sqrt(P))*(q=48e4/P),L=U/O*q;Y[W]+=B,_[W]+=L,Y[j]-=B,_[j]-=L}for(var X=0,N=o;X<N.length;X++){v=N[X];var T=d[v.source],H=d[v.target];if(void 0!==T&&void 0!==H){var O,q,Q=w[H]-w[T],U=M[H]-M[T];if(!((O=Math.sqrt(Q*Q+U*U))<1))B=Q/O*(q=.004*(O-380)),L=U/O*q,Y[T]+=B,_[T]+=L,Y[H]-=B,_[H]-=L}}var G={},J={},K={};for(W=0;W<c;W++)G[V=a[W].cluster_id]=(G[V]||0)+w[W],J[V]=(J[V]||0)+M[W],K[V]=(K[V]||0)+1;for(W=0;W<c;W++){var V=a[W].cluster_id;Y[W]+=(G[V]/K[V]-w[W])*A,_[W]+=(J[V]/K[V]-M[W])*A}for(W=0;W<c;W++)_[W]+=.002*(I[W]-M[W]);for(W=0;W<c;W++)k[W]=.84*(k[W]+Y[W])*D,S[W]=.84*(S[W]+_[W])*D,w[W]+=k[W],M[W]+=S[W]}for(h=0;h<40;h++){var Z=!1;for(W=0;W<c;W++)for(j=W+1;j<c;j++){Q=w[W]-w[j],U=M[W]-M[j];var $=270-Math.abs(Q),ee=128-Math.abs(U);if($>0&&ee>0)if(Z=!0,$<ee){var ne=$/2+5;w[W]+=Q>0?ne:-ne,w[j]-=Q>0?ne:-ne}else ne=ee/2+5,M[W]+=U>0?ne:-ne,M[j]-=U>0?ne:-ne}if(!Z)break}var te=1/0,re=1/0;for(W=0;W<c;W++)te=Math.min(te,w[W]),re=Math.min(re,M[W]);var ie=new Map;for(W=0;W<c;W++)ie.set(a[W].id,{x:Math.round(w[W]-te+80),y:Math.round(M[W]-re+80)});return ie}(i,a,r),l=i.map(function(n){var t=o.get(n.id)||{x:0,y:0};return e(e({},n),{x:t.x,y:t.y})}),c={};r.forEach(function(e,n){c[e.id]=n});var d={};r.forEach(function(e){d[e.id]=[]}),l.forEach(function(e){var n;null===(n=d[e.cluster_id])||void 0===n||n.push(e)});var s=36,f=r.map(function(e){var n=d[e.id];if(!n.length)return null;var t=Math.min.apply(Math,n.map(function(e){return e.x})),r=Math.min.apply(Math,n.map(function(e){return e.y})),i=Math.max.apply(Math,n.map(function(e){return e.x+p})),a=Math.max.apply(Math,n.map(function(e){return e.y+g}));return{id:e.id,label:e.label,idx:c[e.id],x:t-s,y:r-s,width:i-t+72,height:a-r+72+22}}).filter(function(e){return null!==e});return{nodes:l.map(function(n){var t;return e(e({},n),{cluster:null!==(t=c[n.cluster_id])&&void 0!==t?t:0})}),edges:a,clusterBounds:f,canvasW:Math.max.apply(Math,l.map(function(e){return e.x+p}))+72,canvasH:Math.max.apply(Math,l.map(function(e){return e.y+g}))+72}}function M(e,n,t){var r=n[e.source],i=n[e.target];if(!r||!i)return"";var a=function(e,n){var t=e.x+85,r=e.y+24,i=n.x+85,a=n.y+24;function o(e,n,t,r){var i=t-e,a=r-n;return Math.abs(a)>.4*Math.abs(i)?a>0?{x:e,y:n+24}:{x:e,y:n-24}:i>0?{x:e+85,y:n}:{x:e-85,y:n}}return{source:o(t,r,i,a),target:o(i,a,t,r)}}(r,i),o=a.source,l=a.target,c=l.x-o.x,d=l.y-o.y,s=Math.sqrt(c*c+d*d);if(s<5)return"M ".concat(o.x," ").concat(o.y," L ").concat(l.x," ").concat(l.y);if(i.y+150<r.y&&i.y<r.y-g){var f=Math.min(r.x,i.x)-110;return"M ".concat(o.x," ").concat(o.y," C ").concat(f," ").concat(o.y,", ").concat(f," ").concat(l.y,", ").concat(l.x," ").concat(l.y)}var u=-d/s,h=c/s;if(t.some(function(n){return n.source===e.target&&n.target===e.source})){var p=e.source<e.target?1:-1,y=Math.max(.18*s,40)*p,v=(o.x+l.x)/2+u*y,x=(o.y+l.y)/2+h*y;return"M ".concat(o.x," ").concat(o.y," Q ").concat(v," ").concat(x," ").concat(l.x," ").concat(l.y)}var b=Math.min(.12*s,55),m=(o.x+l.x)/2+u*b,w=(o.y+l.y)/2+h*b;return"M ".concat(o.x," ").concat(o.y," Q ").concat(m," ").concat(w," ").concat(l.x," ").concat(l.y)}function k(n){var a,f,k=n.data,S=n.onFullscreen,C=n.isFullscreen,z=n.isDarkMode,E=void 0!==z&&z,A=c(null),F=o({x:0,y:0}),I=F[0],W=F[1],R=o(.5),D=R[0],Y=R[1],_=o(!1),j=_[0],P=_[1],B=c({x:0,y:0}),L=c({x:0,y:0}),X=o(null),N=X[0],T=X[1],H=o(null),O=H[0],q=H[1],Q=o(null),U=Q[0],G=Q[1],J=o(null),K=J[0],V=J[1],Z=d(function(){return w(k)},[k]),$=d(function(){var e={};return Z.nodes.forEach(function(n){e[n.id]=n}),e},[Z]),ee=d(function(){var e={};return k.clusters.forEach(function(n,t){e[n.id]=t}),e},[k]),ne=d(function(){return K?new Set(Z.edges.filter(function(e){return e.source===K||e.target===K}).map(function(e){return e.id})):new Set},[K,Z.edges]),te=d(function(){if(!K)return new Set;var e=new Set([K]);return Z.edges.forEach(function(n){n.source===K&&e.add(n.target),n.target===K&&e.add(n.source)}),e},[K,Z.edges]),re=d(function(){return new Date(k.last_analyzed_at).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,day:"numeric",month:"short",year:"numeric"})},[k.last_analyzed_at]),ie=l(function(n){n.target.closest("[data-edge-hit]")||n.target.closest("[data-node]")||(P(!0),B.current={x:n.clientX,y:n.clientY},L.current=e({},I),n.currentTarget.style.cursor="grabbing")},[I]),ae=l(function(e){j&&W({x:L.current.x+(e.clientX-B.current.x),y:L.current.y+(e.clientY-B.current.y)})},[j]),oe=l(function(){P(!1),A.current&&(A.current.style.cursor="grab")},[]),le=l(function(e){e.preventDefault(),Y(function(n){return Math.min(2.5,Math.max(.2,n-.001*e.deltaY))})},[]);s(function(){var e=A.current;return e&&e.addEventListener("wheel",le,{passive:!1}),function(){return null==e?void 0:e.removeEventListener("wheel",le)}},[le]);var ce={width:32,height:32,border:"none",background:"transparent",borderRadius:8,cursor:"pointer",fontSize:16,color:E?"#cbd5e1":"#475569",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500};return t("div",e({style:{width:"100%",height:"100%",background:E?"#090d16":"#ffffff",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",position:"relative",overflow:"hidden"}},{children:[t("div",e({style:{position:"absolute",top:0,left:0,right:0,zIndex:20,borderBottom:C?E?"1px solid #1e293b":"1px solid #f1f5f9":"none",background:E?"#090d16":C?"#fff":"transparent"}},{children:[t("div",e({style:{padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",{children:[C&&i("h2",e({style:{margin:0,fontSize:17,fontWeight:700,color:E?"#f8fafc":"#1e293b"}},{children:"Dependency Graph"})),t("p",e({style:{margin:"2px 0 0",fontSize:12,color:"#94a3b8"}},{children:["Last analyzed: ".concat(re||""," · "),"Click a node or connection to explore details and dependencies."]}))]}),t("div",e({style:{display:"flex",gap:6,alignItems:"center"}},{children:[t("div",e({style:{display:"flex",gap:2,background:E?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:E?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:[i("button",e({onClick:function(){return Y(function(e){return Math.max(.2,e-.15)})},style:ce},{children:"−"})),t("button",e({onClick:function(){Y(.5),W({x:0,y:0})},style:e(e({},ce),{fontSize:11,width:52,fontWeight:600})},{children:[Math.round(100*D)||0,"%"]})),i("button",e({onClick:function(){return Y(function(e){return Math.min(2.5,e+.15)})},style:ce},{children:"+"}))]})),S&&i("div",e({style:{display:"flex",background:E?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:E?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:i("button",e({onClick:S,style:ce},{children:i(C?h:u,{style:{fontSize:16}})}))}))]}))]})),O&&i("div",e({style:{margin:"0 20px 14px",width:"30%",minWidth:280,borderRadius:12,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",border:"1px solid #e2e8f0",animation:"slideDown 0.2s ease-out"}},{children:function(){var n,r,a=O.node,o=null!==(n=ee[a.cluster_id])&&void 0!==n?n:0;return Z.edges.filter(function(e){return e.source===a.id}).length,Z.edges.filter(function(e){return e.target===a.id}).length,t("div",{children:[t("div",e({style:{padding:"10px 14px",background:m[o%m.length||0],color:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[i("span",e({style:{width:28,height:28,borderRadius:8,background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14}},{children:x[o%x.length||0]})),t("div",{children:[i("div",e({style:{fontSize:9,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.75}},{children:(null===(r=k.clusters[o])||void 0===r?void 0:r.label)||"Cluster Name"})),i("div",e({style:{fontSize:14,fontWeight:700,marginTop:1}},{children:a.label||"Cluster Name"}))]})]})),i("button",e({onClick:function(){q(null),V(null)},style:{background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:"×"}))]})),i("div",e({style:{padding:"10px 14px",fontSize:13,lineHeight:1.6,color:E?"#cbd5e1":"#475569",background:E?"#1e293b":"#fff"}},{children:a.description||"No description available..."}))]})}()}))]})),t("div",e({ref:A,onPointerDown:ie,onPointerMove:ae,onPointerUp:oe,onPointerLeave:oe,onClick:function(){T(null),q(null),V(null)},style:{width:"100%",height:"100%",cursor:j?"grabbing":"grab",position:"relative"}},{children:[i("div",e({style:{transform:"translate(".concat(I.x,"px, ").concat(I.y,"px) scale(").concat(D,")"),transformOrigin:"top left",position:"absolute",top:C?70:50,left:20,transition:j?"none":"transform 0.08s ease-out"}},{children:t("svg",e({width:Z.canvasW,height:Z.canvasH,style:{overflow:"visible"}},{children:[Z.clusterBounds.map(function(n){return t("g",{children:[i("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:"16",fill:E?"rgba(30, 41, 59, 0.35)":"none",stroke:E?"#334155":"#e2e8f0",strokeWidth:"1.5",strokeDasharray:"8 4"}),i("text",e({x:n.x+14,y:n.y+n.height-10,fontSize:"11",fill:"#94a3b8",fontFamily:"Inter, sans-serif",fontWeight:"500"},{children:n.label||"Cluster Name"}))]},n.id)}),Z.edges.map(function(n){var a=M(n,$,Z.edges);if(!a)return null;var o=ne.has(n.id),l=(null==N?void 0:N.edge.id)===n.id,c=U===n.id,d=o||l?"#6366f1":c?"#818cf8":E?"#475569":"#cbd5e1",s=o||l?2.5:c?2:1.5;return t("g",e({style:{opacity:!!K&&!o?.1:1,transition:"opacity 0.25s"}},{children:[i("path",{"data-edge-hit":"true",d:a,fill:"none",stroke:"transparent",strokeWidth:18,style:{cursor:"pointer"},onClick:function(e){return function(e,n){e.stopPropagation();var t=A.current.getBoundingClientRect();T({edge:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),q(null),V(null)}(e,n)},onMouseEnter:function(){return G(n.id)},onMouseLeave:function(){return G(null)}}),i("path",{d:a,fill:"none",stroke:d,strokeWidth:s,style:{transition:"stroke 0.2s, stroke-width 0.2s",pointerEvents:"none"}}),(o||l)&&t(r,{children:[i("circle",e({r:4,fill:"#6366f1"},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:a})})),i("circle",e({r:6,fill:"#6366f1",opacity:.2},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:a})}))]})]}),n.id)}),Z.nodes.map(function(n){var r,a=K===n.id,o=te.has(n.id),l=!!K&&!o,c=(null!==(r=ee[n.cluster_id])&&void 0!==r?r:0)%b.length,d=b[c||0];return i("g",e({"data-node":"true",onClick:function(e){return function(e,n){e.stopPropagation();var t=A.current.getBoundingClientRect();K===n.id?(V(null),q(null)):(V(n.id),q({node:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),T(null))}(e,n)},style:{cursor:"pointer",opacity:l?.15:1,transition:"opacity 0.25s"}},{children:i("foreignObject",e({x:n.x,y:n.y,width:p,height:g},{children:t("div",e({style:{background:E?"#1e293b":"#fff",border:a?"2.5px solid ".concat(d):E?"1.5px solid #334155":"1.5px solid #e2e8f0",borderRadius:10,padding:"8px 14px",fontSize:13,fontWeight:600,color:E?"#f1f5f9":"#334155",fontFamily:"'Inter', sans-serif",display:"flex",alignItems:"center",gap:8,boxShadow:a?"0 0 0 3px ".concat(d,"33, 0 2px 8px rgba(0,0,0,0.4)"):E?"0 2px 6px rgba(0,0,0,0.3)":"0 1px 3px rgba(0,0,0,0.05)",whiteSpace:"nowrap",userSelect:"none",height:46,boxSizing:"border-box",transition:"border 0.2s, box-shadow 0.2s"}},{children:[i("span",e({style:{width:22,height:22,borderRadius:6,background:y[c],display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,flexShrink:0,color:v[c]}},{children:x[c]})),i("span",e({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:n.label||"Node name"}))]}))}))}),n.id)})]}))})),N&&t("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({position:"absolute"},function(e,n,t,r){if(!A.current)return{};var i=A.current.getBoundingClientRect(),a=e+14,o=n-r/2;return a+t>i.width&&(a=e-t-14),o<8&&(o=8),o+r>i.height&&(o=i.height-r-8),{left:a,top:o}}(N.screenX,N.screenY,320,180)),{width:320,background:"#fff",borderRadius:14,boxShadow:"0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",border:"1px solid #e2e8f0",zIndex:30,animation:"popIn 0.18s ease-out",overflow:"hidden"})},{children:[t("div",e({style:{padding:"12px 16px 10px",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",color:"#fff"}},{children:[i("div",e({style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.8}},{children:"Edge Reasoning"})),t("div",e({style:{fontSize:13,fontWeight:600,marginTop:4}},{children:[(null===(a=$[N.edge.source])||void 0===a?void 0:a.label)||"Source",i("span",e({style:{opacity:.6,margin:"0 6px"}},{children:"→"})),(null===(f=$[N.edge.target])||void 0===f?void 0:f.label)||"Target"]}))]})),i("div",e({style:{padding:"12px 16px 14px",fontSize:13,lineHeight:1.6,color:"#475569",whiteSpace:"pre-line"}},{children:N.edge.reasoning||"No Reasoning available..."})),i("button",e({onClick:function(){return T(null)},style:{position:"absolute",top:8,right:10,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"}},{children:"×"}))]}))]})),i("style",{children:"\n @keyframes popIn { from { opacity:0; transform:scale(0.95) translateY(4px); } to { opacity:1; transform:scale(1) translateY(0); } }\n @keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }\n "})]}))}var S=a.memo(function(n){var a=n.data,c=n.isDarkMode,d=void 0!==c&&c,s=n.style,u=o(!1),h=u[0],p=u[1],g=l(function(){p(!0)},[]),y=l(function(){p(!1)},[]);return t(r,{children:[i("div",e({style:e({position:"relative",width:"100%",height:"500px"},s)},{children:i(k,{data:a,onFullscreen:g,isDarkMode:d})})),i(f,e({open:h,onClose:y,maxWidth:!1,PaperProps:{style:{width:"95vw",height:"92vh",maxWidth:"none",borderRadius:12,overflow:"hidden",background:d?"#090d16":"#ffffff"}}},{children:i("div",e({style:{width:"100%",height:"100%",position:"relative"}},{children:i(k,{data:a,onFullscreen:y,isFullscreen:!0,isDarkMode:d})}))}))]})});export{S as default};
|
|
2
|
+
//# sourceMappingURL=DependencyGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyGraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as r,Fragment as t,jsx as o}from"react/jsx-runtime";import{useRef as i,useEffect as n}from"react";import{Box as a}from"@mui/material";import d from"@monaco-editor/react";var u={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},l={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},g=function(g){var m=g.content,s=g.selectedTag,f=g.highlightVariable,c=g.isDarkMode,h=g.height,p=void 0===h?250:h,b=g.fontSize,v=void 0===b?12:b,w=i(),k=i();return n(function(){if(s&&w.current&&k.current){var e=w.current,r=e.getModel();if(r){for(var t=r.getValue().split("\n"),o=-1,i=0;i<t.length;i++){var n=t[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===s.toLowerCase()){o=i+1;break}}if(o>0){var a=o,d="</".concat(s.toLowerCase(),">");for(i=o;i<t.length;i++)if(t[i].toLowerCase().includes(d)){a=i+1;break}e.setSelection(new k.current.Selection(o,1,o,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(o);var u=e.deltaDecorations([],[{range:new k.current.Range(o,1,a,t[a-1].length+1),options:{isWholeLine:!0,className:"promptemon-viewer-highlight",inlineClassName:"promptemon-viewer-highlight"}}]);setTimeout(function(){return e.deltaDecorations(u,[])},2e3)}}}},[s]),n(function(){if(f&&w.current&&k.current){var e=w.current,r=e.getModel();if(r){for(var t=r.getValue().split("\n"),o=[],i=0;i<t.length;i++)for(var n=t[i].indexOf(f);-1!==n;)o.push(new k.current.Range(i+1,n+1,i+1,n+f.length+1)),n=t[i].indexOf(f,n+1);if(0!==o.length){e.revealLineInCenterIfOutsideViewport(o[0].startLineNumber);var a=e.deltaDecorations([],o.map(function(e){return{range:e,options:{inlineClassName:"promptemon-viewer-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(a,[])},2e3)}}}},[f]),n(function(){k.current&&k.current.editor.setTheme(c?"promptemonViewerDark":"promptemonViewerLight")},[c]),r(t,{children:[o("style",{children:"\n .promptemon-viewer-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-viewer-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),r(a,e({sx:{width:"100%",height:p,display:"flex",flexDirection:"column"}},{children:[o(a,{sx:{width:"100%",height:20,bgcolor:c?"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),o(a,e({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:o(d,{onMount:function(e,r){w.current=e,k.current=r,r.editor.defineTheme("promptemonViewerDark",u),r.editor.defineTheme("promptemonViewerLight",l),r.editor.setTheme(c?"promptemonViewerDark":"promptemonViewerLight"),r.languages.register({id:"promptemonViewerLang"}),r.languages.setMonarchTokensProvider("promptemonViewerLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),r.languages.registerFoldingRangeProvider("promptemonViewerLang",{provideFoldingRanges:function(e){var r=e.getLinesContent(),t=[],o=[];return r.forEach(function(e,r){var i=r+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),a=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&o.push({tag:n[1],start:i}),a)for(var d=a[1],u=o.length-1;u>=0;u--)if(o[u].tag===d){t.push({start:o[u].start,end:i}),o.splice(u,1);break}}),t}})},beforeMount:function(e){e.editor.defineTheme("promptemonViewerDark",u),e.editor.defineTheme("promptemonViewerLight",l),e.editor.setTheme(c?"promptemonViewerDark":"promptemonViewerLight")},theme:c?"promptemonViewerDark":"promptemonViewerLight",value:m,language:"promptemonViewerLang",onChange:function(){},options:{fontSize:v,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),o(a,{sx:{width:"100%",height:20,bgcolor:c?"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})};export{g as InternalEditor,g as default};
|
|
2
|
+
//# sourceMappingURL=Internaleditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Internaleditor.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__rest as e,__assign as n,__awaiter as o,__generator as r}from"tslib";import{jsxs as i,jsx as t,Fragment as a}from"react/jsx-runtime";import l,{useState as d,useMemo as c,useRef as s,useEffect as p}from"react";import u from"react-markdown";import f from"rehype-raw";import{Box as h,Tooltip as g}from"@mui/material";import{Prism as m}from"react-syntax-highlighter";import{oneLight as v}from"react-syntax-highlighter/dist/esm/styles/prism";import{Check as b,ContentCopy as y,ExpandLess as x,ExpandMore as k}from"@mui/icons-material";import S from"@mui/icons-material/ExpandMoreOutlined";import _ from"./Cognitivereasoningpanel.js";var w=function(e){var n,o,r;void 0===e&&(e="");var i=null==e?void 0:e.replace(/\\`/g,"`");return i=null==(i=null==(i=null===(r=null==(i=null===(o=null===(n=null==(i=null==i?void 0:i.replace(/```json\s*([\s\S]*?)```/g,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}))?void 0:i.replace(/^```.*\n?/,""))||void 0===n?void 0:n.replace(/\n?```$/,""))||void 0===o?void 0:o.trim())?void 0:i.replace(/^```/,""))||void 0===r?void 0:r.replace(/```$/,""))?void 0:i.replace(/<\/summary>/g,"</summary>\n"))?void 0:i.replace(/<details>/g,"\n<details>")},M=function(e){var a=e.text,l=d(!1),c=l[0],s=l[1];return i("button",n({onClick:function(){return o(void 0,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(a)];case 1:return e.sent(),s(!0),setTimeout(function(){return s(!1)},2e3),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})},"aria-label":"Copy code",style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",fontSize:"0.68rem",fontWeight:500,fontFamily:"inherit",color:c?"#16a34a":"#6B7280",background:c?"#f0fdf4":"#f3f4f6",border:"1px solid ".concat(c?"#bbf7d0":"#e5e7eb"),borderRadius:6,cursor:"pointer",transition:"all 0.2s",opacity:.85},onMouseEnter:function(e){e.currentTarget.style.opacity="1"},onMouseLeave:function(e){e.currentTarget.style.opacity="0.85"}},{children:[t(c?b:y,{style:{fontSize:13}}),c?"Copied":"Copy"]}))},z=function(o){o.node;var r=e(o,["node"]),a=d(!1),c=a[0],u=a[1],f=s(null),h=l.Children.toArray(r.children),g=h.find(function(e){var n;return null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-codebase-name"]}),m=!!g,v=m?g.props["data-codebase-name"]:"",b=h.map(function(e){var n;return"string"==typeof e?e:(null===(n=e.props)||void 0===n?void 0:n.children)||""}).join("").replace(/\*\*/g,"").trim(),y=m?"From ".concat(v," codebase"):b||"Accordion title not found";return p(function(){var e,n=null===(e=f.current)||void 0===e?void 0:e.parentElement;if(n){var o=function(){return u(n.open)};return o(),n.addEventListener("toggle",o),function(){return n.removeEventListener("toggle",o)}}},[]),i("summary",n({ref:f,style:{padding:"8px 12px",listStyleType:"none",cursor:"pointer",fontWeight:600,fontSize:"0.82rem",color:"#6932E2",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,borderRadius:8,background:c?"#f5f3ff":"transparent",transition:"background 0.2s"}},{children:[t("span",{children:y}),t("div",n({style:{display:"flex",alignItems:"center",flexShrink:0,color:"#6932E2"}},{children:t(c?x:k,{sx:{fontSize:"1.1rem"}})}))]}))},C=function(o){var r=o.message,s=o.fontSize,p=o.extraMetaData,b=o.isDarkMode,y=void 0!==b&&b,x=o.style,k=o.sx,C=null!=s?s:"0.88rem",W=y?"#e2e8f0":"#1f2937",R=y?"#f8fafc":"#111827",E=d({open:!1,data:null,activeKey:null}),H=E[0],K=E[1],L=function(){return K({open:!1,data:null,activeKey:null})},T=c(function(){var e=function(e){var n={};return{processed:e.replace(/<!--\s*<ai_reasoning>\s*([\s\S]*?)\s*<\/ai_reasoning>\s*-->/g,function(e,o){try{var r=JSON.parse(o.trim()),i=r.id||"reasoning_".concat(Object.keys(n).length);return n[i]=r,'<aireasoning data-reasoning-key="'.concat(i,'">').concat(i,"</aireasoning>")}catch(e){return console.warn("[ai_reasoning] Failed to parse block:",e),""}}),reasoningMap:n}}(r||"");return{processedMessage:e.processed,inlineReasoningMap:e.reasoningMap}},[r]),j=T.processedMessage,B=T.inlineReasoningMap,F=c(function(){return{aireasoning:function(o){o.node;var r=e(o,["node"])["data-reasoning-key"],a=B[r];if(!a)return null;var l=H.open&&H.activeKey===r;return i("div",n({style:{margin:"6px 0"}},{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t,a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.decision_strength)&&void 0!==t?t:0),block_cognitive_citations:a}}(a);K(function(e){return e.open&&e.activeKey===r?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:r}})},style:{display:"inline-flex",alignItems:"center",gap:6,cursor:"pointer",color:y?"#a78bfa":"#6932E2",fontWeight:500,fontSize:C,transition:"all 0.2s",padding:"2px 0"}},{children:[t("span",{children:r}),t("span",n({style:{display:"inline-flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:5,padding:"4px 2px"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})}))]})),l&&H.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:L,data:H.data})}))]}))},codebasename:function(e){var o=e.children,r=("string"==typeof o[0]?o[0]:"").trim();return""!==r?i("div",n({"data-codebase-name":r,style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:String(o).replace(/\n$/,"")}),t(m,n({style:v,language:"json",PreTag:"div",customStyle:{borderRadius:8,padding:"1rem",fontSize:"0.8rem",border:y?"1px solid #334155":"1px solid #e5e7eb",margin:0,lineHeight:1.6}},{children:String(o).replace(/\n$/,"")}))]})):t(a,{})},details:function(o){o.node;var r=e(o,["node"]);return t("details",n({},r,{style:{borderRadius:8,border:y?"1px solid #334155":"1px solid #e9e5f5",backgroundColor:"transparent",margin:"8px 0",overflow:"hidden"}},{children:r.children}))},summary:z,p:function(o){o.node;var r=e(o,["node"]);return t("p",n({style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",maxWidth:"100%",fontSize:C,lineHeight:1.7,margin:"4px 0",color:W}},{children:null==r?void 0:r.children}))},strong:function(o){o.node;var r=e(o,["node"]);return t("strong",n({style:{fontWeight:650,color:R}},{children:null==r?void 0:r.children}))},h1:function(o){o.node;var r=e(o,["node"]);return t("h1",n({style:{fontSize:"1.35rem",fontWeight:700,color:R,margin:"20px 0 8px",lineHeight:1.3,letterSpacing:"-0.01em"}},{children:r.children}))},h2:function(o){o.node;var r=e(o,["node"]);return t("h2",n({style:{fontSize:"1.15rem",fontWeight:650,color:R,margin:"16px 0 6px",lineHeight:1.35}},{children:r.children}))},h3:function(o){o.node;var r=e(o,["node"]);return t("h3",n({style:{fontSize:"1rem",fontWeight:600,color:R,margin:"14px 0 4px",lineHeight:1.4}},{children:r.children}))},h4:function(o){o.node;var r=e(o,["node"]);return t("h4",n({style:{fontSize:"0.92rem",fontWeight:600,color:W,margin:"12px 0 4px",lineHeight:1.4}},{children:r.children}))},ol:function(o){o.node;var r=e(o,["node"]);return t("ol",n({style:{listStyleType:"decimal",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},ul:function(o){o.node;var r=e(o,["node"]);return t("ul",n({style:{listStyleType:"disc",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},li:function(o){o.node;var r=e(o,["node"]);return t("li",n({style:{fontSize:C,lineHeight:1.7,color:W,paddingLeft:4}},{children:r.children}))},blockquote:function(o){o.node;var r=e(o,["node"]);return t("blockquote",n({style:{margin:"12px 0",padding:"8px 16px",borderLeft:"3px solid #8b5cf6",background:y?"#1e1b4b":"#faf5ff",borderRadius:"0 6px 6px 0",color:y?"#cbd5e1":"#4b5563",fontStyle:"italic",fontSize:C,lineHeight:1.65}},{children:r.children}))},hr:function(){return t("hr",{style:{border:"none",height:1,background:y?"linear-gradient(to right, transparent, #334155, transparent)":"linear-gradient(to right, transparent, #d1d5db, transparent)",margin:"16px 0"}})},table:function(o){o.node;var r=e(o,["node"]);return t("div",n({style:{overflowX:"auto",margin:"12px 0",borderRadius:8,border:y?"1px solid #334155":"1px solid #e5e7eb"}},{children:t("table",n({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem",lineHeight:1.5}},{children:r.children}))}))},thead:function(o){o.node;var r=e(o,["node"]);return t("thead",n({style:{background:y?"#1e293b":"#f9fafb",borderBottom:y?"2px solid #334155":"2px solid #e5e7eb"}},{children:r.children}))},th:function(o){o.node;var r=e(o,["node"]);return t("th",n({style:{padding:"8px 12px",textAlign:"left",fontWeight:600,fontSize:"0.76rem",color:y?"#cbd5e1":"#374151",whiteSpace:"nowrap"}},{children:r.children}))},td:function(o){o.node;var r=e(o,["node"]);return t("td",n({style:{padding:"8px 12px",borderTop:y?"1px solid #334155":"1px solid #f3f4f6",color:y?"#94a3b8":"#4b5563",fontSize:"0.8rem"}},{children:r.children}))},a:function(o){var r=o.children;o.node;var l=e(o,["children","node"]),d=l["data-cognitive-reasoning"];if(d&&(null==p?void 0:p[d]))return i(a,{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t;if(!e)return null;var a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.Reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.Confidence_score)&&void 0!==t?t:0),block_cognitive_citations:a}}(p[d]);K(function(e){return e.open&&e.activeKey===d?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:d}})},style:{color:y?"#a78bfa":"#6932E2",fontWeight:500,cursor:"pointer",transition:"all 0.2s",padding:"0 2px",position:"relative",display:"flex",alignItems:"center",gap:6,width:"fit-content"}},{children:[r||"",t("span",n({style:{cursor:"pointer",padding:"4px 2px",display:"flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:"5px",width:"fit-content"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transition:"transform 0.2s"}})}))]})),H.open&&H.activeKey===d&&H.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:L,data:H.data})}))]});var c=!1;try{c=new URL(null==l?void 0:l.href).protocol.startsWith("http")}catch(e){c=!1}return c?t("a",n({href:null==l?void 0:l.href,style:{color:y?"#a78bfa":"#6932E2",textDecoration:"none",fontWeight:500,borderBottom:y?"1px solid #7c3aed":"1px solid #c4b5fd",transition:"border-color 0.2s, color 0.2s"},target:"_blank",rel:"noopener noreferrer",onMouseEnter:function(e){e.currentTarget.style.borderBottomColor=y?"#a78bfa":"#6932E2"},onMouseLeave:function(e){e.currentTarget.style.borderBottomColor=y?"#7c3aed":"#c4b5fd"}},{children:r})):t("span",{children:r})},sup:function(o){o.node;var r=e(o,["node"]);return t(g,n({title:r.children,placement:"top",arrow:!0},{children:t(h,n({component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:y?"#3730a3":"#ede9fe",color:y?"#c084fc":"#7c3aed",fontSize:"0.6rem",fontWeight:700,verticalAlign:"super",cursor:"pointer",userSelect:"none",lineHeight:1,transition:"all 0.2s","&:hover":{background:y?"#6d28d9":"#7c3aed",color:"#fff"}},"aria-label":"Info",role:"button"},{children:"i"}))}))},code:function(e){var o=e.children;return t("code",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.82em",color:y?"#e9d5ff":"#9333ea",background:y?"#2e1065":"#faf5ff",padding:"1.5px 5px",borderRadius:4,border:y?"1px solid #581c87":"1px solid #f3e8ff",fontWeight:500}},{children:o}))},pre:function(e){var o=e.children,r=function(e){var n;return"string"==typeof e?e:(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?(Array.isArray(e.props.children)?e.props.children:[e.props.children]).map(r).join(""):""},a=l.Children.toArray(o).map(r).join("");return i("div",n({style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:a}),t("pre",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.8rem",lineHeight:1.6,color:W,background:y?"#0f172a":"#f9fafb",border:y?"1px solid #334155":"1px solid #e5e7eb",borderRadius:8,padding:"14px 16px",margin:0,overflowX:"auto",whiteSpace:"pre"}},{children:o}))]}))},img:function(o){o.node;var r=e(o,["node"]);return t("img",n({},r,{style:{maxWidth:"100%",height:"auto",borderRadius:8,margin:"8px 0",border:y?"1px solid #334155":"1px solid #e5e7eb"},loading:"lazy"}))}}},[r,C,p,H.activeKey,H.open,B,y,W,R]);return t(h,n({className:"pg-markdown-renderer",style:x,sx:n(n({fontSize:C,lineHeight:1.7,color:W,wordBreak:"break-word",position:"relative"},k),{"& span[style*='color'], & font[color]":y?{color:"#60a5fa !important"}:{},"& a":{color:y?"#a78bfa !important":"#6932E2 !important"},"& strong":{color:y?"#f8fafc !important":"#111827 !important"},"& h1, & h2, & h3, & h4, & h5, & h6":{color:y?"#f1f5f9 !important":"#111827 !important"}})},{children:t(u,n({components:F,rehypePlugins:[f],className:"react-markdown-renderer-with-overrides"},{children:w(j)}))}))};export{C as MarkdownRenderer,C as default};
|
|
2
|
+
//# sourceMappingURL=Markdownrenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdownrenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useRef as l}from"react";import{Box as d,Typography as c,Skeleton as a,Accordion as s,AccordionSummary as h,AccordionDetails as p,Tooltip as f,IconButton as u,Switch as x,Dialog as m,Chip as g}from"@mui/material";import v from"@mui/icons-material/ExpandMore";import b from"@mui/icons-material/Fullscreen";import y from"@mui/icons-material/Close";import S from"@mui/icons-material/NearMeOutlined";import w from"@mui/icons-material/ChevronLeft";import z from"@mui/icons-material/ChevronRight";import E from"./DependencyGraph.js";import{MarkdownRenderer as B}from"./Markdownrenderer.js";import{InternalEditor as k}from"./Internaleditor.js";var D=function(t){var r=t.text,l=t.detailedSummary,a=t.extraMetaData,s=t.isDarkMode,h=void 0!==s&&s,p=t.markdownRendererStyle,f=o(!1),u=f[0],x=f[1],m=function(e,i){void 0===i&&(i=220);var n=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(n.length<=i)return{preview:n,truncated:!1};var t=n.slice(0,i),o=t.lastIndexOf(" ");return{preview:(o>0?t.slice(0,o):t).trim(),truncated:!0}}(r),g=m.preview,v=m.truncated;return n(d,{children:i(d,u?{children:[n(B,{message:r,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),(null==l?void 0:l.trim())&&n(B,{message:l,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),n(c,e({component:"span",onClick:function(){return x(!1)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}:e({sx:{display:"flex",flexDirection:"column"}},{children:[i(c,e({sx:{fontSize:"0.8rem",color:h?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[g,v&&"…"]})),(v||(null==l?void 0:l.trim()))&&n(d,e({sx:{display:"flex",justifyContent:"flex-end"}},{children:n(c,e({component:"span",onClick:function(){return x(!0)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},C=function(t){var a=t.text,s=o(!1),h=s[0],p=s[1],f=o(!1),u=f[0],x=f[1],m=l(null);return r(function(){var e=m.current;e&&x(e.scrollWidth>e.clientWidth)},[a]),n(d,e({sx:{pl:1}},{children:h?i(c,e({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[a," ",n(c,e({component:"span",onClick:function(){return p(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]})):i(d,e({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[n(c,e({ref:m,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:a})),u&&n(c,e({component:"span",onClick:function(){return p(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))},M=function(M){var R,A=M.promptContent,F=M.promptTitle,W=M.isLoading,I=void 0!==W&&W,H=M.overviewSummary,P=M.functionalityOfSPB,T=void 0===P?[]:P,_=M.spbAdditionalInfo,L=M.showCodePanel,j=void 0===L||L,O=M.showCollapseStrip,G=void 0===O||O,N=M.showFullscreenButton,X=void 0===N||N,Y=M.showFullscreenModal,q=void 0===Y||Y,J=M.showThemeToggle,K=void 0===J||J,Q=M.isDarkMode,U=void 0===Q||Q,V=M.styles,Z=M.className,$=M.style,ee=M.sx,ie=o(null),ne=ie[0],te=ie[1],oe=o(null),re=oe[0],le=oe[1],de=o(""),ce=de[0],ae=de[1],se=void 0!==(null==V?void 0:V.isDarkMode)?V.isDarkMode:U,he=o(se),pe=he[0],fe=he[1],ue=o(null),xe=ue[0],me=ue[1];r(function(){void 0!==(null==V?void 0:V.isDarkMode)&&fe(V.isDarkMode)},[null==V?void 0:V.isDarkMode]);var ge=o(!1),ve=ge[0],be=ge[1],ye=o(480),Se=ye[0],we=ye[1],ze=l(!1),Ee=l(null);r(function(){var e,i,n;T.length>0&&te((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),n=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(n||"")))},[T]),r(function(){I&&te(null)},[I]),r(function(){xe&&(ae(""),setTimeout(function(){return ae(xe.ref)},500))},[xe]);return i(d,e({className:Z,style:e(e({},null==V?void 0:V.root),$),sx:e({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},ee)},{children:[n(d,e({sx:e({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==V?void 0:V.header)},{children:i(d,e({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[n(c,e({sx:e({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==V?void 0:V.headerTitle)},{children:F||"SPB Analysis"})),n(c,e({sx:e({fontSize:"0.7rem",color:"#9CA3AF"},null==V?void 0:V.headerSubtitle)},{children:ne?"Last Analyzed at ".concat(ne):""}))]}))})),i(d,e({ref:Ee,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[n(d,e({sx:e({width:j?ve&&G?0:Se:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:ze.current?"none":"width 0.15s",borderRight:!j||ve&&G?"none":"1px solid #e5e7eb"},null==V?void 0:V.leftPanel)},{children:i(d,e({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i(d,e({sx:e({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==V?void 0:V.overviewSection)},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==V?void 0:V.overviewTitle)},{children:"Overview"})),n(d,e({sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==V?void 0:V.overviewContent)},{children:(null===(R=null==H?void 0:H.overallSummary)||void 0===R?void 0:R.trim())?n(D,{text:H.overallSummary,detailedSummary:H.detailedSummary,extraMetaData:H.extraMetaData,isDarkMode:pe,markdownRendererStyle:null==V?void 0:V.markdownRenderer}):i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"95%",height:14})]}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==V?void 0:V.functionalitySection)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==V?void 0:V.functionalityTitle)},{children:"Functionality of SPB"}))})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:T.length>0?T.map(function(t,o){return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:0===o,sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==V?void 0:V.functionalityItem)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[o+1,". ",t.name||t.section_name]}))})),i(p,e({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[n(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:t.description||t.reason_for_inclusion})),n(c,e({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),n(d,e({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:t.apb_references.map(function(t,o){var r="string"==typeof t?t:t.apb_name,l=re===r;return i(d,e({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i(d,e({onClick:function(){return function(e){re===e?(le(null),ae("")):(le(e),ae(""),setTimeout(function(){return ae(e)},50))}(r)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i(c,e({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[o+1,". ",r]})),n(S,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof t&&(t.description||t.context)&&n(C,{text:t.description||t.context||""})]}),o)})}))]}))]}),o)}):n(d,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(t){return i(d,e({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"40%",height:16}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"80%",height:14}),n(a,{variant:"text",width:"30%",height:14})]}),t)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==V?void 0:V.applicabilitySection)},{children:[i(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==V?void 0:V.applicabilityTitle)},{children:"Applicability"})),n(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:n(d,e({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==_?void 0:_.when_to_apply},{label:"When NOT to apply",content:null==_?void 0:_.when_not_to_apply}].map(function(t){var o=t.label,r=t.content;return i(d,e({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:o})),r?n(B,{fontSize:"0.8rem",message:r,isDarkMode:pe,style:null==V?void 0:V.markdownRenderer}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"80%",height:14}),n(a,{variant:"text",width:"90%",height:14})]})):n(c,e({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),o)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==V?void 0:V.specificationsSection)},{children:[i(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==V?void 0:V.specificationsTitle)},{children:"Specifications"})),n(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==_?void 0:_.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==_?void 0:_.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==_?void 0:_.output_analysis}].map(function(o){var r=o.label,l=o.tooltip,x=o.content,m="Output"===r,g=m&&x?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,n){return i.push(n.trim()),""}).trim(),code:i.join("\n\n")}}(x):null,b=g?g.text:x,y=g?g.code:"";return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===r,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i(d,e({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:r})),l&&n(f,e({title:l,placement:"top"},{children:n(d,e({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),n(p,e({sx:{px:1.25,pb:1.25,pt:0}},{children:x?i(t,{children:[b&&n(B,{fontSize:"0.8rem",message:b,isDarkMode:pe,style:null==V?void 0:V.markdownRenderer}),m&&y&&i(d,e({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i(d,e({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[n(c,e({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),n(f,e({title:"Copy Code to clipboard"},{children:n(u,e({size:"small",onClick:function(){return e=y,navigator.clipboard.writeText(e);var e}},{children:n(c,e({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),n(d,e({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:n(k,{content:y,isDarkMode:pe,height:"100%",fontSize:10})}))]}))]}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"75%",height:14})]})):n(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),r)})}))]})),i(s,e({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==V?void 0:V.dependencyGraphSection)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==V?void 0:V.dependencyGraphTitle)},{children:"Dependency Graph"}))})),n(p,e({sx:{px:0,pb:0,pt:0}},{children:(null==_?void 0:_.dependency_graph)?i(d,e({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[n(d,e({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:n(E,{data:_.dependency_graph,isDarkMode:pe,style:null==V?void 0:V.dependencyGraph})})),n(c,e({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i(d,e({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[n(a,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),j&&G&&n(d,e({onClick:function(){return be(function(e){return!e})},sx:e({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==V?void 0:V.collapseStrip)},{children:n(c,e({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),j&&G&&n(d,e({onClick:function(){return be(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),ze.current=!0;var i=function(e){if(ze.current&&Ee.current){var t=Ee.current.getBoundingClientRect(),o=t.left,r=t.width,l=e.clientX-o;if(l<200)return be(!0),ze.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",n);l>.7*r||(be(!1),we(l))}},n=function(){ze.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},sx:e({position:"absolute",left:ve?20:Se+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==V?void 0:V.dragHandle)},{children:n(ve?z:w,{sx:{fontSize:12,color:"#6b7280"}})})),j&&i(d,e({sx:e({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==V?void 0:V.codePanel)},{children:[i(d,e({sx:e({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==V?void 0:V.codePanelHeader)},{children:[n(c,e({sx:e({fontSize:13,fontWeight:600,color:"#374151"},null==V?void 0:V.codePanelTitle)},{children:F||"SPB Analysis"})),i(d,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[K&&n(x,{checked:pe,onChange:function(e){return fe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),X&&q&&n(f,e({title:"Fullscreen",placement:"top"},{children:n(u,e({size:"small",onClick:function(){return me({ref:ce||"",description:""})},sx:{color:"#6b7280"}},{children:n(b,{sx:{fontSize:16}})}))}))]}))]})),n(d,e({sx:e({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==V?void 0:V.editorContainer)},{children:n(k,{content:A,selectedTag:ce,isDarkMode:pe,height:"100%",fontSize:13})}))]}))]})),q&&i(m,e({open:!!xe,onClose:function(){return me(null)},maxWidth:!1,PaperProps:{sx:e({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==V?void 0:V.fullscreenModal)}},{children:[i(d,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[n(c,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),n(u,e({size:"small",onClick:function(){return me(null)}},{children:n(y,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i(d,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i(d,e({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[n(f,e({title:"Atomic Prompt Block",placement:"top"},{children:n(g,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),n(c,e({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==xe?void 0:xe.ref}))]})),i(d,e({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),n(c,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==xe?void 0:xe.description}))]})),i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[n(c,e({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),n(c,e({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:A.split("\n").length}))]}))]}))]})),i(d,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),n(x,{checked:pe,onChange:function(e){return fe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),n(d,e({sx:{flex:1,minHeight:0,p:1.5}},{children:n(k,{content:A,selectedTag:ce,isDarkMode:pe,height:"100%",fontSize:13})}))]}))]}))]}))]}))};export{M as default};
|
|
2
|
+
//# sourceMappingURL=Spbanalysispanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spbanalysispanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const useCompareLayout: (initialMaintainOrder: boolean, scrollContainerRef: React.RefObject<HTMLDivElement>, lhsBadgeRefs: any, rhsBadgeRefs: any, proposedSections: any[], existingSections: any[]) => {
|
|
3
2
|
maintainRelativeOrder: boolean;
|
|
4
3
|
setMaintainRelativeOrder: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface PromptemonBlockViewerProps {
|
|
2
3
|
title: string;
|
|
3
4
|
description?: string;
|
|
4
5
|
content: string;
|
|
5
|
-
height?: number;
|
|
6
|
+
height?: number | string;
|
|
6
7
|
selectedTag?: string;
|
|
7
8
|
highlightVariable?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
showThemeToggle?: boolean;
|
|
12
|
+
theme?: "dark" | "light";
|
|
13
|
+
/** Custom editor background color override */
|
|
14
|
+
editorBackgroundColor?: string;
|
|
15
|
+
/** Font size for the Monaco code editor */
|
|
16
|
+
fontSize?: number;
|
|
17
|
+
/** Font size for the title header */
|
|
18
|
+
titleFontSize?: string | number;
|
|
19
|
+
/** Custom styles for the title header */
|
|
20
|
+
titleStyle?: React.CSSProperties;
|
|
8
21
|
}
|
|
9
|
-
declare const PromptemonBlockViewer: ({ title, description, content, height, selectedTag, highlightVariable, }: PromptemonBlockViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare const PromptemonBlockViewer: ({ title, description, content, height, selectedTag, highlightVariable, className, style, showThemeToggle, theme, editorBackgroundColor, fontSize, titleFontSize, titleStyle, }: PromptemonBlockViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
23
|
export default PromptemonBlockViewer;
|
|
11
24
|
//# sourceMappingURL=PromptemonBlockViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptemonBlockViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PromptemonBlockViewer/PromptemonBlockViewer.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PromptemonBlockViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PromptemonBlockViewer/PromptemonBlockViewer.tsx"],"names":[],"mappings":";AAgBA,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,yCAAyC;IACzC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACpC;AAqRD,QAAA,MAAM,qBAAqB,mLAexB,0BAA0B,4CAgI5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -28,10 +28,19 @@ interface ApiData {
|
|
|
28
28
|
nodes: RawNode[];
|
|
29
29
|
edges: Edge[];
|
|
30
30
|
}
|
|
31
|
-
interface DependencyGraphProps {
|
|
31
|
+
export interface DependencyGraphProps {
|
|
32
32
|
data: ApiData;
|
|
33
|
+
isDarkMode?: boolean;
|
|
34
|
+
style?: React.CSSProperties | any;
|
|
35
|
+
sx?: any;
|
|
33
36
|
}
|
|
34
|
-
|
|
37
|
+
export interface DependencyGraphInnerProps {
|
|
38
|
+
data: ApiData;
|
|
39
|
+
onFullscreen?: () => void;
|
|
40
|
+
isFullscreen?: boolean;
|
|
41
|
+
isDarkMode?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare function DependencyGraph({ data, isDarkMode, style }: DependencyGraphProps): React.ReactElement;
|
|
35
44
|
declare const _default: React.MemoExoticComponent<typeof DependencyGraph>;
|
|
36
45
|
export default _default;
|
|
37
46
|
//# sourceMappingURL=DependencyGraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyGraph.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/DependencyGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAKjF,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,OAAO;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AA8CD,
|
|
1
|
+
{"version":3,"file":"DependencyGraph.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/DependencyGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAKjF,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,OAAO;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AA8CD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,EAAE,CAAC,EAAE,GAAG,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAosBD,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,UAAkB,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAsCtG;;AAED,wBAA2C"}
|
|
@@ -4,7 +4,11 @@ export interface MarkdownRendererProps {
|
|
|
4
4
|
fontSize?: React.CSSProperties["fontSize"];
|
|
5
5
|
/** Keyed by the id referenced in `<a data-cognitive-reasoning="key">` anchors */
|
|
6
6
|
extraMetaData?: Record<string, any> | null;
|
|
7
|
+
/** Whether dark mode is active */
|
|
8
|
+
isDarkMode?: boolean;
|
|
9
|
+
style?: React.CSSProperties | any;
|
|
10
|
+
sx?: any;
|
|
7
11
|
}
|
|
8
|
-
export declare const MarkdownRenderer: ({ message, fontSize, extraMetaData }: MarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const MarkdownRenderer: ({ message, fontSize, extraMetaData, isDarkMode, style, sx }: MarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export default MarkdownRenderer;
|
|
10
14
|
//# sourceMappingURL=Markdownrenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdownrenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Markdownrenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAiMpE,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Markdownrenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Markdownrenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAiMpE,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,EAAE,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAO,MAAM,gBAAgB,gEAAyE,qBAAqB,4CA0P1H,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface SPBApbReference {
|
|
2
3
|
apb_name: string;
|
|
3
4
|
description?: string;
|
|
@@ -23,6 +24,62 @@ export interface SPBAdditionalInfo {
|
|
|
23
24
|
output_analysis?: string;
|
|
24
25
|
dependency_graph?: any;
|
|
25
26
|
}
|
|
27
|
+
export interface SPBAnalysisPanelStyles {
|
|
28
|
+
/** Root container style overrides */
|
|
29
|
+
root?: React.CSSProperties | any;
|
|
30
|
+
/** Header top bar style overrides */
|
|
31
|
+
header?: React.CSSProperties | any;
|
|
32
|
+
/** Header title typography style overrides */
|
|
33
|
+
headerTitle?: React.CSSProperties | any;
|
|
34
|
+
/** Header subtitle typography style overrides */
|
|
35
|
+
headerSubtitle?: React.CSSProperties | any;
|
|
36
|
+
/** Left panel container style overrides */
|
|
37
|
+
leftPanel?: React.CSSProperties | any;
|
|
38
|
+
/** Overview outer container style overrides */
|
|
39
|
+
overviewSection?: React.CSSProperties | any;
|
|
40
|
+
/** Overview header title style overrides */
|
|
41
|
+
overviewTitle?: React.CSSProperties | any;
|
|
42
|
+
/** Overview content box style overrides */
|
|
43
|
+
overviewContent?: React.CSSProperties | any;
|
|
44
|
+
/** Functionality section main accordion style overrides */
|
|
45
|
+
functionalitySection?: React.CSSProperties | any;
|
|
46
|
+
/** Functionality section title style overrides */
|
|
47
|
+
functionalityTitle?: React.CSSProperties | any;
|
|
48
|
+
/** Individual functionality item accordion style overrides */
|
|
49
|
+
functionalityItem?: React.CSSProperties | any;
|
|
50
|
+
/** Applicability section accordion style overrides */
|
|
51
|
+
applicabilitySection?: React.CSSProperties | any;
|
|
52
|
+
/** Applicability section title style overrides */
|
|
53
|
+
applicabilityTitle?: React.CSSProperties | any;
|
|
54
|
+
/** Specifications section accordion style overrides */
|
|
55
|
+
specificationsSection?: React.CSSProperties | any;
|
|
56
|
+
/** Specifications section title style overrides */
|
|
57
|
+
specificationsTitle?: React.CSSProperties | any;
|
|
58
|
+
/** Dependency graph section accordion style overrides */
|
|
59
|
+
dependencyGraphSection?: React.CSSProperties | any;
|
|
60
|
+
/** Dependency graph title style overrides */
|
|
61
|
+
dependencyGraphTitle?: React.CSSProperties | any;
|
|
62
|
+
/** Dependency graph component style overrides */
|
|
63
|
+
dependencyGraph?: React.CSSProperties | any;
|
|
64
|
+
/** Right-side persistent code panel container style overrides */
|
|
65
|
+
codePanel?: React.CSSProperties | any;
|
|
66
|
+
/** Code panel header bar style overrides */
|
|
67
|
+
codePanelHeader?: React.CSSProperties | any;
|
|
68
|
+
/** Code panel title style overrides */
|
|
69
|
+
codePanelTitle?: React.CSSProperties | any;
|
|
70
|
+
/** Monaco internal editor container style overrides */
|
|
71
|
+
editorContainer?: React.CSSProperties | any;
|
|
72
|
+
/** Vertical collapse strip style overrides */
|
|
73
|
+
collapseStrip?: React.CSSProperties | any;
|
|
74
|
+
/** Drag handle pill style overrides */
|
|
75
|
+
dragHandle?: React.CSSProperties | any;
|
|
76
|
+
/** Fullscreen modal paper style overrides */
|
|
77
|
+
fullscreenModal?: React.CSSProperties | any;
|
|
78
|
+
/** Markdown renderer custom style overrides */
|
|
79
|
+
markdownRenderer?: React.CSSProperties | any;
|
|
80
|
+
/** Theme mode flag inside styles object if passed */
|
|
81
|
+
isDarkMode?: boolean;
|
|
82
|
+
}
|
|
26
83
|
export interface SPBAnalysisPanelProps {
|
|
27
84
|
/** Full text of the system prompt this SPB analysis is derived from — used for the persistent/fullscreen preview editor */
|
|
28
85
|
promptContent: string;
|
|
@@ -33,7 +90,25 @@ export interface SPBAnalysisPanelProps {
|
|
|
33
90
|
spbAdditionalInfo?: SPBAdditionalInfo | null;
|
|
34
91
|
/** Show the persistent right-side code editor panel. Defaults to true. */
|
|
35
92
|
showCodePanel?: boolean;
|
|
93
|
+
/** Show the vertical collapse strip and drag handle pill. Defaults to true. */
|
|
94
|
+
showCollapseStrip?: boolean;
|
|
95
|
+
/** Show the Fullscreen button in the code panel header. Defaults to true. */
|
|
96
|
+
showFullscreenButton?: boolean;
|
|
97
|
+
/** Allow and show the Fullscreen preview modal (Dialog). Defaults to true. */
|
|
98
|
+
showFullscreenModal?: boolean;
|
|
99
|
+
/** Show the dark/light theme toggle switch in code panels. Defaults to true. */
|
|
100
|
+
showThemeToggle?: boolean;
|
|
101
|
+
/** Single customizable styles object containing section-specific style overrides for all components down to the core */
|
|
102
|
+
styles?: SPBAnalysisPanelStyles;
|
|
103
|
+
/** Whether dark mode theme is active. Defaults to true. (Can also be set inside `styles.isDarkMode`). */
|
|
104
|
+
isDarkMode?: boolean;
|
|
105
|
+
/** Optional custom CSS class name for the root container */
|
|
106
|
+
className?: string;
|
|
107
|
+
/** Optional custom inline style object for the root container */
|
|
108
|
+
style?: React.CSSProperties;
|
|
109
|
+
/** Optional MUI sx prop overrides for the root container */
|
|
110
|
+
sx?: any;
|
|
36
111
|
}
|
|
37
|
-
declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, showCodePanel, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, showCodePanel, showCollapseStrip, showFullscreenButton, showFullscreenModal, showThemeToggle, isDarkMode: isDarkModeProp, styles, className, style, sx, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
113
|
export default SPBAnalysisPanel;
|
|
39
114
|
//# sourceMappingURL=Spbanalysispanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spbanalysispanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Spbanalysispanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spbanalysispanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Spbanalysispanel.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as SPBAnalysisPanel } from "./Spbanalysispanel";
|
|
2
|
-
export type { SPBAnalysisPanelProps, SPBApbReference, SPBFunctionalityItem, SPBOverviewSummary, SPBAdditionalInfo, } from "./Spbanalysispanel";
|
|
2
|
+
export type { SPBAnalysisPanelProps, SPBAnalysisPanelStyles, SPBApbReference, SPBFunctionalityItem, SPBOverviewSummary, SPBAdditionalInfo, } from "./Spbanalysispanel";
|
|
3
3
|
export { default as MarkdownRenderer } from "./Markdownrenderer";
|
|
4
4
|
export type { MarkdownRendererProps } from "./Markdownrenderer";
|
|
5
5
|
export { default as DependencyGraph } from "./DependencyGraph";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EACR,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAK9H,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EACR,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAK9H,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -39,6 +39,8 @@ export { default as PromptemonBlockViewer } from "./features/PromptemonBlockView
|
|
|
39
39
|
export type { PromptemonBlockViewerProps } from "./features/PromptemonBlockViewer/PromptemonBlockViewer";
|
|
40
40
|
export { default as PromptemonViewer } from "./features/PromptemonViewer/PromptemonViewer";
|
|
41
41
|
export type { PromptemonViewerProps, SPBCategory, SPBSubCategory } from "./features/PromptemonViewer/PromptemonViewer";
|
|
42
|
+
export { default as SPBAnalysisPanel } from "./features/SPBAnalysisPanel/Spbanalysispanel";
|
|
43
|
+
export type { SPBAnalysisPanelProps, SPBAnalysisPanelStyles, SPBApbReference, SPBFunctionalityItem, SPBOverviewSummary, SPBAdditionalInfo, } from "./features/SPBAnalysisPanel/Spbanalysispanel";
|
|
42
44
|
export { default as GptWebCitation } from "./features/GptWebCitation/GptWebCitation";
|
|
43
45
|
export { useOnDemandCitationFetch } from "./hooks/useOnDemandCitationFetch";
|
|
44
46
|
export { default as InstantLearningCitationWrapper } from "./features/InstantLearningCitation/InstantLearningCitationComponent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"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"}
|