cortex-react-components 2.19.0 → 2.19.2

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 (148) hide show
  1. package/dist/{chunk-WIRQ5IRT.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-3HNU2NYP.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-ZEALRBXW.mjs → chunk-3ANJOET7.mjs} +1 -1
  4. package/dist/{chunk-PLOUY2B7.mjs → chunk-4NBXE4IK.mjs} +1 -1
  5. package/dist/{chunk-7R47MHQE.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/{chunk-GTZDHELR.mjs → chunk-543D6MX5.mjs} +1 -1
  7. package/dist/{chunk-JCWFPKF3.mjs → chunk-5EQXJS23.mjs} +1 -1
  8. package/dist/{chunk-VDFRWGXR.mjs → chunk-6PS55VJZ.mjs} +1 -1
  9. package/dist/{chunk-RS4VD3ML.mjs → chunk-6R6NYDWN.mjs} +1 -1
  10. package/dist/{chunk-CXOVEABI.mjs → chunk-7OMPPFGG.mjs} +1 -1
  11. package/dist/{chunk-AEACICA7.mjs → chunk-BHH5Q4FN.mjs} +1 -1
  12. package/dist/{chunk-75F3LJMX.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  13. package/dist/{chunk-H7NKR2WR.mjs → chunk-CRSGNLV4.mjs} +1 -1
  14. package/dist/{chunk-R5P4ZICA.mjs → chunk-D6K6RO5P.mjs} +1 -1
  15. package/dist/{chunk-GHOL5L32.mjs → chunk-F64CA5CH.mjs} +1 -1
  16. package/dist/{chunk-3Y7QG6VP.mjs → chunk-FEWOSBUJ.mjs} +1 -1
  17. package/dist/{chunk-2BRDNDUB.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-RJGYVDOU.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-RGOKBIQ5.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/{chunk-3NRXQBBS.mjs → chunk-HDKHF3EA.mjs} +1 -1
  21. package/dist/{chunk-C4RWEPVF.mjs → chunk-HKMNAXLM.mjs} +1 -1
  22. package/dist/{chunk-QAJBJFRP.mjs → chunk-HNHUOQGZ.mjs} +1 -1
  23. package/dist/{chunk-LAQ3QAUW.mjs → chunk-ITJH72Z2.mjs} +1 -1
  24. package/dist/{chunk-LJXTXROJ.mjs → chunk-KZAYLEFB.mjs} +1 -1
  25. package/dist/{chunk-LLP4EFT4.mjs → chunk-L5NPH5RX.mjs} +1 -1
  26. package/dist/{chunk-5MWZTJYP.mjs → chunk-MO4HRQEL.mjs} +1 -1
  27. package/dist/{chunk-PTJVI53B.mjs → chunk-NN4QIXZ2.mjs} +1 -1
  28. package/dist/chunk-NZSQITPU.mjs +4 -0
  29. package/dist/{chunk-TVTTUSWM.mjs → chunk-OQCMTGML.mjs} +1 -1
  30. package/dist/{chunk-GTZJWMZR.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  31. package/dist/{chunk-FE7ZGUPU.mjs → chunk-PNUBVBSR.mjs} +1 -1
  32. package/dist/{chunk-AJQHGVZ5.mjs → chunk-PTZT4QJW.mjs} +1 -1
  33. package/dist/{chunk-EM3T2XYC.mjs → chunk-R6AYIVIR.mjs} +1 -1
  34. package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
  35. package/dist/{chunk-6MSM3CZ6.mjs → chunk-RRME4EHD.mjs} +1 -1
  36. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  37. package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
  38. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  39. package/dist/{chunk-NINFDOV5.mjs → chunk-U3FYDDE2.mjs} +1 -1
  40. package/dist/{chunk-5PJLI46T.mjs → chunk-UECG3SCG.mjs} +1 -1
  41. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  42. package/dist/{chunk-CQAMS7RZ.mjs → chunk-V6GK2FJG.mjs} +1 -1
  43. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  44. package/dist/chunk-VOOU7RBN.mjs +4 -0
  45. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  46. package/dist/components/Blocks/Banner.mjs +1 -1
  47. package/dist/components/Blocks/CallToAction.mjs +1 -1
  48. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  49. package/dist/components/Blocks/Content.mjs +1 -1
  50. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  51. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  52. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  53. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  54. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  55. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  56. package/dist/components/Blocks/index.mjs +1 -1
  57. package/dist/components/Cards/ContentCard.mjs +1 -1
  58. package/dist/components/Cards/FeatureCard.mjs +1 -1
  59. package/dist/components/Cards/index.mjs +1 -1
  60. package/dist/components/Chat/ChatInterface.mjs +1 -1
  61. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  62. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  63. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  64. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  65. package/dist/components/Chat/demo-tests.mjs +1 -1
  66. package/dist/components/Chat/demo.mjs +1 -1
  67. package/dist/components/Chat/example-usage.mjs +1 -1
  68. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  69. package/dist/components/Chat/index.mjs +1 -1
  70. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  72. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  73. package/dist/components/DigitalColleagues/index.mjs +1 -1
  74. package/dist/components/Foundary/MainPage.mjs +1 -1
  75. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  76. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  77. package/dist/components/Foundary/RichText/index.mjs +1 -1
  78. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  79. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  80. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  81. package/dist/components/Foundary/Views/index.js +1 -1
  82. package/dist/components/Foundary/Views/index.mjs +1 -1
  83. package/dist/components/Foundary/document-edit.js +1 -1
  84. package/dist/components/Foundary/document-edit.mjs +1 -1
  85. package/dist/components/Foundary/document-preview-examples.js +1 -1
  86. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  87. package/dist/components/Foundary/document-preview.js +1 -1
  88. package/dist/components/Foundary/document-preview.mjs +1 -1
  89. package/dist/components/Foundary/index.js +1 -1
  90. package/dist/components/Foundary/index.mjs +1 -1
  91. package/dist/components/Foundary/knowledge-browser.js +1 -1
  92. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  93. package/dist/components/HeaderFooter/Header.mjs +1 -1
  94. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  95. package/dist/components/HeaderFooter/index.mjs +1 -1
  96. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  97. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  98. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  99. package/dist/components/Heros/RenderHero.mjs +1 -1
  100. package/dist/components/Heros/index.mjs +1 -1
  101. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  102. package/dist/components/Holidays/index.mjs +1 -1
  103. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  104. package/dist/components/Layouts/Print.mjs +1 -1
  105. package/dist/components/Layouts/SlideShow.mjs +1 -1
  106. package/dist/components/Layouts/index.mjs +1 -1
  107. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  108. package/dist/components/Payload/Media/index.mjs +1 -1
  109. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  110. package/dist/components/Payload/RichText/index.mjs +1 -1
  111. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  112. package/dist/components/Payload/index.mjs +1 -1
  113. package/dist/components/Projects/EpicsView.mjs +1 -1
  114. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  115. package/dist/components/Projects/ProjectPage.mjs +1 -1
  116. package/dist/components/Projects/ProjectView.mjs +1 -1
  117. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  118. package/dist/components/Projects/index.mjs +1 -1
  119. package/dist/components/dc-temp/index.mjs +1 -1
  120. package/dist/components/index.js +1 -1
  121. package/dist/components/index.mjs +1 -1
  122. package/dist/index.js +1 -1
  123. package/dist/index.mjs +1 -1
  124. package/dist/metafile-cjs.json +1 -1
  125. package/dist/metafile-esm.json +1 -1
  126. package/dist/pages/Blog.mjs +1 -1
  127. package/dist/pages/Documentation.mjs +1 -1
  128. package/dist/pages/IndexPage.mjs +1 -1
  129. package/dist/pages/Intranet.mjs +1 -1
  130. package/dist/pages/LandingPage.mjs +1 -1
  131. package/dist/pages/Page.mjs +1 -1
  132. package/dist/pages/Publish.mjs +1 -1
  133. package/dist/pages/Website.mjs +1 -1
  134. package/dist/sections/AboutSection.mjs +1 -1
  135. package/dist/sections/BlogDetail.mjs +1 -1
  136. package/dist/sections/BlogList.mjs +1 -1
  137. package/dist/sections/BlogListSection.mjs +1 -1
  138. package/dist/sections/ContactSection.mjs +1 -1
  139. package/dist/sections/PageSections.mjs +1 -1
  140. package/dist/sections/PricingSection.mjs +1 -1
  141. package/dist/sections/ServiceDetail.mjs +1 -1
  142. package/dist/sections/ServiceDetailSection.mjs +1 -1
  143. package/dist/sections/ServiceSection.mjs +1 -1
  144. package/dist/sections/form/index.mjs +1 -1
  145. package/dist/sections/index.mjs +1 -1
  146. package/package.json +1 -1
  147. package/dist/chunk-GLARGNXX.mjs +0 -4
  148. package/dist/chunk-HEKQ55BA.mjs +0 -4
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as p}from"./chunk-W2LPR7SX.mjs";import{a as u}from"./chunk-U2OXF7PJ.mjs";import{a as c}from"./chunk-H7NKR2WR.mjs";import{useEffect as D,useState as l}from"react";import{Fragment as N,jsx as e,jsxs as d}from"react/jsx-runtime";function y({documents:f=[],contexts:n=[],onDocumentClick:x=o=>console.log("Document clicked:",o),onDocumentShare:g=o=>console.log("Share document:",o),onLoadDocumentContent:A,selectedDocumentId:w,onAddKnowledge:m,onAddTeamContext:a,onDocumentUpdate:v}){let[o,s]=l(n[0]),[b,r]=l(!1),[C,i]=l(!1);D(()=>{!o&&n&&n.length>0&&s(n[0])},[n]);let K=t=>{m&&m(t),r(!1)},h=t=>{a&&a(t),i(!1)};return d("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[e("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:n&&n.length>0&&d("div",{className:"mt-6",children:[e("div",{className:"border-b border-border",children:d("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:n.map(t=>d("button",{onClick:()=>s(t),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${o?.id===t.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[t.icon,t.label]},t.id))}),d("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e("button",{onClick:()=>r(!0),className:"inline-flex border border-primary rounded-xl items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),e("button",{onClick:()=>i(!0),className:"inline-flex border border-primary rounded-xl items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),o?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-muted-foreground",children:o?.description})})]})}),o?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(c,{documents:f,menuConfig:o?.menuConfig,onDocumentClick:x,onDocumentShare:g,selectedDocumentId:w,onDocumentUpdate:v})})}):e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),d(N,{children:[e(u,{isOpen:C,onClose:()=>i(!1),onAddTeamContext:h}),e(p,{isOpen:b,onClose:()=>r(!1),onAddKnowledge:K,knowledgeContexts:n})]})]})}export{y as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as E}from"./chunk-QAJBJFRP.mjs";import{a as v}from"./chunk-DFIXTV2M.mjs";import{a as y,c as C,d as S,g as D,i as h}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{b as l}from"./chunk-ZUA4KNIR.mjs";import{motion as K}from"motion/react";import{Save as G,X as T,Plus as H,ChevronDown as J,ChevronRight as L,Info as M,File as F,FileText as Q,Type as W}from"lucide-react";import{useEffect as Y,useState as x}from"react";import{jsx as e,jsxs as d}from"react/jsx-runtime";function ce({document:u,onSave:A,mode:Z="edit",onCancel:B,availableDocuments:p=[],knowledgeContexts:I=[]}){let[n,i]=x({...u,updatedAt:new Date}),[m,_]=x(!1),[N,j]=x(n.richTextContent);Y(()=>{i(u)},[u]);let ee=t=>{switch(t){case"markdown":case"mdx":return e(Q,{className:"h-6 w-6 text-primary"});case"richText":return e(F,{className:"h-6 w-6 text-success"});case"text":return e(W,{className:"h-6 w-6 text-muted-foreground"});default:return e(F,{className:"h-6 w-6 text-muted-foreground"})}},V=t=>{switch(t){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},z=()=>{let t=new Set,a=new Set;return I.forEach(s=>{s.menuConfig.groupBy.forEach(r=>t.add(r))}),p.forEach(s=>{s.metadata&&Object.keys(s.metadata).forEach(r=>a.add(r))}),{contextKeys:Array.from(t).sort(),documentKeys:Array.from(a).sort(),allKeys:Array.from(new Set([...t,...a])).sort()}},O=t=>{let a=new Set;return p.forEach(s=>{s.metadata?.[t]&&a.add(String(s.metadata[t]))}),Array.from(a).sort()},R=z(),$=()=>{A({...n,richTextContent:N})},c=(t,a)=>{i(s=>({...s,metadata:{...s.metadata,[t]:a}}))},P=(t,a)=>{a==="__custom__"?c(t,""):c(t,a)},U=()=>{c("","")},X=t=>{i(a=>{let s={...a.metadata};return delete s[t],{...a,metadata:s}})};return d(K.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[d("div",{className:"border-b border-border bg-card p-8 pb-6",children:[d("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:d("div",{className:"flex-1 min-w-0",children:[d("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[e("div",{className:"flex-1 min-w-0",children:e(v,{fieldName:"title",value:n.title,label:"",onSave:(t,a)=>i(s=>({...s,title:a})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),e("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${V(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]}),e("div",{className:"mt-2",children:e(v,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(t,a)=>i(s=>({...s,description:a})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),d("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d(l,{variant:"ghost",size:"sm",onClick:()=>_(!m),className:"gap-2",children:[e(M,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&e("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),m?e(J,{className:"h-4 w-4"}):e(L,{className:"h-4 w-4"})]}),d(l,{variant:"outline",size:"sm",onClick:B,className:"gap-2",children:[e(T,{className:"h-4 w-4"}),"Cancel"]}),d(l,{size:"sm",onClick:$,className:"gap-2",children:[e(G,{className:"h-4 w-4"}),"Save"]})]})]}),e(K.div,{initial:!1,animate:{height:m?"auto":0,opacity:m?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:d("div",{className:"pt-4 border-t border-border mt-4",children:[d("div",{className:"flex items-center justify-between mb-3",children:[d("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e(M,{className:"h-4 w-4"}),"Document Metadata"]}),d(l,{type:"button",variant:"outline",size:"sm",onClick:U,className:"gap-1 h-8",children:[e(H,{className:"h-3 w-3"}),"Add Field"]})]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?e("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([t,a],s)=>{let r=O(t);return d("div",{className:"flex gap-2 items-center",children:[e(f,{value:t,onChange:o=>{let b=o.target.value||"",q=n.metadata?.[t];i(w=>{let g={...w.metadata};return delete g[t],b&&(g[b]=q||""),{...w,metadata:g}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${t}`}),e("datalist",{id:`metadata-keys-${t}`,children:R.allKeys.map(o=>e("option",{value:o},o))}),e("span",{className:"text-muted-foreground text-sm",children:"="}),r.length>0?d(y,{value:String(a||""),onValueChange:o=>P(t,o),children:[e(S,{className:"flex-1 h-8 text-sm",children:e(C,{placeholder:"Value"})}),d(D,{children:[r.map(o=>e(h,{value:o,children:o},o)),e(h,{value:"__custom__",children:e("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):e(f,{value:String(a||""),onChange:o=>c(t,o.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),e(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>X(t),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:e(T,{className:"h-3 w-3"})})]},`metadata-key-${s}`)})}):d("div",{className:"text-center py-4",children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),e("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),e("div",{className:"flex-1 ",children:e("div",{className:"p-8 h-full",children:n.format==="richText"?e(E,{setValue:j,value:N,name:"richTextContent"}):e(k,{value:n.content||"",onChange:t=>i(a=>({...a,content:t.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}export{ce as a};