cortex-react-components 2.15.0 → 2.16.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.
- package/dist/{chunk-N3B3XNV3.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/{chunk-NWISIJFD.mjs → chunk-3Y7QG6VP.mjs} +1 -1
- package/dist/{chunk-A2KX5N75.mjs → chunk-4ZWGVKVT.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-DMCFEJ2C.mjs → chunk-6VRPQKAK.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-7GMAMIHM.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-JTVWQ42C.mjs → chunk-DDQWJGAN.mjs} +1 -1
- package/dist/{chunk-D2H36ZLW.mjs → chunk-DXE6AGJX.mjs} +1 -1
- package/dist/{chunk-5WVFEIMC.mjs → chunk-EM3T2XYC.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-LJXTXROJ.mjs} +1 -1
- package/dist/{chunk-PO3XUUWY.mjs → chunk-LLP4EFT4.mjs} +1 -1
- package/dist/{chunk-OLIYPWO3.mjs → chunk-LQX37M4T.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/{chunk-RX63ABAF.mjs → chunk-O54IXEY5.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/chunk-OGAY4DL2.mjs +1 -0
- package/dist/{chunk-TILPSVAP.mjs → chunk-PHQMSVOB.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/{chunk-XKGBG5FX.mjs → chunk-TVTTUSWM.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/chunk-UGBDJDPW.mjs +4 -0
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-WIRQ5IRT.mjs} +1 -1
- package/dist/{chunk-2HWSTGAP.mjs → chunk-XQ3XV5DH.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-62A35O55.mjs → chunk-ZEALRBXW.mjs} +1 -1
- package/dist/chunk-ZN7NNMB7.mjs +4 -0
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +6 -6
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +7 -7
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/CodeBlock.css +1 -0
- package/dist/components/Chat/PartTypes/CodeBlock.d.ts +15 -0
- package/dist/components/Chat/PartTypes/CodeBlock.js +4 -0
- package/dist/components/Chat/PartTypes/CodeBlock.mjs +2 -0
- package/dist/components/Chat/PartTypes/Tool.css +1 -0
- package/dist/components/Chat/PartTypes/Tool.d.ts +22 -0
- package/dist/components/Chat/PartTypes/Tool.js +5 -0
- package/dist/components/Chat/PartTypes/Tool.mjs +2 -0
- package/dist/components/Chat/PartTypes/index.d.ts +2 -0
- package/dist/components/Chat/PartTypes/index.js +6 -6
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +12 -12
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +27 -27
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +7 -7
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +7 -7
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +7 -7
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +11 -11
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +14 -14
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +25 -25
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +5 -2
- package/dist/chunk-UTHKFW4R.mjs +0 -1
package/dist/chunk-UTHKFW4R.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as G}from"./chunk-3BG2SCNC.mjs";import{a as E}from"./chunk-SIL7AP7H.mjs";import{a as _}from"./chunk-6OCLRAHU.mjs";import{a as Q,b as X,c as j}from"./chunk-5Y6FKL5W.mjs";import{a as q}from"./chunk-2LINLX4S.mjs";import{a as V}from"./chunk-DBY4SXQI.mjs";import{a as J}from"./chunk-I2PVJQQR.mjs";import{d as P}from"./chunk-Q2DPE66H.mjs";import{a as K}from"./chunk-FT3AE7L2.mjs";import{a as U}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{a as h,c as x}from"./chunk-SOLZ4VQH.mjs";import{b as W}from"./chunk-CSBGSBEU.mjs";import{a as f,b as N,c as y,e as v}from"./chunk-YO3GQYRJ.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{useRef as M,useEffect as Y,useState as Z}from"react";import*as u from"motion/react-client";import{Send as fe,Bot as B,User as ve,Menu as ge,Paperclip as Ne,X as ye,FileText as he,Image as xe,File as be,Download as Ce,ExternalLink as we}from"lucide-react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function Je({messages:b,input:F,isTyping:C=!1,currentSessionTitle:ke,capabilities:R,fileUploads:w,isDragOver:ee,enableFileUpload:S,onInputChange:te,addToolResult:k,onSendMessage:ae,onKeyPress:se,onFileUpload:L,onRemoveFile:ie,onDragOver:T,className:re}){let I=M(null),le=M(null),z=M(null),[c,g]=Z(!1),[H,Te]=Z({path:[],selectedItems:[],filters:{}});Y(()=>{I.current?.scrollIntoView({behavior:"smooth"})},[b]),Y(()=>{c&&setTimeout(()=>{I.current?.scrollIntoView({behavior:"smooth"})},100)},[c]);let O=()=>P(H),oe=()=>{let t=[];return R.forEach(l=>{l.actions&&l.actions.forEach(o=>{t.push({label:o.label,action:()=>D(o.id,{path:[l],selectedItems:[],filters:{}})})}),l.children&&l.children.forEach(o=>{o.type==="list"&&o.data&&t.push({label:`View ${o.name}`,action:()=>g(!0)})})}),t.slice(0,5)},D=(t,l)=>{console.log("Capability action:",t,l);let o=`Executing ${t} with context: ${JSON.stringify(l.path.map(i=>i.name))}`;g(!1)},Ie=P({path:[],selectedItems:[],filters:{}}),ne=t=>{L(t.target.files),t.target.files&&(t.target.value="")},me=t=>{t.preventDefault(),T(!0)},de=t=>{t.preventDefault(),T(!1)},ce=t=>{t.preventDefault(),T(!1),L(t.dataTransfer.files)},ue=t=>{if(t===0)return"0 Bytes";let l=1024,o=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(t)/Math.log(l));return parseFloat((t/Math.pow(l,i)).toFixed(2))+" "+o[i]},$=t=>t.startsWith("image/")?e(xe,{className:"h-4 w-4"}):t.startsWith("text/")?e(he,{className:"h-4 w-4"}):e(be,{className:"h-4 w-4"}),pe=t=>{let l=t.role==="assistant",o=t.role==="user";return s("div",{className:p("flex my-2 items-start gap-3",o?"flex-row-reverse":""),children:[e(h,{className:"h-8 w-8 shrink-0",children:e(x,{className:p(o?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:o?e(ve,{className:"h-4 w-4"}):e(B,{className:"h-4 w-4"})})}),e("div",{className:p("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",o?"bg-primary text-primary-foreground":"bg-muted"),children:t.parts.map((i,r)=>{if(i.type==="text")return e(_,{id:t.id,content:i.text},`${t.id}-text`);if(i.type==="file"){let a=i;return e("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:s("div",{className:"flex items-center gap-2",children:[$(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(Ce,{className:"h-4 w-4"})})]})},r)}if(i.type.startsWith("tool-")){let a=i,d=i.type.replace("tool-","");if(d==="task")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading task..."},r);case"output-available":return e("div",{className:"mb-2",children:e(J,{data:{id:a.output?.id||a.input?.id,fetchLatest:!1,taskData:a.output||a.input}})},r);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},r);default:return null}if(i.type==="tool-requestEndpointLogin")return e("div",{className:"mb-2",children:e(E,{toolPart:a,index:r,addToolResult:k??(()=>{})})},r);if(i.type==="tool-authenticate")return e("div",{className:"mb-2",children:e(E,{toolPart:a,index:r,addToolResult:k??(()=>{})})},r);if(i.type==="tool-requestApproval")return e("div",{className:"mb-2",children:e(G,{toolPart:a,index:r,addToolResult:k??(()=>{})})},r);if(d==="artefact")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading artefact..."},r);case"output-available":return e("div",{className:"mb-2",children:e(V,{artefact:a.output?.description||"",taskId:a.output?.id||a.input?.id,taskData:a.output||a.input})},r);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},r);default:return null}return e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(N,{children:e(y,{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]})]})]})},r)}if(i.type.startsWith("data-")){let a=i,d=i.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((n,A)=>s("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[e(W,{variant:"outline",children:n.type||"link"}),s("div",{className:"flex-1 min-w-0",children:[e("p",{className:"text-sm font-medium truncate",children:n.title}),n.description&&e("p",{className:"text-xs text-muted-foreground truncate",children:n.description})]}),n.url&&e(m,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:e(we,{className:"h-4 w-4"})})]},A))})})})},r):d==="menu"?e("div",{className:"mb-2",children:s(f,{className:"w-full",children:[e(N,{children:e(y,{className:"text-lg",children:a.data?.title})}),e(v,{children:e("div",{className:"space-y-2",children:a.data?.items?.map((n,A)=>e(m,{variant:"outline",className:"w-full justify-start",onClick:n.action,children:s("div",{className:"text-left",children:[e("p",{className:"font-medium",children:n.label}),n.description&&e("p",{className:"text-xs text-muted-foreground",children:n.description})]})},A))})})]})},r):e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(N,{children:e(y,{className:"text-lg",children:d})}),e(v,{children:e("pre",{className:"text-sm",children:JSON.stringify(a.data,null,2)})})]})},r)}if(i.type==="reasoning")return s(Q,{className:"w-full",isStreaming:status==="streaming"&&r===t.parts.length-1&&t.id===b.at(-1)?.id,children:[e(X,{}),e(j,{children:i.text})]},`${t.id}-${r}`)})})]})};return s("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${re||""}`,children:[s(K,{ref:le,className:"flex-1 p-4 bg-background border-0",onDragOver:me,onDragLeave:de,onDrop:ce,children:[s("div",{className:p("space-y-4",ee&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[e(u.animate,{children:b.map(t=>e(u.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:pe(t)},t.id))}),c&&s(u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[e(h,{className:"h-8 w-8",children:e(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(B,{className:"h-4 w-4"})})}),e("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:e(q,{capabilities:R,isOpen:c,onToggle:()=>g(!c),onActionSelect:D,className:"w-full"})})]}),C&&s(u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[e(h,{className:"h-8 w-8",children:e(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(B,{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:I})]}),w.length>0&&e("div",{className:"p-4 border-t bg-muted/10",children:e("div",{className:"flex flex-wrap gap-2",children:w.map(t=>s("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[$(t.file.type),e("span",{className:"text-sm font-medium",children:t.file.name}),e("span",{className:"text-xs text-muted-foreground",children:ue(t.file.size)}),e(m,{variant:"ghost",size:"sm",onClick:()=>ie(t.id),className:"h-6 w-6 p-0",children:e(ye,{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:F,onChange:t=>te(t.target.value),onKeyPress:se,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:C}),S&&e(m,{variant:"outline",size:"icon",onClick:()=>z.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:e(Ne,{className:"h-4 w-4"})}),e(m,{onClick:ae,disabled:!F.trim()&&w.length===0||C,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:e(fe,{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(ge,{className:"h-3 w-3 mr-1"}),c?"Hide":"Show"," Capabilities"]}),s("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[O().map((t,l)=>e(m,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>D(t.id,H),children:t.label},`context-${t.id}`)),O().length===0&&oe().map((t,l)=>e(m,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:t.action,children:t.label},`suggestion-${l}`))]})]}),S&&e("input",{ref:z,type:"file",multiple:!0,onChange:ne,className:"hidden"})]})]})}export{Je as a};
|