cortex-react-components 2.6.1 → 2.7.1

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.
Files changed (143) hide show
  1. package/dist/{chunk-NPGGDQ6F.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-B2TBKNIJ.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-QTILVWJA.mjs → chunk-4RYG24IZ.mjs} +1 -1
  4. package/dist/{chunk-FX6IXEMQ.mjs → chunk-4SRUEQTP.mjs} +1 -1
  5. package/dist/{chunk-WB2Y7HTT.mjs → chunk-55MVSCX4.mjs} +1 -1
  6. package/dist/chunk-56X4PU43.mjs +4 -0
  7. package/dist/{chunk-ABGNIQRP.mjs → chunk-5RDLHKTK.mjs} +1 -1
  8. package/dist/chunk-6OCLRAHU.mjs +1 -0
  9. package/dist/{chunk-RY4C3J33.mjs → chunk-77PCUNUC.mjs} +1 -1
  10. package/dist/{chunk-SPAOEUCG.mjs → chunk-7OMPPFGG.mjs} +1 -1
  11. package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
  12. package/dist/{chunk-KY3ELFX5.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  13. package/dist/{chunk-75WE6ZXB.mjs → chunk-CLGBBNRB.mjs} +1 -1
  14. package/dist/{chunk-STX6KQP5.mjs → chunk-DPZHVBGG.mjs} +1 -1
  15. package/dist/{chunk-TK4JC5PG.mjs → chunk-E64KWNOT.mjs} +1 -1
  16. package/dist/{chunk-QWFFSMKK.mjs → chunk-F64CA5CH.mjs} +1 -1
  17. package/dist/{chunk-FRXZ2OKW.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-57PJ7CHJ.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-VBSFVJM5.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/{chunk-3ZF4TV4N.mjs → chunk-GLBQHEMQ.mjs} +1 -1
  21. package/dist/{chunk-S4ES6P3Y.mjs → chunk-HDKHF3EA.mjs} +1 -1
  22. package/dist/{chunk-N52FSTLG.mjs → chunk-HKMNAXLM.mjs} +1 -1
  23. package/dist/chunk-HME6CJ6L.mjs +1 -0
  24. package/dist/{chunk-XD3TBE5O.mjs → chunk-JHYWAL24.mjs} +1 -1
  25. package/dist/{chunk-XDQAH5AP.mjs → chunk-JTC4NOAT.mjs} +1 -1
  26. package/dist/{chunk-AEFWTCCE.mjs → chunk-KZAYLEFB.mjs} +1 -1
  27. package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
  28. package/dist/{chunk-RUZVSK25.mjs → chunk-MO4HRQEL.mjs} +1 -1
  29. package/dist/{chunk-MPTT6GRI.mjs → chunk-NTS4U2OE.mjs} +1 -1
  30. package/dist/{chunk-Q7KKN6MH.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  31. package/dist/{chunk-3DYGB2K5.mjs → chunk-PIOFHZSJ.mjs} +1 -1
  32. package/dist/{chunk-2VOOH4YJ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  33. package/dist/{chunk-TUACRDU3.mjs → chunk-PTZT4QJW.mjs} +1 -1
  34. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  35. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  36. package/dist/{chunk-75XBZHOC.mjs → chunk-U3FYDDE2.mjs} +1 -1
  37. package/dist/{chunk-SEXSYCWD.mjs → chunk-URYIYEGY.mjs} +1 -1
  38. package/dist/{chunk-AFQBDAWS.mjs → chunk-W7MEHF4G.mjs} +1 -1
  39. package/dist/{chunk-RAGDUV7M.mjs → chunk-XIGBDWYI.mjs} +1 -1
  40. package/dist/{chunk-FOEPKY7T.mjs → chunk-XW52WZ2B.mjs} +1 -1
  41. package/dist/{chunk-RRLXKDET.mjs → chunk-YMOW5WNP.mjs} +1 -1
  42. package/dist/components/Blocks/Banner.mjs +1 -1
  43. package/dist/components/Blocks/CallToAction.mjs +1 -1
  44. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  45. package/dist/components/Blocks/Content.mjs +1 -1
  46. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  47. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  48. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  49. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  50. package/dist/components/Blocks/index.mjs +1 -1
  51. package/dist/components/CRM/CogeBoard.mjs +1 -1
  52. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  53. package/dist/components/CRM/index.mjs +1 -1
  54. package/dist/components/Cards/ContentCard.mjs +1 -1
  55. package/dist/components/Cards/FeatureCard.mjs +1 -1
  56. package/dist/components/Cards/index.mjs +1 -1
  57. package/dist/components/Chat/ChatInterface.d.ts +3 -3
  58. package/dist/components/Chat/ChatInterface.js +2 -2
  59. package/dist/components/Chat/ChatInterface.mjs +1 -1
  60. package/dist/components/Chat/CopilotInterface.js +3 -3
  61. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  62. package/dist/components/Chat/PartTypes/PartText.d.ts +4 -0
  63. package/dist/components/Chat/PartTypes/PartText.js +1 -0
  64. package/dist/components/Chat/PartTypes/PartText.mjs +1 -0
  65. package/dist/components/Chat/PartTypes/index.d.ts +1 -0
  66. package/dist/components/Chat/PartTypes/index.js +4 -4
  67. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  68. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  69. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  70. package/dist/components/Chat/demo-long-messages.js +8 -8
  71. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  72. package/dist/components/Chat/demo-tests.js +28 -28
  73. package/dist/components/Chat/demo-tests.mjs +1 -1
  74. package/dist/components/Chat/demo.js +3 -3
  75. package/dist/components/Chat/demo.mjs +1 -1
  76. package/dist/components/Chat/example-usage.js +3 -3
  77. package/dist/components/Chat/example-usage.mjs +1 -1
  78. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  79. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  80. package/dist/components/Chat/index.js +5 -5
  81. package/dist/components/Chat/index.mjs +1 -1
  82. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  83. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  84. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  85. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  86. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  88. package/dist/components/DigitalColleagues/index.mjs +1 -1
  89. package/dist/components/HeaderFooter/Header.mjs +1 -1
  90. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  91. package/dist/components/HeaderFooter/index.mjs +1 -1
  92. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  93. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  94. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  95. package/dist/components/Heros/PostHero/index.mjs +1 -1
  96. package/dist/components/Heros/RenderHero.mjs +1 -1
  97. package/dist/components/Heros/index.mjs +1 -1
  98. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  99. package/dist/components/Layouts/Print.mjs +1 -1
  100. package/dist/components/Layouts/SlideShow.mjs +1 -1
  101. package/dist/components/Layouts/index.mjs +1 -1
  102. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  103. package/dist/components/Menus/SidebarRight.mjs +1 -1
  104. package/dist/components/Menus/index.mjs +1 -1
  105. package/dist/components/Payload/RichText/index.mjs +1 -1
  106. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  107. package/dist/components/Payload/index.mjs +1 -1
  108. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  109. package/dist/components/Projects/ProjectPage.mjs +1 -1
  110. package/dist/components/Projects/ProjectView.mjs +1 -1
  111. package/dist/components/dc-temp/index.mjs +1 -1
  112. package/dist/components/index.js +13 -13
  113. package/dist/components/index.mjs +1 -1
  114. package/dist/components/ui/index.mjs +1 -1
  115. package/dist/components/ui/sidebar.mjs +1 -1
  116. package/dist/globals.css +1 -1
  117. package/dist/index.js +16 -16
  118. package/dist/index.mjs +1 -1
  119. package/dist/metafile-cjs.json +1 -1
  120. package/dist/metafile-esm.json +1 -1
  121. package/dist/pages/Blog.mjs +1 -1
  122. package/dist/pages/Documentation.mjs +1 -1
  123. package/dist/pages/IndexPage.mjs +1 -1
  124. package/dist/pages/Intranet.mjs +1 -1
  125. package/dist/pages/LandingPage.mjs +1 -1
  126. package/dist/pages/Page.mjs +1 -1
  127. package/dist/pages/Publish.mjs +1 -1
  128. package/dist/pages/Website.mjs +1 -1
  129. package/dist/sections/AboutSection.mjs +1 -1
  130. package/dist/sections/BlogDetail.mjs +1 -1
  131. package/dist/sections/BlogList.mjs +1 -1
  132. package/dist/sections/BlogListSection.mjs +1 -1
  133. package/dist/sections/ContactSection.mjs +1 -1
  134. package/dist/sections/PageSections.mjs +1 -1
  135. package/dist/sections/PricingSection.mjs +1 -1
  136. package/dist/sections/ServiceDetail.mjs +1 -1
  137. package/dist/sections/ServiceDetailSection.mjs +1 -1
  138. package/dist/sections/ServiceSection.mjs +1 -1
  139. package/dist/sections/form/index.mjs +1 -1
  140. package/dist/sections/index.mjs +1 -1
  141. package/package.json +3 -1
  142. package/dist/chunk-5BK3HTPN.mjs +0 -4
  143. package/dist/chunk-FUEUJPNZ.mjs +0 -1
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-SIL7AP7H.mjs";import{a as _}from"./chunk-LUPNE23E.mjs";import{a as V}from"./chunk-A2AEX4YB.mjs";import{a as J}from"./chunk-DBY4SXQI.mjs";import{a as W}from"./chunk-I3E2TYYZ.mjs";import{d as D}from"./chunk-Q2DPE66H.mjs";import{a as $}from"./chunk-FT3AE7L2.mjs";import{a as U}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{a as N,c as h}from"./chunk-SOLZ4VQH.mjs";import{b as K}from"./chunk-CSBGSBEU.mjs";import{a as f,b as x,c as b,e as v}from"./chunk-YO3GQYRJ.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{useRef as A,useEffect as G,useState as Q}from"react";import{motion as E,AnimatePresence as ce}from"framer-motion";import{Send as ue,Bot as M,User as pe,Menu as fe,Paperclip as ve,X as ge,FileText as Ne,Image as he,File as xe,Download as be,ExternalLink as ye}from"lucide-react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function Xe({messages:P,input:B,isTyping:y=!1,currentSessionTitle:Ce,capabilities:F,fileUploads:C,isDragOver:X,enableFileUpload:S,onInputChange:j,addToolResult:Y,onSendMessage:Z,onKeyPress:ee,onFileUpload:R,onRemoveFile:te,onDragOver:w,className:ae}){let k=A(null),se=A(null),L=A(null),[c,g]=Q(!1),[z,we]=Q({path:[],selectedItems:[],filters:{}});G(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[P]),G(()=>{c&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[c]);let H=()=>D(z),ie=()=>{let t=[];return F.forEach(i=>{i.actions&&i.actions.forEach(r=>{t.push({label:r.label,action:()=>T(r.id,{path:[i],selectedItems:[],filters:{}})})}),i.children&&i.children.forEach(r=>{r.type==="list"&&r.data&&t.push({label:`View ${r.name}`,action:()=>g(!0)})})}),t.slice(0,5)},T=(t,i)=>{console.log("Capability action:",t,i);let r=`Executing ${t} with context: ${JSON.stringify(i.path.map(u=>u.name))}`;g(!1)},ke=D({path:[],selectedItems:[],filters:{}}),re=t=>{R(t.target.files),t.target.files&&(t.target.value="")},le=t=>{t.preventDefault(),w(!0)},oe=t=>{t.preventDefault(),w(!1)},ne=t=>{t.preventDefault(),w(!1),R(t.dataTransfer.files)},me=t=>{if(t===0)return"0 Bytes";let i=1024,r=["Bytes","KB","MB","GB"],u=Math.floor(Math.log(t)/Math.log(i));return parseFloat((t/Math.pow(i,u)).toFixed(2))+" "+r[u]},O=t=>t.startsWith("image/")?e(he,{className:"h-4 w-4"}):t.startsWith("text/")?e(Ne,{className:"h-4 w-4"}):e(xe,{className:"h-4 w-4"}),de=t=>{let i=t.role==="assistant",r=t.role==="user",u=_(t);return s("div",{className:p("flex items-start gap-3",r?"flex-row-reverse":""),children:[e(N,{className:"h-8 w-8 shrink-0",children:e(h,{className:p(r?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:r?e(pe,{className:"h-4 w-4"}):e(M,{className:"h-4 w-4"})})}),s("div",{className:p("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",r?"bg-primary text-primary-foreground":"bg-muted"),children:[u&&e("div",{className:"mb-2 last:mb-0",children:e("p",{className:"text-sm",children:u})}),t.parts.map((n,l)=>{if(n.type==="text")return null;if(n.type==="file"){let a=n;return e("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:s("div",{className:"flex items-center gap-2",children:[O(a.mediaType||"application/octet-stream"),e("div",{className:"flex-1 min-w-0",children:e("p",{className:"text-sm font-medium truncate",children:a.filename||a.url?.split("/").pop()||"File"})}),a.url&&e(m,{variant:"ghost",size:"sm",onClick:()=>window.open(a.url,"_blank"),className:"h-8 w-8 p-0",children:e(be,{className:"h-4 w-4"})})]})},l)}if(n.type.startsWith("tool-")){let a=n,d=n.type.replace("tool-","");if(d==="task")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading task..."},l);case"output-available":return e("div",{className:"mb-2",children:e(W,{data:{id:a.output?.id||a.input?.id,fetchLatest:!1,taskData:a.output||a.input}})},l);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},l);default:return null}if(n.type==="tool-requestEndpointLogin")return e("div",{className:"mb-2",children:e(q,{toolPart:a,index:l,addToolResult:Y??(()=>{})})},l);if(d==="artefact")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading artefact..."},l);case"output-available":return e("div",{className:"mb-2",children:e(J,{artefact:a.output?.description||"",taskId:a.output?.id||a.input?.id,taskData:a.output||a.input})},l);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},l);default:return null}return e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(x,{children:e(b,{className:"text-lg",children:d})}),s(v,{children:[a.state==="input-available"&&s("p",{className:"text-sm",children:["Processing ",d,"..."]}),a.state==="output-available"&&e("pre",{className:"text-sm",children:JSON.stringify(a.output,null,2)}),a.state==="output-error"&&s("p",{className:"text-sm text-red-500",children:["Error: ",a.errorText]})]})]})},l)}if(n.type.startsWith("data-")){let a=n,d=n.type.replace("data-","");return d==="reference"?e("div",{className:"mb-2",children:e(f,{className:"w-full",children:e(v,{className:"p-4",children:e("div",{className:"space-y-2",children:a.data?.references?.map((o,I)=>s("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[e(K,{variant:"outline",children:o.type||"link"}),s("div",{className:"flex-1 min-w-0",children:[e("p",{className:"text-sm font-medium truncate",children:o.title}),o.description&&e("p",{className:"text-xs text-muted-foreground truncate",children:o.description})]}),o.url&&e(m,{variant:"ghost",size:"sm",onClick:()=>window.open(o.url,"_blank"),className:"h-8 w-8 p-0",children:e(ye,{className:"h-4 w-4"})})]},I))})})})},l):d==="menu"?e("div",{className:"mb-2",children:s(f,{className:"w-full",children:[e(x,{children:e(b,{className:"text-lg",children:a.data?.title})}),e(v,{children:e("div",{className:"space-y-2",children:a.data?.items?.map((o,I)=>e(m,{variant:"outline",className:"w-full justify-start",onClick:o.action,children:s("div",{className:"text-left",children:[e("p",{className:"font-medium",children:o.label}),o.description&&e("p",{className:"text-xs text-muted-foreground",children:o.description})]})},I))})})]})},l):e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(x,{children:e(b,{className:"text-lg",children:d})}),e(v,{children:e("pre",{className:"text-sm",children:JSON.stringify(a.data,null,2)})})]})},l)}return null})]})]})};return s("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${ae||""}`,children:[s($,{ref:se,className:"flex-1 p-4 bg-background border-0",onDragOver:le,onDragLeave:oe,onDrop:ne,children:[s("div",{className:p("space-y-4",X&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[e(ce,{children:P.map(t=>e(E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:p("flex gap-3",t.role==="user"?"flex-row-reverse":"flex-row"),children:de(t)},t.id))}),c&&s(E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[e(N,{className:"h-8 w-8",children:e(h,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(M,{className:"h-4 w-4"})})}),e("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:e(V,{capabilities:F,isOpen:c,onToggle:()=>g(!c),onActionSelect:T,className:"w-full"})})]}),y&&s(E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[e(N,{className:"h-8 w-8",children:e(h,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(M,{className:"h-4 w-4"})})}),e("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:s("div",{className:"flex space-x-1",children:[e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),e("div",{ref:k})]}),C.length>0&&e("div",{className:"p-4 border-t bg-muted/10",children:e("div",{className:"flex flex-wrap gap-2",children:C.map(t=>s("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[O(t.file.type),e("span",{className:"text-sm font-medium",children:t.file.name}),e("span",{className:"text-xs text-muted-foreground",children:me(t.file.size)}),e(m,{variant:"ghost",size:"sm",onClick:()=>te(t.id),className:"h-6 w-6 p-0",children:e(ge,{className:"h-4 w-4"})})]},t.id))})}),s("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[s("div",{className:"flex gap-3",children:[e(U,{value:B,onChange:t=>j(t.target.value),onKeyPress:ee,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:y}),S&&e(m,{variant:"outline",size:"icon",onClick:()=>L.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:e(ve,{className:"h-4 w-4"})}),e(m,{onClick:Z,disabled:!B.trim()&&C.length===0||y,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:e(ue,{className:"h-4 w-4"})})]}),s("div",{className:"flex items-center gap-3 mt-3",children:[s(m,{onClick:()=>g(!c),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[e(fe,{className:"h-3 w-3 mr-1"}),c?"Hide":"Show"," Capabilities"]}),s("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[H().map((t,i)=>e(m,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>T(t.id,z),children:t.label},`context-${t.id}`)),H().length===0&&ie().map((t,i)=>e(m,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:t.action,children:t.label},`suggestion-${i}`))]})]}),S&&e("input",{ref:L,type:"file",multiple:!0,onChange:re,className:"hidden"})]})]})}export{Xe as a};