cortex-react-components 2.26.4 → 2.26.5

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 (185) hide show
  1. package/dist/{chunk-NDBSSX6Q.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-QDP657UR.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-OVZKO3Z5.mjs → chunk-3ANJOET7.mjs} +1 -1
  4. package/dist/{chunk-HB57GPGK.mjs → chunk-3M5KHST3.mjs} +1 -1
  5. package/dist/{chunk-TQKXHMD7.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/chunk-6YHCNPFB.mjs +4 -0
  7. package/dist/{chunk-VNKGAW4K.mjs → chunk-7OMPPFGG.mjs} +1 -1
  8. package/dist/{chunk-AABB4TFO.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  9. package/dist/{chunk-RWHPQAWZ.mjs → chunk-CKU2T3AN.mjs} +1 -1
  10. package/dist/{chunk-NZJ7VVG6.mjs → chunk-EFNFK7TR.mjs} +1 -1
  11. package/dist/{chunk-7BYNW77I.mjs → chunk-F64CA5CH.mjs} +1 -1
  12. package/dist/{chunk-VDN4LQSS.mjs → chunk-F6DMXMR4.mjs} +1 -1
  13. package/dist/{chunk-IISYRLNU.mjs → chunk-FEWOSBUJ.mjs} +1 -1
  14. package/dist/{chunk-FR4X2HHQ.mjs → chunk-FMXCT6LU.mjs} +1 -1
  15. package/dist/{chunk-SME3D72Q.mjs → chunk-FYQBRCQM.mjs} +1 -1
  16. package/dist/{chunk-MU47F4UR.mjs → chunk-GAZHKHGB.mjs} +1 -1
  17. package/dist/{chunk-CC57QZMB.mjs → chunk-GETYSIZV.mjs} +1 -1
  18. package/dist/chunk-GLZEHRPY.mjs +4 -0
  19. package/dist/chunk-HD6E7KI2.mjs +4 -0
  20. package/dist/{chunk-TIIYFAV6.mjs → chunk-HDKHF3EA.mjs} +1 -1
  21. package/dist/{chunk-7MPZOMXK.mjs → chunk-HKMNAXLM.mjs} +1 -1
  22. package/dist/{chunk-OP6ZWZIM.mjs → chunk-JVTCOOUV.mjs} +1 -1
  23. package/dist/{chunk-HLRMUJPL.mjs → chunk-KBLVWXLK.mjs} +1 -1
  24. package/dist/{chunk-FBEHQRZ4.mjs → chunk-KVLUT4U2.mjs} +1 -1
  25. package/dist/chunk-LCEEFZH7.mjs +4 -0
  26. package/dist/chunk-LEF6M5ZD.mjs +4 -0
  27. package/dist/{chunk-YH72WKGC.mjs → chunk-MO4HRQEL.mjs} +1 -1
  28. package/dist/{chunk-DKRRVTCV.mjs → chunk-MS7YIAWP.mjs} +1 -1
  29. package/dist/chunk-MXMW65GM.mjs +4 -0
  30. package/dist/{chunk-EM4CGGGV.mjs → chunk-O24GFE6Q.mjs} +1 -1
  31. package/dist/chunk-P2B3OITE.mjs +4 -0
  32. package/dist/{chunk-5MMNC65L.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  33. package/dist/{chunk-JU4TJYSZ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  34. package/dist/{chunk-FB5PBKLV.mjs → chunk-PTZT4QJW.mjs} +1 -1
  35. package/dist/{chunk-YJ7XPZWV.mjs → chunk-QUMUO63J.mjs} +1 -1
  36. package/dist/{chunk-J3VJUPR7.mjs → chunk-R6AYIVIR.mjs} +1 -1
  37. package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
  38. package/dist/{chunk-CTTBF7F4.mjs → chunk-RS4WAAGI.mjs} +1 -1
  39. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  40. package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
  41. package/dist/{chunk-ITNR7N47.mjs → chunk-U3FYDDE2.mjs} +1 -1
  42. package/dist/chunk-U3PUWUVM.mjs +4 -0
  43. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  44. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  45. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  46. package/dist/{chunk-ZA423OPA.mjs → chunk-WH6JZSIA.mjs} +1 -1
  47. package/dist/{chunk-WRCRZUGO.mjs → chunk-ZG5N4C4S.mjs} +1 -1
  48. package/dist/components/AdvancedComponents/AppSidebar.d.ts +3 -2
  49. package/dist/components/AdvancedComponents/AppSidebar.js +1 -2
  50. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  51. package/dist/components/AdvancedComponents/app-header.js +1 -1
  52. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  53. package/dist/components/AdvancedComponents/index.js +1 -1
  54. package/dist/components/AdvancedComponents/index.mjs +1 -1
  55. package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
  56. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  57. package/dist/components/AdvancedComponents/user-selection.js +1 -1
  58. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  59. package/dist/components/Blocks/Banner.mjs +1 -1
  60. package/dist/components/Blocks/CallToAction.mjs +1 -1
  61. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  62. package/dist/components/Blocks/Content.mjs +1 -1
  63. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  64. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  65. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  66. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  67. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  68. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  69. package/dist/components/Blocks/index.mjs +1 -1
  70. package/dist/components/Cards/ContentCard.mjs +1 -1
  71. package/dist/components/Cards/FeatureCard.mjs +1 -1
  72. package/dist/components/Cards/index.mjs +1 -1
  73. package/dist/components/Chat/CopilotInterface.js +3 -3
  74. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  75. package/dist/components/Chat/demo-long-messages.js +5 -5
  76. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  77. package/dist/components/Chat/demo-tests.js +5 -5
  78. package/dist/components/Chat/demo-tests.mjs +1 -1
  79. package/dist/components/Chat/demo.js +3 -3
  80. package/dist/components/Chat/demo.mjs +1 -1
  81. package/dist/components/Chat/example-usage.js +3 -3
  82. package/dist/components/Chat/example-usage.mjs +1 -1
  83. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  84. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  85. package/dist/components/Chat/index.js +3 -3
  86. package/dist/components/Chat/index.mjs +1 -1
  87. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  88. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  89. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  90. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +5 -5
  91. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  92. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  93. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  94. package/dist/components/DigitalColleagues/Views/index.js +5 -5
  95. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  96. package/dist/components/DigitalColleagues/index.js +5 -5
  97. package/dist/components/DigitalColleagues/index.mjs +1 -1
  98. package/dist/components/Foundary/MainPage.mjs +1 -1
  99. package/dist/components/Foundary/Pages/dashboardpage.js +6 -6
  100. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  101. package/dist/components/Foundary/Views/ColleaguesView.d.ts +12 -1
  102. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  103. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  104. package/dist/components/Foundary/Views/index.js +5 -5
  105. package/dist/components/Foundary/Views/index.mjs +1 -1
  106. package/dist/components/Foundary/colleague-card.js +1 -1
  107. package/dist/components/Foundary/colleague-card.mjs +1 -1
  108. package/dist/components/Foundary/colleague-form.d.ts +12 -1
  109. package/dist/components/Foundary/colleague-form.js +1 -1
  110. package/dist/components/Foundary/colleague-form.mjs +1 -1
  111. package/dist/components/Foundary/foundary-clone.js +1 -1
  112. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  113. package/dist/components/Foundary/foundary-layout.d.ts +2 -1
  114. package/dist/components/Foundary/foundary-layout.js +1 -1
  115. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  116. package/dist/components/Foundary/index.js +5 -5
  117. package/dist/components/Foundary/index.mjs +1 -1
  118. package/dist/components/Foundary/knowledge-search.js +1 -1
  119. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  120. package/dist/components/Foundary/types.d.ts +14 -2
  121. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  122. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  123. package/dist/components/HeaderFooter/index.mjs +1 -1
  124. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  125. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  126. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  127. package/dist/components/Heros/RenderHero.mjs +1 -1
  128. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  129. package/dist/components/Heros/index.mjs +1 -1
  130. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  131. package/dist/components/Layouts/Print.mjs +1 -1
  132. package/dist/components/Layouts/SlideShow.mjs +1 -1
  133. package/dist/components/Layouts/index.mjs +1 -1
  134. package/dist/components/Other/index.mjs +1 -1
  135. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  136. package/dist/components/Payload/Media/index.mjs +1 -1
  137. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  138. package/dist/components/Payload/RichText/index.mjs +1 -1
  139. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  140. package/dist/components/Payload/index.mjs +1 -1
  141. package/dist/components/Projects/FileView.js +1 -1
  142. package/dist/components/Projects/FileView.mjs +1 -1
  143. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  144. package/dist/components/Projects/ProjectPage.js +5 -5
  145. package/dist/components/Projects/ProjectPage.mjs +1 -1
  146. package/dist/components/Projects/ProjectView.js +1 -1
  147. package/dist/components/Projects/ProjectView.mjs +1 -1
  148. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  149. package/dist/components/Projects/index.mjs +1 -1
  150. package/dist/components/dc-temp/index.js +1 -1
  151. package/dist/components/dc-temp/index.mjs +1 -1
  152. package/dist/components/index.js +20 -20
  153. package/dist/components/index.mjs +1 -1
  154. package/dist/index.js +27 -27
  155. package/dist/index.mjs +1 -1
  156. package/dist/metafile-cjs.json +1 -1
  157. package/dist/metafile-esm.json +1 -1
  158. package/dist/pages/Blog.mjs +1 -1
  159. package/dist/pages/Documentation.mjs +1 -1
  160. package/dist/pages/IndexPage.mjs +1 -1
  161. package/dist/pages/Intranet.mjs +1 -1
  162. package/dist/pages/LandingPage.mjs +1 -1
  163. package/dist/pages/Page.mjs +1 -1
  164. package/dist/pages/Publish.mjs +1 -1
  165. package/dist/pages/Website.mjs +1 -1
  166. package/dist/sections/AboutSection.mjs +1 -1
  167. package/dist/sections/BlogDetail.mjs +1 -1
  168. package/dist/sections/BlogList.mjs +1 -1
  169. package/dist/sections/ContactSection.mjs +1 -1
  170. package/dist/sections/PageSections.mjs +1 -1
  171. package/dist/sections/PricingSection.mjs +1 -1
  172. package/dist/sections/ServiceDetail.mjs +1 -1
  173. package/dist/sections/ServiceDetailSection.mjs +1 -1
  174. package/dist/sections/ServiceSection.mjs +1 -1
  175. package/dist/sections/form/index.mjs +1 -1
  176. package/dist/sections/index.mjs +1 -1
  177. package/package.json +1 -1
  178. package/dist/chunk-4WA47ZQA.mjs +0 -4
  179. package/dist/chunk-5HT2KC5I.mjs +0 -4
  180. package/dist/chunk-CRAFZGCI.mjs +0 -4
  181. package/dist/chunk-FGEFYI5E.mjs +0 -4
  182. package/dist/chunk-GPFPTU7U.mjs +0 -4
  183. package/dist/chunk-KKW3FINI.mjs +0 -4
  184. package/dist/chunk-NDZ26EG6.mjs +0 -4
  185. package/dist/chunk-Y7H3EUBR.mjs +0 -4
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as K}from"./chunk-TVZOULLL.mjs";import{a as y}from"./chunk-FT3AE7L2.mjs";import{a as k}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{b as u}from"./chunk-CSBGSBEU.mjs";import{a as d,e as v}from"./chunk-YO3GQYRJ.mjs";import{useState as h,useEffect as A}from"react";import{Search as F,X as P,FileText as S,Tag as R}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function J({selectedDocuments:l,onDocumentsChange:N,availableDocuments:x,label:L,placeholder:B="Search knowledge documents...",maxSelections:r,disabled:c=!1}){let[i,w]=h(""),[f,C]=h([]),[g,n]=h(!1);A(()=>{if(!i.trim()){C([]),n(!1);return}let e=x.filter(a=>{if(l.map(o=>o.id).includes(a.id))return!1;let m=i.toLowerCase();return a.title.toLowerCase().includes(m)||a.description?.toLowerCase().includes(m)||a.tags?.some(o=>o.toLowerCase().includes(m))||Object.values(a.metadata||{}).some(o=>String(o).toLowerCase().includes(m))});C(e),n(!0)},[i,l,x]);let z=e=>{r&&l.length>=r&&l.pop(),N([...l,e]),w(""),n(!1)},T=e=>{console.log("doc",e,l),N(l.filter(a=>a.id!==e))},b=!r||l.length<r;return s("div",{className:"space-y-2",children:[t(K,{children:L}),s("div",{className:"relative",children:[s("div",{className:"relative",children:[t(F,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(k,{value:i,onChange:e=>w(e.target.value),placeholder:b?B:`Maximum ${r} documents selected`,className:"pl-9",disabled:c||!b,onFocus:()=>i&&n(!0)})]}),g&&f.length>0&&t(d,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60",children:t(y,{className:"h-full",children:t(v,{className:"p-2",children:f.map(e=>t(p,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>z(e),disabled:c,children:s("div",{className:"flex items-start gap-3 w-full",children:[t(S,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),s("div",{className:"text-left flex-1 min-w-0",children:[t("div",{className:"font-medium text-sm truncate",children:e.title}),e.description&&t("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description}),e.tags&&e.tags.length>0&&s("div",{className:"flex flex-wrap gap-1 mt-2",children:[e.tags.slice(0,3).map(a=>t(u,{variant:"outline",className:"text-xs",children:a},a)),e.tags.length>3&&s(u,{variant:"outline",className:"text-xs",children:["+",e.tags.length-3," more"]})]})]})]})},e.id))})})}),g&&i&&f.length===0&&t(d,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:s(v,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',i,'"']})})]}),l.length>0&&t("div",{className:"space-y-2",children:t("div",{className:"space-y-2",children:l.map(e=>t(d,{className:"p-3",children:s("div",{className:"flex items-start gap-3",children:[t(S,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),s("div",{className:"flex-1 min-w-0",children:[t("div",{className:"font-medium text-sm",children:e.title}),e.description&&t("div",{className:"text-xs text-muted-foreground mt-1",children:e.description}),e.tags&&e.tags.length>0&&t("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(a=>s(u,{variant:"outline",className:"text-xs",children:[t(R,{className:"h-3 w-3 mr-1"}),a]},a))})]}),t(p,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>T(e.id),disabled:c,children:t(P,{className:"h-3 w-3"})})]})},e.id))})}),g&&t("div",{className:"fixed inset-0 z-0",onClick:()=>n(!1)})]})}export{J as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a}from"./chunk-4WA47ZQA.mjs";import{a as b}from"./chunk-VDN4LQSS.mjs";import{a as f}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var g=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Y({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=g[0],onBusinessUnitChange:B,onSearch:c,businessUnits:L=g,activeTab:y,onTabChange:x,showTabs:T=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:f("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(b,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:y,onTabChange:x,showTabs:T,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{Y as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as u,b as p,c}from"./chunk-RLVKIMGU.mjs";import{a as t,b as l,i as s,j as d}from"./chunk-OCPX4QPC.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{motion as g}from"motion/react";import{ChevronDown as x}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function M({activeTab:i,onTabChange:r,tabOptions:n,className:v="",maxWidth:f="700px",gridCols:h=6}){let w=n.find(e=>e.value===i);return o(g.div,{className:`flex-1 flex justify-center ${v}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[a("div",{className:"hidden lg:block",children:a(u,{value:i,onValueChange:r,children:a(p,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:f,gridTemplateColumns:`repeat(${Math.min(h,n.length)}, minmax(0, 1fr))`},children:n.map(e=>a(g.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:a(c,{value:e.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:e.label})},e.value))})})}),a("div",{className:"lg:hidden",children:o(t,{children:[a(l,{asChild:!0,children:o(m,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[w?.label||"Select",a(x,{className:"h-4 w-4 ml-2"})]})}),a(s,{align:"center",className:"w-[180px]",children:n.map(e=>a(d,{onClick:()=>r?.(e.value),className:`cursor-pointer ${i===e.value?"bg-accent":""}`,children:e.label},e.value))})]})})]})}export{M as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as K}from"./chunk-GAU24H4A.mjs";import{a as _}from"./chunk-NDZ26EG6.mjs";import{a as ee}from"./chunk-M2REXGQW.mjs";import{a as x}from"./chunk-HB57GPGK.mjs";import{a as O}from"./chunk-KKW3FINI.mjs";import{a as Z}from"./chunk-FSCDCSVK.mjs";import{a as X}from"./chunk-Z22NSJMF.mjs";import{a as le}from"./chunk-Y7H3EUBR.mjs";import{a as Y}from"./chunk-FGEFYI5E.mjs";import{a as U,c as $,d as k,g as F,i as p}from"./chunk-YFAZQYK4.mjs";import{a as R}from"./chunk-L5JPAKPM.mjs";import{b as H}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as h,c as w,e as u}from"./chunk-YO3GQYRJ.mjs";import{useEffect as Ce,useState as o}from"react";import{Plus as fe,Search as ve,Users as te,Bot as ye,User as he,Filter as we}from"lucide-react";import{motion as xe,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Se({initialColleagues:N,onColleagueAdd:S,onColleagueEdit:I,onColleagueDelete:ae,compactView:n=!1,departments:ie=["Design","Engineering","Marketing","Product","Sales","Operations"],className:oe,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[]}){let[s,r]=o(N||[]),[d,B]=o(""),[b,M]=o("all"),[D,G]=o("all"),[v,ne]=o("all"),[W,C]=o(null),[A,y]=o(null);Ce(()=>{r(N||[])},[N]);let se=Array.isArray(L)?L:[],re=Array.isArray(P)?P:[],[m,a]=o("main"),f=s.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(d.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(d.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(d.toLowerCase())),q=f.filter(e=>e.type==="human"),z=f.filter(e=>e.type==="digital"),J=()=>{a("typeSelection")},T=e=>{e.type==="digital"&&(C(e),a("form")),console.log("Editing colleague:",e),I?.(e)},E=e=>{e.type==="digital"&&(y(e),a("view"))},de=e=>{let i={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(g=>[...g,i]),S?.(i),a("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),a("main")},ge=()=>{C(null),a("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}W?(r(i=>i.map(g=>g.id===e.id?{...e,type:"digital"}:g)),I?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),a("main"),C(null)},ce=()=>{a("main"),C(null),y(null)},ue=()=>{a("main"),y(null)},be=()=>{A&&(C(A),y(null),a("form"))},V=e=>{console.log("deleting",e,s),ae?.(e,s.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(g=>g.id!==e))},pe=()=>{B(""),M("all"),G("all")};return m==="typeSelection"?l(Z,{onSelectHuman:()=>a("userSelection"),onSelectDigital:()=>a("digitalOptions"),onCancel:()=>a("main")}):m==="userSelection"?l(le,{users:se,onUserSelect:de,onCancel:()=>a("typeSelection")}):m==="digitalOptions"?l(ee,{onCloneExisting:()=>a("digitalClone"),onCreateNew:ge,onCancel:()=>a("typeSelection")}):m==="digitalClone"?l(_,{digitalColleagues:re,onColleagueClone:me,onCancel:()=>a("digitalOptions")}):m==="form"?l(O,{colleague:W||void 0,onSave:Q,onCancel:ce,availableKnowledgeDocuments:j}):m==="view"?l(O,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:j}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${oe||""}`,children:[l(X,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Total Colleagues"}),l(te,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Human Members"}),l(he,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(ye,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:t("div",{className:"relative",children:[l(ve,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(R,{placeholder:"Search colleagues...",value:d,onChange:e=>B(e.target.value),className:"pl-9"})]})}),t(U,{value:b,onValueChange:M,children:[l(k,{className:"w-full md:w-[180px]",children:l($,{placeholder:"Department"})}),t(F,{children:[l(p,{value:"all",children:"All Departments"}),ie.map(e=>l(p,{value:e,children:e},e))]})]}),t(U,{value:D,onValueChange:G,children:[l(k,{className:"w-full md:w-[140px]",children:l($,{placeholder:"Status"})}),t(F,{children:[l(p,{value:"all",children:"All Status"}),l(p,{value:"active",children:"Active"}),l(p,{value:"inactive",children:"Inactive"})]})]}),(d||b!=="all"||D!=="all")&&t(H,{variant:"outline",onClick:pe,className:"gap-2",children:[l(we,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[l(Y,{activeTab:v,onTabChange:ne,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${q.length})`},{value:"digital",label:`Digital (${z.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:q.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:z.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[l(te,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:d||b!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),t(H,{onClick:J,className:"gap-2",children:[l(fe,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{Se as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as k}from"./chunk-5HT2KC5I.mjs";import{a as u}from"./chunk-B4H6T2GP.mjs";import{a as g}from"./chunk-TVZOULLL.mjs";import{a as v}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{b as N}from"./chunk-CSBGSBEU.mjs";import{a as f,b as D,c as h,e as K}from"./chunk-YO3GQYRJ.mjs";import{useState as b,useEffect as M}from"react";import{Bot as J,Plus as U,X as W,Edit as X}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function le({colleague:c,onSave:A,onCancel:S,isLoading:i=!1,title:I,submitLabel:x,cancelLabel:F="Cancel",readOnly:B=!1,availableKnowledgeDocuments:E=[]}){let[t,n]=b({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...c}),[_,G]=b(""),[T,j]=b(""),[l,P]=b(!B);M(()=>{c&&n(c)},[c]);let O=e=>{e.preventDefault();let r={id:t.id||parseInt(Date.now().toString()),name:t.name,type:"digital",description:t.description,jobDescription:t.jobDescription||"",workInstructions:t.workInstructions||"",capabilities:t.capabilities||[],capabilityLevel:t.capabilityLevel||0,coreKnowledge:t.coreKnowledge||null};A(r)},y=(e,r,s)=>{if(!r.trim())return;let p=t[e]||[];n({...t,[e]:[...p,r.trim()]}),s("")},R=(e,r)=>{let s=t[e]||[];n({...t,[e]:s.filter((p,w)=>w!==r)})},$=e=>{e.preventDefault(),P(!l)},q=(e,r,s,p,w)=>{let L=t[e]||[];return o("div",{className:"space-y-2",children:[a(g,{children:r}),l&&o("div",{className:"flex gap-2",children:[a(v,{value:s,onChange:d=>p(d.target.value),placeholder:w,onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),y(e,s,p))},disabled:i}),a(m,{type:"button",variant:"outline",size:"icon",onClick:()=>y(e,s,p),disabled:i,children:a(U,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:L.map((d,C)=>o(N,{className:"gap-1",children:[d,l&&a(m,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>R(e,C),disabled:i,children:a(W,{className:"h-3 w-3"})})]},`${e}-${C}-${d}`))})]})},z=I||(l?c?"Edit Colleague":"Add New Colleague":"View Colleague"),H=x||(c?"Update Colleague":"Add Colleague");return o(f,{className:"m-8 w-full max-w-4xl mx-auto overflow-y-scroll no-scrollbar",children:[a(D,{children:o(h,{className:"flex items-center gap-2",children:[a(J,{className:"h-5 w-5"}),z]})}),a(K,{children:o("form",{onSubmit:O,className:"space-y-6",children:[o("div",{className:"space-y-4",children:[o("div",{className:"space-y-2",children:[a(g,{htmlFor:"name",children:"Name *"}),a(v,{id:"name",value:t.name||"",onChange:e=>n({...t,name:e.target.value}),required:!0,disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(g,{htmlFor:"description",children:"Description"}),a(u,{id:"description",value:t.description||"",onChange:e=>n({...t,description:e.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:i||!l})]})]}),o("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),o("div",{className:"space-y-2",children:[a(g,{htmlFor:"jobDescription",children:"Job Description *"}),a(u,{id:"jobDescription",value:t.jobDescription||"",onChange:e=>n({...t,jobDescription:e.target.value}),rows:4,required:t.type==="digital",disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(g,{htmlFor:"workInstructions",children:"Work Instructions"}),a(u,{id:"workInstructions",value:t.workInstructions||"",onChange:e=>n({...t,workInstructions:e.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:i||!l})]}),q("capabilities","Capabilities",T,j,"Add capability"),a(k,{selectedDocuments:t.coreKnowledge?[{id:t.coreKnowledge?.id?.toString(),title:t.coreKnowledge?.name,format:"markdown",content:t.coreKnowledge?.content||"",createdAt:new Date(t.coreKnowledge?.createdAt),description:t.coreKnowledge?.description||"",metadata:t.coreKnowledge?.metadata||{},updatedAt:new Date(t.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:e=>{let r={createdAt:e[0]?.createdAt.toISOString(),id:parseInt(e[0]?.id),name:e[0]?.title,source:"payload",updatedAt:(e[0]?.updatedAt||new Date).toISOString()};console.log(e),n({...t,coreKnowledge:e&&e.length>0?r:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:i||!l,availableDocuments:E.map(e=>({id:e.id.toString(),title:e.name,name:e.name,format:"markdown",content:e.content||"",createdAt:new Date(e.createdAt),source:e.source,description:e.description||"",metadata:e.metadata||{},updatedAt:new Date(e.updatedAt)}))})]}),o("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(m,{type:"button",variant:"outline",onClick:S,disabled:i,children:l?F:"Close"}),l?a(m,{type:"submit",disabled:i,children:i?"Saving...":H}):o(m,{type:"button",onClick:$,disabled:i,className:"gap-2",children:[a(X,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{le as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as v,c as C}from"./chunk-SOLZ4VQH.mjs";import{b as f}from"./chunk-CSBGSBEU.mjs";import{a as s,b as u,c as g,e as l}from"./chunk-YO3GQYRJ.mjs";import{useState as x,useMemo as S}from"react";import{Search as A,Bot as N,ChevronLeft as I,Copy as B}from"lucide-react";import{motion as h,AnimatePresence as L}from"motion/react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K({digitalColleagues:n,onColleagueClone:b,onCancel:y,selectedColleagueId:w}){let[i,D]=x(""),[m,k]=x("all"),d=S(()=>n.filter(t=>t.name.toLowerCase().includes(i.toLowerCase())||t.jobDescription?.toLowerCase().includes(i.toLowerCase())||t.workInstructions?.toLowerCase().includes(i.toLowerCase())),[n,i,m]),c=t=>{let o={...t,name:`${t.name} (Copy)`};b(o)},T=t=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t);return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(L,{mode:"wait",children:a(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[a("div",{className:"flex items-center gap-4 mb-6",children:[a(r,{variant:"ghost",onClick:y,className:"gap-2",children:[e(I,{className:"h-4 w-4"}),"Back"]}),a("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),e("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:a("div",{className:"relative",children:[e(A,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(p,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:t=>D(t.target.value),className:"pl-9"})]})}),a("select",{value:m,onChange:t=>k(t.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[e("option",{value:"all",children:"All Status"}),e("option",{value:"active",children:"Active"}),e("option",{value:"inactive",children:"Inactive"})]})]})})}),e("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(t=>e(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:a(s,{className:`cursor-pointer transition-all hover:shadow-lg ${w?.toString()===t.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(t),children:[e(u,{className:"pb-3",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e(v,{children:e(C,{className:"bg-blue-100",children:e(N,{className:"h-4 w-4 text-blue-600"})})}),e("div",{children:e(g,{className:"text-lg flex items-center gap-2",children:t.name})})]}),a(r,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:o=>{o.stopPropagation(),c(t)},children:[e(B,{className:"h-3 w-3"}),"Clone"]})]})}),e(l,{className:"pt-0",children:a("div",{className:"space-y-3",children:[a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),e("p",{className:"text-sm line-clamp-2",children:t.jobDescription})]}),t.capabilities&&t.capabilities.length>0&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),e("div",{className:"flex flex-wrap gap-1",children:t.capabilities.length>3&&a(f,{variant:"outline",className:"text-xs",children:["+",t.capabilities.length-3]})})]}),e("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),t.workInstructions&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),e("p",{className:"text-xs line-clamp-2",children:t.workInstructions})]})]})})]})},t.id))}),d.length===0&&e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}export{K as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as c}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as v,c as u}from"./chunk-SOLZ4VQH.mjs";import{a as r,b as n,c as p,e as i}from"./chunk-YO3GQYRJ.mjs";import{useState as y,useMemo as w}from"react";import{Search as U,User as f,Check as S,ChevronLeft as b}from"lucide-react";import{motion as N,AnimatePresence as k}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function D({users:o,onUserSelect:g,onCancel:h,selectedUserId:m}){let[s,C]=y(""),l=w(()=>o.filter(a=>a.name?.toLowerCase().includes(s.toLowerCase())||a.email.toLowerCase().includes(s.toLowerCase())),[o,s]),x=a=>{g(a)};return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(k,{mode:"wait",children:t(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[t("div",{className:"flex items-center gap-4 mb-6",children:[t(d,{variant:"ghost",onClick:h,className:"gap-2",children:[e(b,{className:"h-4 w-4"}),"Back"]}),t("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Select User"}),e("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),e(r,{className:"container",children:e(i,{className:"pt-6",children:e("div",{className:"flex flex-col md:flex-row gap-4",children:e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(U,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(c,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:a=>C(a.target.value),className:"pl-9"})]})})})})}),e("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(a=>e(N.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:t(r,{className:`cursor-pointer transition-all hover:shadow-lg ${m===a.id?"ring-2 ring-primary":""}`,onClick:()=>x(a),children:[e(n,{className:"pb-3",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-center gap-3",children:[e(v,{children:e(u,{children:e(f,{className:"h-4 w-4"})})}),e("div",{children:e(p,{className:"text-lg",children:a.name})})]}),m===a.id&&e(S,{className:"h-5 w-5 text-primary"})]})}),e(i,{className:"pt-0",children:t("div",{className:"space-y-3",children:[t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Email"}),e("p",{className:"text-sm font-medium",children:a.email})]}),e("div",{children:e("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},a.id))}),l.length===0&&e(r,{className:"container mt-4",children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(f,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}export{D as a};