cortex-react-components 2.9.2 → 2.11.0

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 (155) hide show
  1. package/dist/{chunk-U67OTPTT.mjs → chunk-74U3NYS2.mjs} +1 -1
  2. package/dist/chunk-AM2SRWFU.mjs +1 -0
  3. package/dist/{chunk-FRN4LROV.mjs → chunk-CQNQBSED.mjs} +1 -1
  4. package/dist/chunk-CTAIR3TE.mjs +4 -0
  5. package/dist/{chunk-P3NMFRBH.mjs → chunk-CTAQQFEO.mjs} +1 -1
  6. package/dist/{chunk-BHWGOTCJ.mjs → chunk-FGEFYI5E.mjs} +1 -1
  7. package/dist/{chunk-I5NNEOCF.mjs → chunk-I2ZLKSWR.mjs} +1 -1
  8. package/dist/{chunk-5BV4MHV6.mjs → chunk-KG3MNGT6.mjs} +1 -1
  9. package/dist/{chunk-62A35O55.mjs → chunk-LBUC4M6L.mjs} +1 -1
  10. package/dist/{chunk-VE5LRUED.mjs → chunk-NAF6ERBI.mjs} +1 -1
  11. package/dist/chunk-NLFT5RPF.mjs +1 -0
  12. package/dist/chunk-PFDPO3UX.mjs +1 -0
  13. package/dist/chunk-PWYA45TZ.mjs +4 -0
  14. package/dist/{chunk-NVHQBM66.mjs → chunk-Q67RF7VO.mjs} +1 -1
  15. package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
  16. package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
  17. package/dist/{chunk-UN57ZYKQ.mjs → chunk-RLKXKF2X.mjs} +1 -1
  18. package/dist/{chunk-XW52WZ2B.mjs → chunk-S4A4VHOI.mjs} +1 -1
  19. package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
  20. package/dist/{chunk-PH67DP3M.mjs → chunk-WI2RL3XQ.mjs} +1 -1
  21. package/dist/chunk-XB3AHDV3.mjs +4 -0
  22. package/dist/{chunk-KYUPRUH5.mjs → chunk-YQP4GEMN.mjs} +1 -1
  23. package/dist/chunk-YRMNCHFO.mjs +4 -0
  24. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  25. package/dist/chunk-ZMB6R6JX.mjs +1 -0
  26. package/dist/components/AdvancedComponents/app-header.js +1 -1
  27. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  28. package/dist/components/AdvancedComponents/index.js +1 -1
  29. package/dist/components/AdvancedComponents/index.mjs +1 -1
  30. package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
  31. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  32. package/dist/components/Blocks/Banner.mjs +1 -1
  33. package/dist/components/Blocks/CallToAction.mjs +1 -1
  34. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  35. package/dist/components/Blocks/Content.mjs +1 -1
  36. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  37. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  38. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  39. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  40. package/dist/components/Blocks/index.mjs +1 -1
  41. package/dist/components/Cards/ContentCard.mjs +1 -1
  42. package/dist/components/Cards/FeatureCard.mjs +1 -1
  43. package/dist/components/Cards/index.mjs +1 -1
  44. package/dist/components/Chat/CopilotInterface.js +1 -1
  45. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  46. package/dist/components/Chat/demo-long-messages.js +1 -1
  47. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  48. package/dist/components/Chat/demo-tests.js +1 -1
  49. package/dist/components/Chat/demo-tests.mjs +1 -1
  50. package/dist/components/Chat/demo.js +1 -1
  51. package/dist/components/Chat/demo.mjs +1 -1
  52. package/dist/components/Chat/example-usage.js +1 -1
  53. package/dist/components/Chat/example-usage.mjs +1 -1
  54. package/dist/components/Chat/example-with-vercel-ai.js +1 -1
  55. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  56. package/dist/components/Chat/index.js +1 -1
  57. package/dist/components/Chat/index.mjs +1 -1
  58. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  59. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  60. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  61. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  62. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  63. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  64. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  65. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  66. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  68. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  69. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  70. package/dist/components/DigitalColleagues/index.d.ts +1 -0
  71. package/dist/components/DigitalColleagues/index.js +1 -1
  72. package/dist/components/DigitalColleagues/index.mjs +1 -1
  73. package/dist/components/DigitalColleagues/team-form.css +1 -0
  74. package/dist/components/DigitalColleagues/team-form.d.ts +24 -0
  75. package/dist/components/DigitalColleagues/team-form.js +5 -0
  76. package/dist/components/DigitalColleagues/team-form.mjs +2 -0
  77. package/dist/components/HeaderFooter/Header.mjs +1 -1
  78. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  79. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  80. package/dist/components/HeaderFooter/index.mjs +1 -1
  81. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  82. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  83. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  84. package/dist/components/Heros/PostHero/index.mjs +1 -1
  85. package/dist/components/Heros/RenderHero.mjs +1 -1
  86. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  87. package/dist/components/Heros/index.mjs +1 -1
  88. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  89. package/dist/components/Layouts/Print.mjs +1 -1
  90. package/dist/components/Layouts/SlideShow.mjs +1 -1
  91. package/dist/components/Layouts/index.mjs +1 -1
  92. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  93. package/dist/components/Menus/SidebarRight.mjs +1 -1
  94. package/dist/components/Menus/index.mjs +1 -1
  95. package/dist/components/Other/index.mjs +1 -1
  96. package/dist/components/Payload/RichText/index.mjs +1 -1
  97. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  98. package/dist/components/Payload/index.mjs +1 -1
  99. package/dist/components/Projects/AddTaskModal.d.ts +2 -1
  100. package/dist/components/Projects/AddTaskModal.js +1 -1
  101. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  102. package/dist/components/Projects/EpicsView.js +1 -1
  103. package/dist/components/Projects/EpicsView.mjs +1 -1
  104. package/dist/components/Projects/FileView.js +1 -1
  105. package/dist/components/Projects/FileView.mjs +1 -1
  106. package/dist/components/Projects/KanbanBoardView.d.ts +3 -1
  107. package/dist/components/Projects/KanbanBoardView.js +1 -1
  108. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  109. package/dist/components/Projects/ProjectPage.js +1 -1
  110. package/dist/components/Projects/ProjectPage.mjs +1 -1
  111. package/dist/components/Projects/ProjectView.d.ts +3 -2
  112. package/dist/components/Projects/ProjectView.js +1 -1
  113. package/dist/components/Projects/ProjectView.mjs +1 -1
  114. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  115. package/dist/components/Projects/TaskCard.js +1 -1
  116. package/dist/components/Projects/TaskCard.mjs +1 -1
  117. package/dist/components/Projects/TasksView.js +1 -1
  118. package/dist/components/Projects/TasksView.mjs +1 -1
  119. package/dist/components/dc-temp/index.js +1 -1
  120. package/dist/components/dc-temp/index.mjs +1 -1
  121. package/dist/components/index.js +11 -11
  122. package/dist/components/index.mjs +1 -1
  123. package/dist/components/ui/index.mjs +1 -1
  124. package/dist/components/ui/sidebar.mjs +1 -1
  125. package/dist/components/ui/switch.mjs +1 -3
  126. package/dist/index.js +19 -19
  127. package/dist/index.mjs +1 -1
  128. package/dist/metafile-cjs.json +1 -1
  129. package/dist/metafile-esm.json +1 -1
  130. package/dist/pages/Blog.mjs +1 -1
  131. package/dist/pages/Documentation.mjs +1 -1
  132. package/dist/pages/IndexPage.mjs +1 -1
  133. package/dist/pages/Intranet.mjs +1 -1
  134. package/dist/pages/LandingPage.mjs +1 -1
  135. package/dist/pages/Page.mjs +1 -1
  136. package/dist/pages/Publish.mjs +1 -1
  137. package/dist/pages/Website.mjs +1 -1
  138. package/dist/sections/AboutSection.mjs +1 -1
  139. package/dist/sections/BlogDetail.mjs +1 -1
  140. package/dist/sections/BlogList.mjs +1 -1
  141. package/dist/sections/BlogListSection.mjs +1 -1
  142. package/dist/sections/ContactSection.mjs +1 -1
  143. package/dist/sections/PageSections.mjs +1 -1
  144. package/dist/sections/PricingSection.mjs +1 -1
  145. package/dist/sections/ServiceDetail.mjs +1 -1
  146. package/dist/sections/ServiceDetailSection.mjs +1 -1
  147. package/dist/sections/ServiceSection.mjs +1 -1
  148. package/dist/sections/index.mjs +1 -1
  149. package/package.json +1 -1
  150. package/dist/chunk-2B5LH5XN.mjs +0 -4
  151. package/dist/chunk-6YHVVP3S.mjs +0 -1
  152. package/dist/chunk-EBTFLN5U.mjs +0 -1
  153. package/dist/chunk-GN25OSET.mjs +0 -1
  154. package/dist/chunk-NHXNMPM5.mjs +0 -4
  155. package/dist/chunk-OYZX5BM4.mjs +0 -1
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p}from"./chunk-D3B2YO7G.mjs";import{a as d}from"./chunk-2RGAV55J.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as l,g as n,i as s,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as g}from"react";import{motion as D,AnimatePresence as N}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:u=[],onAddProject:f,handleProjectOpen:j,handleProjectShare:y}){let[P,t]=g(!1),[b,r]=g(!1),v=async a=>{r(!0);try{await f(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(N,{mode:"wait",children:o(D.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organise your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:u.map(a=>e(d,{project:a,onOpen:j,onShare:y},a.name))})]})]},"projects-index-view")}),e(i,{open:P,onOpenChange:t,children:o(l,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(n,{className:"sr-only",children:[e(s,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
4
+ import{a as d}from"./chunk-2RGAV55J.mjs";import{a as p}from"./chunk-D3B2YO7G.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as l,g as n,i as s,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as g}from"react";import{motion as D,AnimatePresence as N}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:u=[],onAddProject:f,handleProjectOpen:j,handleProjectShare:y}){let[P,t]=g(!1),[b,r]=g(!1),v=async a=>{r(!0);try{await f(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(N,{mode:"wait",children:o(D.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organise your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:u.map(a=>e(d,{project:a,onOpen:j,onShare:y},a.name))})]})]},"projects-index-view")}),e(i,{open:P,onOpenChange:t,children:o(l,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(n,{className:"sr-only",children:[e(s,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-YO3GQYRJ.mjs";import{User as p,AlertCircle as u,Bug as g,Zap as f,BookOpen as b}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var y=({task:t,epic:x,onDragStart:n,onTaskClick:d,isCompact:l=!1})=>{let s=v=>{n(t)},o=()=>{console.log("task clicked",t.title),d(t)},m=()=>{switch(t.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},i=()=>{switch(t.type){case"story":return e(b,{className:"h-3 w-3"});case"bug":return e(g,{className:"h-3 w-3"});case"spike":return e(f,{className:"h-3 w-3"});case"task":default:return e(u,{className:"h-3 w-3"})}},c=()=>{switch(t.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return l?e(a,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:o,children:r("div",{className:"flex items-center gap-2",children:[e("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:i()}),e("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:t.title})]})}):r(a,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:o,children:[r("div",{className:"flex items-center justify-between mb-3",children:[r("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[i(),e("span",{className:"capitalize",children:t.type})]}),r("div",{className:"flex gap-1",children:[e("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${m()}`,children:t.priority}),e("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:t.points})]})]}),e("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:t.description}),e("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:r("div",{className:"flex items-center gap-1",children:[e(p,{className:"h-4 w-4"}),e("span",{children:t.assignee})]})})]})};export{y as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-UN57ZYKQ.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-O46BOA4T.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as r}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:D=!0,messages:T=[],businessUnits:B=[],capabilities:R=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=D?F||Y:null,[Z,u]=r(""),[_,C]=r(!1),j=i?.messages||T,l=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),i.sendMessage()}:()=>{},o=B||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=r(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=r([]),[oe,ae]=r(!1),re=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},le=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!l.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:l,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",l),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:l,isTyping:ee,currentSessionTitle:m?.title,capabilities:R||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:re,onRemoveFile:le,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
4
+ import{a as b}from"./chunk-RLKXKF2X.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-O46BOA4T.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as r}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:D=!0,messages:T=[],businessUnits:B=[],capabilities:R=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=D?F||Y:null,[Z,u]=r(""),[_,C]=r(!1),j=i?.messages||T,l=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),i.sendMessage()}:()=>{},o=B||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=r(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=r([]),[oe,ae]=r(!1),re=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},le=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!l.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:l,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",l),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:l,isTyping:ee,currentSessionTitle:m?.title,capabilities:R||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:re,onRemoveFile:le,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as d}from"./chunk-YRMNCHFO.mjs";import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{a as p,b as f,c as h,e as g}from"./chunk-YO3GQYRJ.mjs";import{useState as b,useEffect as M}from"react";import{Users as S,Edit as j}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function L({team:n,onSave:C,onCancel:v,isLoading:l=!1,title:y,submitLabel:w,cancelLabel:T="Cancel",readOnly:F=!1}){let[e,i]=b({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...n}),[o,N]=b(!F);M(()=>{n&&i(n)},[n]);let x=s=>{s.preventDefault();let D={id:e.id||Date.now(),name:e.name,description:e.description||null,systemMsg:e.systemMsg||null,useProjects:e.useProjects||!1,useKnowledge:e.useKnowledge||!1,useFiles:e.useFiles||!1,useChat:e.useChat||!1,updatedAt:new Date().toISOString(),createdAt:e.createdAt||new Date().toISOString()};C(D)},E=s=>{s.preventDefault(),N(!o)},k=y||(o?n?"Edit Team":"Create New Team":"View Team"),P=w||(n?"Update Team":"Create Team");return t(p,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(f,{children:t(h,{className:"flex items-center gap-2",children:[a(S,{className:"h-5 w-5"}),k]})}),a(g,{children:t("form",{onSubmit:x,className:"space-y-6",children:[t("div",{className:"space-y-4",children:[t("div",{className:"space-y-2",children:[a(r,{htmlFor:"name",children:"Team Name *"}),a(u,{id:"name",value:e.name||"",onChange:s=>i({...e,name:s.target.value}),required:!0,disabled:l||!o,placeholder:"Enter team name..."})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"description",children:"Description"}),a(c,{id:"description",value:e.description||"",onChange:s=>i({...e,description:s.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:l||!o})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"systemMsg",children:"Ways of working"}),a(c,{id:"systemMsg",value:e.systemMsg||"",onChange:s=>i({...e,systemMsg:s.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:l||!o})]})]}),t("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useProjects",checked:e.useProjects||!1,onCheckedChange:s=>i({...e,useProjects:s}),disabled:l||!o}),a(r,{htmlFor:"useProjects",children:"Enable Projects"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useKnowledge",checked:e.useKnowledge||!1,onCheckedChange:s=>i({...e,useKnowledge:s}),disabled:l||!o}),a(r,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useFiles",checked:e.useFiles||!1,onCheckedChange:s=>i({...e,useFiles:s}),disabled:l||!o}),a(r,{htmlFor:"useFiles",children:"Enable File Management"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useChat",checked:e.useChat||!1,onCheckedChange:s=>i({...e,useChat:s}),disabled:l||!o}),a(r,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),t("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(m,{type:"button",variant:"outline",onClick:v,disabled:l,children:o?T:"Close"}),o?a(m,{type:"submit",disabled:l||!e.name?.trim(),children:l?"Saving...":P}):t(m,{type:"button",onClick:E,disabled:l,className:"gap-2",children:[a(j,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{L as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as I,c as T,d as F,g as $,i as M}from"./chunk-YFAZQYK4.mjs";import{a as w}from"./chunk-B4H6T2GP.mjs";import{b as _}from"./chunk-PXLSH6S2.mjs";import{a as r}from"./chunk-L5JPAKPM.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{a as S}from"./chunk-YO3GQYRJ.mjs";import{useState as d}from"react";import{X as De,Plus as O,Edit2 as L,Trash2 as R,Calendar as K,Kanban as Pe,FileText as je,FolderOpen as V,Target as Ee,Layers as Ae}from"lucide-react";import{Fragment as H,jsx as e,jsxs as t}from"react/jsx-runtime";var ee=({projects:g,epics:ae,sprints:te,currentView:b,onUpdateProject:U,onDeleteProject:se,onAddProject:ne,onUpdateEpic:X,onDeleteEpic:ie,onAddEpic:le,onAddSprint:re,onUpdateSprint:q,onDeleteSprint:oe,onViewChange:h,mobileMenuOpen:G,onToggleMobileMenu:de})=>{let[o,u]=d(null),[k,C]=d(null),[D,P]=d(null),[j,E]=d(null),[x,y]=d({name:"",description:""}),[l,c]=d({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[m,v]=d({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[ce,A]=d(!1),[me,z]=d(!1),[f,B]=d({name:"",description:""}),[p,N]=d({name:"",description:"",startDate:"",endDate:"",isActive:!1}),pe=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],J=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Q=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],ue=a=>{C(a.id),y({name:a.name,description:a.description||""})},ve=()=>{k&&x.name.trim()&&(U(k,{name:x.name.trim(),description:x.description.trim()}),C(null))},ge=()=>{C(null),y({name:"",description:""})},be=()=>{f.name.trim()&&(ne({name:f.name.trim(),description:f.description.trim(),isSelected:!1}),B({name:"",description:""}),A(!1))},he=a=>{U(a,{isSelected:!0})},xe=a=>{P(a.id),c({name:a.name,description:a.description||"",color:a.color,confidence:a.confidence,phase:a.phase,startDate:a.startDate.toISOString().split("T")[0],endDate:a.endDate.toISOString().split("T")[0],progress:a.progress})},fe=()=>{D&&l.name.trim()&&(X(D,{name:l.name.trim(),description:l.description.trim(),color:l.color,confidence:l.confidence,phase:l.phase,startDate:new Date(l.startDate),endDate:new Date(l.endDate),progress:l.progress}),P(null))},Ne=()=>{P(null),c({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},ye=a=>{E(a.id),v({name:a.name,description:a.description||"",startDate:a.startDate.toISOString().split("T")[0],endDate:a.endDate.toISOString().split("T")[0],isActive:a.isActive})},we=()=>{j&&m.name.trim()&&(q(j,{name:m.name.trim(),description:m.description.trim(),startDate:new Date(m.startDate),endDate:new Date(m.endDate),isActive:m.isActive}),E(null))},Se=()=>{E(null),v({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ke=()=>{p.name.trim()&&(re({name:p.name.trim(),description:p.description.trim(),startDate:new Date(p.startDate),endDate:new Date(p.endDate),isActive:p.isActive,isSelected:!1}),N({name:"",description:"",startDate:"",endDate:"",isActive:!1}),z(!1))},Ce=a=>{q(a,{isSelected:!0})},W=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Y=a=>{let s=J.find(n=>n.value===a);return s?{label:s.label,color:s.color}:{label:"Medium",color:"text-warning"}},Z=a=>{let s=Q.find(n=>n.value===a);return s?{label:s.label,color:s.color}:{label:"Phase 1",color:"text-primary"}};return t(H,{children:[t("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${G?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[t("div",{className:"border-b border-sidebar-border",children:[t("button",{onClick:()=>{h("kanban"),u(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[e(Pe,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),t("button",{onClick:()=>{h("planning"),u(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[e(K,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),t("button",{onClick:()=>u(o==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[e(V,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),t("button",{onClick:()=>{h("epics"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[e(Ee,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),t("button",{onClick:()=>u(o==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[e(Ae,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),t("button",{onClick:()=>{h("files"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[e(je,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),t("button",{onClick:()=>{h("tasks"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[e(K,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),G&&e("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:de}),o&&t(H,{children:[e("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>u(null)}),t("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[t("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[t("h2",{className:"text-base md:text-lg font-semibold",children:[o==="projects"&&"Projects",o==="epics"&&"Manage Epics",o==="sprints"&&"Manage Sprints",o==="files"&&"Files"]}),e(i,{variant:"ghost",size:"sm",onClick:()=>u(null),children:e(De,{className:"h-4 w-4"})})]}),t("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[o==="projects"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Projects"}),t(i,{size:"sm",onClick:()=>A(!0),className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Project"]})]}),ce&&t("div",{className:"border rounded-lg p-2 space-y-2",children:[e(r,{value:f.name,onChange:a=>B(s=>({...s,name:a.target.value})),placeholder:"Project name",className:"text-sm"}),e(w,{value:f.description,onChange:a=>B(s=>({...s,description:a.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:be,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:()=>A(!1),className:"text-xs h-6",children:"Cancel"})]})]}),e("div",{className:"space-y-2",children:g.map(a=>e("div",{className:"border rounded p-2",children:k===a.id?t("div",{className:"space-y-2",children:[e(r,{value:x.name,onChange:s=>y(n=>({...n,name:s.target.value})),placeholder:"Project name",className:"text-sm"}),e(w,{value:x.description,onChange:s=>y(n=>({...n,description:s.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:ve,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:ge,className:"text-xs h-6",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-1 rounded transition-colors ${a.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>he(a.id),children:[t("div",{className:"flex items-center gap-2 mb-1",children:[e(V,{className:"h-3 w-3 text-muted-foreground"}),e("span",{className:"font-medium text-xs",children:a.name})]}),a.description&&e("p",{className:"text-xs text-muted-foreground mb-1",children:a.description}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>ue(a),className:"h-5 px-1",children:e(L,{className:"h-3 w-3"})}),e(i,{size:"sm",variant:"ghost",onClick:()=>se(a.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})}),o==="epics"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Epics"}),t(i,{size:"sm",onClick:le,className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Epic"]})]}),e("div",{className:"space-y-4",children:ae.map(a=>e("div",{className:"border rounded-lg p-3",children:D===a.id?t("div",{className:"space-y-3",children:[e(r,{value:l.name,onChange:s=>c(n=>({...n,name:s.target.value})),placeholder:"Epic name",className:"text-sm"}),e(w,{value:l.description,onChange:s=>c(n=>({...n,description:s.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),t("div",{className:"space-y-2",children:[e("label",{className:"text-xs font-medium",children:"Color"}),e("div",{className:"flex gap-1 flex-wrap",children:pe.map(s=>e("button",{onClick:()=>c(n=>({...n,color:s})),className:`w-6 h-6 rounded-full ${s} ${l.color===s?"ring-2 ring-ring":""}`},s))})]}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Confidence"}),t(I,{value:l.confidence,onValueChange:s=>c(n=>({...n,confidence:s})),children:[e(F,{className:"h-8 text-xs",children:e(T,{})}),e($,{children:J.map(s=>e(M,{value:s.value,children:e("span",{className:s.color,children:s.label})},s.value))})]})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Phase"}),t(I,{value:l.phase.toString(),onValueChange:s=>c(n=>({...n,phase:parseInt(s)})),children:[e(F,{className:"h-8 text-xs",children:e(T,{})}),e($,{children:Q.map(s=>e(M,{value:s.value.toString(),children:e("span",{className:s.color,children:s.label})},s.value))})]})]})]}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Start Date"}),e(r,{type:"date",value:l.startDate,onChange:s=>c(n=>({...n,startDate:s.target.value})),className:"text-xs h-8"})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"End Date"}),e(r,{type:"date",value:l.endDate,onChange:s=>c(n=>({...n,endDate:s.target.value})),className:"text-xs h-8"})]})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Progress (%)"}),e(r,{type:"number",min:"0",max:"100",value:l.progress,onChange:s=>c(n=>({...n,progress:parseInt(s.target.value)||0})),className:"text-xs h-8"})]}),t("div",{className:"flex gap-2",children:[e(i,{size:"sm",onClick:fe,className:"text-xs",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:Ne,className:"text-xs",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-2 rounded transition-colors ${a.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>X(a.id,{isSelected:!a.isSelected}),children:[t("div",{className:"flex items-center gap-2 mb-2",children:[e("div",{className:`w-3 h-3 rounded-full ${a.color}`}),e("span",{className:"font-medium text-sm",children:a.name})]}),a.description&&e("p",{className:"text-xs text-muted-foreground mb-2",children:a.description}),t("div",{className:"space-y-1 mb-2",children:[t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Confidence:"}),e("span",{className:Y(a.confidence).color,children:Y(a.confidence).label})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Phase:"}),e("span",{className:Z(a.phase).color,children:Z(a.phase).label})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Timeline:"}),t("span",{className:"text-foreground",children:[W(a.startDate)," - ",W(a.endDate)]})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Progress:"}),t("div",{className:"flex items-center gap-2",children:[e("div",{className:"w-12 h-2 bg-muted rounded-full",children:e("div",{className:"h-2 bg-primary rounded-full",style:{width:`${a.progress}%`}})}),t("span",{className:"text-foreground",children:[a.progress,"%"]})]})]})]}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>xe(a),className:"h-6 px-2",children:e(L,{className:"h-3 w-3"})}),e(i,{size:"sm",variant:"ghost",onClick:()=>ie(a.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})}),o==="sprints"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),t(i,{size:"sm",onClick:()=>z(!0),className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Sprint"]})]}),me&&t("div",{className:"border rounded-lg p-2 space-y-2",children:[e(r,{value:p.name,onChange:a=>N(s=>({...s,name:a.target.value})),placeholder:"Sprint name",className:"text-sm"}),t("div",{className:"grid grid-cols-2 gap-1",children:[e(r,{type:"date",value:p.startDate,onChange:a=>N(s=>({...s,startDate:a.target.value})),className:"text-xs"}),e(r,{type:"date",value:p.endDate,onChange:a=>N(s=>({...s,endDate:a.target.value})),className:"text-xs"})]}),t("div",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:p.isActive,onChange:a=>N(s=>({...s,isActive:a.target.checked})),className:"w-3 h-3"}),e("span",{className:"text-xs",children:"Active"})]}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:ke,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:()=>z(!1),className:"text-xs h-6",children:"Cancel"})]})]}),e("div",{className:"space-y-2",children:te.map(a=>e("div",{className:"border rounded p-2",children:j===a.id?t("div",{className:"space-y-2",children:[e(r,{value:m.name,onChange:s=>v(n=>({...n,name:s.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:a.id==="backlog"||a.id==="all-tasks"}),a.id!=="backlog"&&a.id!=="all-tasks"&&t(H,{children:[t("div",{className:"grid grid-cols-2 gap-1",children:[e(r,{type:"date",value:m.startDate,onChange:s=>v(n=>({...n,startDate:s.target.value})),className:"text-xs"}),e(r,{type:"date",value:m.endDate,onChange:s=>v(n=>({...n,endDate:s.target.value})),className:"text-xs"})]}),t("div",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:m.isActive,onChange:s=>v(n=>({...n,isActive:s.target.checked})),className:"w-3 h-3"}),e("span",{className:"text-xs",children:"Active"})]})]}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:we,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:Se,className:"text-xs h-6",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-1 rounded transition-colors ${a.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Ce(a.id),children:[t("div",{className:"flex items-center gap-2 mb-1",children:[e(K,{className:"h-3 w-3 text-muted-foreground"}),e("span",{className:"font-medium text-xs",children:a.name}),a.isActive&&e("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(a.id==="backlog"||a.id==="all-tasks")&&e("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),a.id!=="backlog"&&a.id!=="all-tasks"&&t("p",{className:"text-xs text-muted-foreground mb-1",children:[a.startDate.toLocaleDateString()," - ",a.endDate.toLocaleDateString()]}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>ye(a),className:"h-5 px-1",children:e(L,{className:"h-3 w-3"})}),a.id!=="backlog"&&a.id!=="all-tasks"&&e(i,{size:"sm",variant:"ghost",onClick:()=>oe(a.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})})]})]})]})]})},Xe=g=>e(_,{children:t("div",{className:"flex w-full",children:[e("div",{className:"hidden md:block w-12 fixed h-full",children:e(ee,{...g})}),e("div",{className:"md:hidden",children:e(ee,{...g})}),e("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:e("div",{className:"w-full",children:g.children})})]})});export{Xe as a};
4
+ import{a as I,c as T,d as F,g as $,i as M}from"./chunk-YFAZQYK4.mjs";import{a as w}from"./chunk-B4H6T2GP.mjs";import{b as _}from"./chunk-ZFUP5NVF.mjs";import{a as r}from"./chunk-L5JPAKPM.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{a as S}from"./chunk-YO3GQYRJ.mjs";import{useState as d}from"react";import{X as De,Plus as O,Edit2 as L,Trash2 as R,Calendar as K,Kanban as Pe,FileText as je,FolderOpen as V,Target as Ee,Layers as Ae}from"lucide-react";import{Fragment as H,jsx as e,jsxs as t}from"react/jsx-runtime";var ee=({projects:g,epics:ae,sprints:te,currentView:b,onUpdateProject:U,onDeleteProject:se,onAddProject:ne,onUpdateEpic:X,onDeleteEpic:ie,onAddEpic:le,onAddSprint:re,onUpdateSprint:q,onDeleteSprint:oe,onViewChange:h,mobileMenuOpen:G,onToggleMobileMenu:de})=>{let[o,u]=d(null),[k,C]=d(null),[D,P]=d(null),[j,E]=d(null),[x,y]=d({name:"",description:""}),[l,c]=d({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[m,v]=d({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[ce,A]=d(!1),[me,z]=d(!1),[f,B]=d({name:"",description:""}),[p,N]=d({name:"",description:"",startDate:"",endDate:"",isActive:!1}),pe=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],J=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Q=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],ue=a=>{C(a.id),y({name:a.name,description:a.description||""})},ve=()=>{k&&x.name.trim()&&(U(k,{name:x.name.trim(),description:x.description.trim()}),C(null))},ge=()=>{C(null),y({name:"",description:""})},be=()=>{f.name.trim()&&(ne({name:f.name.trim(),description:f.description.trim(),isSelected:!1}),B({name:"",description:""}),A(!1))},he=a=>{U(a,{isSelected:!0})},xe=a=>{P(a.id),c({name:a.name,description:a.description||"",color:a.color,confidence:a.confidence,phase:a.phase,startDate:a.startDate.toISOString().split("T")[0],endDate:a.endDate.toISOString().split("T")[0],progress:a.progress})},fe=()=>{D&&l.name.trim()&&(X(D,{name:l.name.trim(),description:l.description.trim(),color:l.color,confidence:l.confidence,phase:l.phase,startDate:new Date(l.startDate),endDate:new Date(l.endDate),progress:l.progress}),P(null))},Ne=()=>{P(null),c({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},ye=a=>{E(a.id),v({name:a.name,description:a.description||"",startDate:a.startDate.toISOString().split("T")[0],endDate:a.endDate.toISOString().split("T")[0],isActive:a.isActive})},we=()=>{j&&m.name.trim()&&(q(j,{name:m.name.trim(),description:m.description.trim(),startDate:new Date(m.startDate),endDate:new Date(m.endDate),isActive:m.isActive}),E(null))},Se=()=>{E(null),v({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ke=()=>{p.name.trim()&&(re({name:p.name.trim(),description:p.description.trim(),startDate:new Date(p.startDate),endDate:new Date(p.endDate),isActive:p.isActive,isSelected:!1}),N({name:"",description:"",startDate:"",endDate:"",isActive:!1}),z(!1))},Ce=a=>{q(a,{isSelected:!0})},W=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Y=a=>{let s=J.find(n=>n.value===a);return s?{label:s.label,color:s.color}:{label:"Medium",color:"text-warning"}},Z=a=>{let s=Q.find(n=>n.value===a);return s?{label:s.label,color:s.color}:{label:"Phase 1",color:"text-primary"}};return t(H,{children:[t("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${G?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[t("div",{className:"border-b border-sidebar-border",children:[t("button",{onClick:()=>{h("kanban"),u(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[e(Pe,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),t("button",{onClick:()=>{h("planning"),u(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[e(K,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),t("button",{onClick:()=>u(o==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[e(V,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),t("button",{onClick:()=>{h("epics"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[e(Ee,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),t("button",{onClick:()=>u(o==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[e(Ae,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),t("button",{onClick:()=>{h("files"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[e(je,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),t("button",{onClick:()=>{h("tasks"),u(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${b==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[e(K,{className:"h-4 w-4 flex-shrink-0"}),e("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),G&&e("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:de}),o&&t(H,{children:[e("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>u(null)}),t("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[t("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[t("h2",{className:"text-base md:text-lg font-semibold",children:[o==="projects"&&"Projects",o==="epics"&&"Manage Epics",o==="sprints"&&"Manage Sprints",o==="files"&&"Files"]}),e(i,{variant:"ghost",size:"sm",onClick:()=>u(null),children:e(De,{className:"h-4 w-4"})})]}),t("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[o==="projects"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Projects"}),t(i,{size:"sm",onClick:()=>A(!0),className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Project"]})]}),ce&&t("div",{className:"border rounded-lg p-2 space-y-2",children:[e(r,{value:f.name,onChange:a=>B(s=>({...s,name:a.target.value})),placeholder:"Project name",className:"text-sm"}),e(w,{value:f.description,onChange:a=>B(s=>({...s,description:a.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:be,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:()=>A(!1),className:"text-xs h-6",children:"Cancel"})]})]}),e("div",{className:"space-y-2",children:g.map(a=>e("div",{className:"border rounded p-2",children:k===a.id?t("div",{className:"space-y-2",children:[e(r,{value:x.name,onChange:s=>y(n=>({...n,name:s.target.value})),placeholder:"Project name",className:"text-sm"}),e(w,{value:x.description,onChange:s=>y(n=>({...n,description:s.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:ve,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:ge,className:"text-xs h-6",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-1 rounded transition-colors ${a.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>he(a.id),children:[t("div",{className:"flex items-center gap-2 mb-1",children:[e(V,{className:"h-3 w-3 text-muted-foreground"}),e("span",{className:"font-medium text-xs",children:a.name})]}),a.description&&e("p",{className:"text-xs text-muted-foreground mb-1",children:a.description}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>ue(a),className:"h-5 px-1",children:e(L,{className:"h-3 w-3"})}),e(i,{size:"sm",variant:"ghost",onClick:()=>se(a.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})}),o==="epics"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Epics"}),t(i,{size:"sm",onClick:le,className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Epic"]})]}),e("div",{className:"space-y-4",children:ae.map(a=>e("div",{className:"border rounded-lg p-3",children:D===a.id?t("div",{className:"space-y-3",children:[e(r,{value:l.name,onChange:s=>c(n=>({...n,name:s.target.value})),placeholder:"Epic name",className:"text-sm"}),e(w,{value:l.description,onChange:s=>c(n=>({...n,description:s.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),t("div",{className:"space-y-2",children:[e("label",{className:"text-xs font-medium",children:"Color"}),e("div",{className:"flex gap-1 flex-wrap",children:pe.map(s=>e("button",{onClick:()=>c(n=>({...n,color:s})),className:`w-6 h-6 rounded-full ${s} ${l.color===s?"ring-2 ring-ring":""}`},s))})]}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Confidence"}),t(I,{value:l.confidence,onValueChange:s=>c(n=>({...n,confidence:s})),children:[e(F,{className:"h-8 text-xs",children:e(T,{})}),e($,{children:J.map(s=>e(M,{value:s.value,children:e("span",{className:s.color,children:s.label})},s.value))})]})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Phase"}),t(I,{value:l.phase.toString(),onValueChange:s=>c(n=>({...n,phase:parseInt(s)})),children:[e(F,{className:"h-8 text-xs",children:e(T,{})}),e($,{children:Q.map(s=>e(M,{value:s.value.toString(),children:e("span",{className:s.color,children:s.label})},s.value))})]})]})]}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Start Date"}),e(r,{type:"date",value:l.startDate,onChange:s=>c(n=>({...n,startDate:s.target.value})),className:"text-xs h-8"})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"End Date"}),e(r,{type:"date",value:l.endDate,onChange:s=>c(n=>({...n,endDate:s.target.value})),className:"text-xs h-8"})]})]}),t("div",{className:"space-y-1",children:[e("label",{className:"text-xs font-medium",children:"Progress (%)"}),e(r,{type:"number",min:"0",max:"100",value:l.progress,onChange:s=>c(n=>({...n,progress:parseInt(s.target.value)||0})),className:"text-xs h-8"})]}),t("div",{className:"flex gap-2",children:[e(i,{size:"sm",onClick:fe,className:"text-xs",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:Ne,className:"text-xs",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-2 rounded transition-colors ${a.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>X(a.id,{isSelected:!a.isSelected}),children:[t("div",{className:"flex items-center gap-2 mb-2",children:[e("div",{className:`w-3 h-3 rounded-full ${a.color}`}),e("span",{className:"font-medium text-sm",children:a.name})]}),a.description&&e("p",{className:"text-xs text-muted-foreground mb-2",children:a.description}),t("div",{className:"space-y-1 mb-2",children:[t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Confidence:"}),e("span",{className:Y(a.confidence).color,children:Y(a.confidence).label})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Phase:"}),e("span",{className:Z(a.phase).color,children:Z(a.phase).label})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Timeline:"}),t("span",{className:"text-foreground",children:[W(a.startDate)," - ",W(a.endDate)]})]}),t("div",{className:"flex items-center justify-between text-xs",children:[e("span",{className:"text-muted-foreground",children:"Progress:"}),t("div",{className:"flex items-center gap-2",children:[e("div",{className:"w-12 h-2 bg-muted rounded-full",children:e("div",{className:"h-2 bg-primary rounded-full",style:{width:`${a.progress}%`}})}),t("span",{className:"text-foreground",children:[a.progress,"%"]})]})]})]}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>xe(a),className:"h-6 px-2",children:e(L,{className:"h-3 w-3"})}),e(i,{size:"sm",variant:"ghost",onClick:()=>ie(a.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})}),o==="sprints"&&e(S,{className:"p-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-center justify-between",children:[e("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),t(i,{size:"sm",onClick:()=>z(!0),className:"gap-1",children:[e(O,{className:"h-3 w-3"}),"Add Sprint"]})]}),me&&t("div",{className:"border rounded-lg p-2 space-y-2",children:[e(r,{value:p.name,onChange:a=>N(s=>({...s,name:a.target.value})),placeholder:"Sprint name",className:"text-sm"}),t("div",{className:"grid grid-cols-2 gap-1",children:[e(r,{type:"date",value:p.startDate,onChange:a=>N(s=>({...s,startDate:a.target.value})),className:"text-xs"}),e(r,{type:"date",value:p.endDate,onChange:a=>N(s=>({...s,endDate:a.target.value})),className:"text-xs"})]}),t("div",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:p.isActive,onChange:a=>N(s=>({...s,isActive:a.target.checked})),className:"w-3 h-3"}),e("span",{className:"text-xs",children:"Active"})]}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:ke,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:()=>z(!1),className:"text-xs h-6",children:"Cancel"})]})]}),e("div",{className:"space-y-2",children:te.map(a=>e("div",{className:"border rounded p-2",children:j===a.id?t("div",{className:"space-y-2",children:[e(r,{value:m.name,onChange:s=>v(n=>({...n,name:s.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:a.id==="backlog"||a.id==="all-tasks"}),a.id!=="backlog"&&a.id!=="all-tasks"&&t(H,{children:[t("div",{className:"grid grid-cols-2 gap-1",children:[e(r,{type:"date",value:m.startDate,onChange:s=>v(n=>({...n,startDate:s.target.value})),className:"text-xs"}),e(r,{type:"date",value:m.endDate,onChange:s=>v(n=>({...n,endDate:s.target.value})),className:"text-xs"})]}),t("div",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:m.isActive,onChange:s=>v(n=>({...n,isActive:s.target.checked})),className:"w-3 h-3"}),e("span",{className:"text-xs",children:"Active"})]})]}),t("div",{className:"flex gap-1",children:[e(i,{size:"sm",onClick:we,className:"text-xs h-6",children:"Save"}),e(i,{size:"sm",variant:"outline",onClick:Se,className:"text-xs h-6",children:"Cancel"})]})]}):t("div",{className:`cursor-pointer p-1 rounded transition-colors ${a.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Ce(a.id),children:[t("div",{className:"flex items-center gap-2 mb-1",children:[e(K,{className:"h-3 w-3 text-muted-foreground"}),e("span",{className:"font-medium text-xs",children:a.name}),a.isActive&&e("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(a.id==="backlog"||a.id==="all-tasks")&&e("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),a.id!=="backlog"&&a.id!=="all-tasks"&&t("p",{className:"text-xs text-muted-foreground mb-1",children:[a.startDate.toLocaleDateString()," - ",a.endDate.toLocaleDateString()]}),t("div",{className:"flex gap-1",onClick:s=>s.stopPropagation(),children:[e(i,{size:"sm",variant:"ghost",onClick:()=>ye(a),className:"h-5 px-1",children:e(L,{className:"h-3 w-3"})}),a.id!=="backlog"&&a.id!=="all-tasks"&&e(i,{size:"sm",variant:"ghost",onClick:()=>oe(a.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:e(R,{className:"h-3 w-3"})})]})]})},a.id))})]})})]})]})]})]})},Xe=g=>e(_,{children:t("div",{className:"flex w-full",children:[e("div",{className:"hidden md:block w-12 fixed h-full",children:e(ee,{...g})}),e("div",{className:"md:hidden",children:e(ee,{...g})}),e("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:e("div",{className:"w-full",children:g.children})})]})});export{Xe as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
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 md: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:"md: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};
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 +1 @@
1
- import{a as E}from"./chunk-6YHVVP3S.mjs";import{a as w}from"./chunk-Z22NSJMF.mjs";import{a as u,c as v,d as f,g as h,i as l}from"./chunk-YFAZQYK4.mjs";import{a as b}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{b as d}from"./chunk-CSBGSBEU.mjs";import{a as k}from"./chunk-YO3GQYRJ.mjs";import{useState as x}from"react";import{Plus as U,Move as X,Edit2 as q,Trash2 as G,Check as J,X as K}from"lucide-react";import{Fragment as Q,jsx as s,jsxs as t}from"react/jsx-runtime";var le=({tasks:C,epics:y,sprints:W,onUpdateTask:S,onTaskClick:T,onAddTaskToEpic:D,onAddEpic:P,onUpdateEpic:I,onDeleteEpic:B})=>{let[c,N]=x(null),[m,g]=x(null),[r,n]=x({}),z=e=>{N(e)},A=e=>{e.preventDefault()},V=(e,i)=>{e.preventDefault(),c&&c.epicId!==i&&(S(c.id,{epicId:i}),N(null))},$=e=>C.filter(i=>i.epicId===e),R=e=>{g(e.id),n({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase,progress:e.progress})},M=()=>{m&&r.name&&(I(m,r),g(null),n({}))},O=()=>{g(null),n({})},j=e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&B(e)},Y=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,F=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[s(w,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:P}}),s("div",{className:"flex-1",children:s("div",{className:"w-full",children:s("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:y.map(e=>{let i=$(e.id),H=i.reduce((a,L)=>a+L.points,0);return t(k,{className:`flex flex-col ${m===e.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:A,onDrop:a=>V(a,e.id),children:[s("div",{className:"p-4 border-b border-border",children:m===e.id?t("div",{className:"space-y-4",children:[t("div",{className:"flex items-center justify-between",children:[s(p,{value:r.name||"",onChange:a=>n({...r,name:a.target.value}),placeholder:"Epic name",className:"font-semibold"}),t("div",{className:"flex gap-2 ml-2",children:[s(o,{size:"sm",variant:"ghost",onClick:M,className:"p-1 h-8 w-8",children:s(J,{className:"h-4 w-4"})}),s(o,{size:"sm",variant:"ghost",onClick:O,className:"p-1 h-8 w-8",children:s(K,{className:"h-4 w-4"})})]})]}),s(b,{value:r.description||"",onChange:a=>n({...r,description:a.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),t(u,{value:r.confidence||e.confidence,onValueChange:a=>n({...r,confidence:a}),children:[s(f,{className:"text-xs",children:s(v,{})}),t(h,{children:[s(l,{value:"low",children:"Low"}),s(l,{value:"medium",children:"Medium"}),s(l,{value:"high",children:"High"})]})]})]}),t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t(u,{value:r.phase?.toString()||e.phase.toString(),onValueChange:a=>n({...r,phase:parseInt(a)}),children:[s(f,{className:"text-xs",children:s(v,{})}),s(h,{children:[1,2,3,4,5,6,7,8,9].map(a=>t(l,{value:a.toString(),children:["Phase ",a]},a))})]})]})]}),t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),s(p,{type:"number",min:"0",max:"100",value:r.progress||e.progress,onChange:a=>n({...r,progress:parseInt(a.target.value)||0}),className:"text-xs"})]})]}):t(Q,{children:[t("div",{className:"flex items-center gap-2 mb-2",children:[s("div",{className:`w-4 h-4 rounded-full ${e.color}`}),s("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),t("div",{className:"flex gap-1",children:[s(o,{size:"sm",variant:"ghost",onClick:()=>R(e),className:"p-1 h-8 w-8",children:s(q,{className:"h-3 w-3"})}),s(o,{size:"sm",variant:"ghost",onClick:()=>j(e.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:s(G,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex flex-wrap gap-2 mb-3",children:[t(d,{className:`text-xs ${F(e.confidence)}`,children:[e.confidence," confidence"]}),t(d,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),t(d,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[i.length," tasks"]}),t(d,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[H," pts"]})]}),e.description&&s("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),t("div",{className:"mb-3",children:[t("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[s("span",{className:"select-none",children:"Progress"}),t("span",{className:"select-none",children:[e.progress,"%"]})]}),s("div",{className:"w-full bg-muted rounded-full h-2",children:s("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),t(o,{onClick:()=>D(e.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[s(U,{className:"h-4 w-4"}),"Add Task"]})]})}),s("div",{className:"flex-1 p-4 overflow-y-auto",children:s("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${c?"border-primary bg-primary/10":"border-border"}`,children:i.length===0?t("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[s(X,{className:"h-8 w-8 mb-2"}),s("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):i.map(a=>s(E,{task:a,epic:e,onDragStart:z,onTaskClick:T,isCompact:!0},a.id))})})]},e.id)})})})})]})};export{le as a};
1
+ import{a as E}from"./chunk-AM2SRWFU.mjs";import{a as w}from"./chunk-Z22NSJMF.mjs";import{a as u,c as v,d as f,g as h,i as l}from"./chunk-YFAZQYK4.mjs";import{a as b}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{b as d}from"./chunk-CSBGSBEU.mjs";import{a as k}from"./chunk-YO3GQYRJ.mjs";import{useState as x}from"react";import{Plus as U,Move as X,Edit2 as q,Trash2 as G,Check as J,X as K}from"lucide-react";import{Fragment as Q,jsx as s,jsxs as t}from"react/jsx-runtime";var le=({tasks:C,epics:y,sprints:W,onUpdateTask:S,onTaskClick:T,onAddTaskToEpic:D,onAddEpic:P,onUpdateEpic:I,onDeleteEpic:B})=>{let[c,N]=x(null),[m,g]=x(null),[r,n]=x({}),z=e=>{N(e)},A=e=>{e.preventDefault()},V=(e,i)=>{e.preventDefault(),c&&c.epicId!==i&&(S(c.id,{epicId:i}),N(null))},$=e=>C.filter(i=>i.epicId===e),R=e=>{g(e.id),n({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase,progress:e.progress})},M=()=>{m&&r.name&&(I(m,r),g(null),n({}))},O=()=>{g(null),n({})},j=e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&B(e)},Y=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,F=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[s(w,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:P}}),s("div",{className:"flex-1",children:s("div",{className:"w-full",children:s("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:y.map(e=>{let i=$(e.id),H=i.reduce((a,L)=>a+L.points,0);return t(k,{className:`flex flex-col ${m===e.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:A,onDrop:a=>V(a,e.id),children:[s("div",{className:"p-4 border-b border-border",children:m===e.id?t("div",{className:"space-y-4",children:[t("div",{className:"flex items-center justify-between",children:[s(p,{value:r.name||"",onChange:a=>n({...r,name:a.target.value}),placeholder:"Epic name",className:"font-semibold"}),t("div",{className:"flex gap-2 ml-2",children:[s(o,{size:"sm",variant:"ghost",onClick:M,className:"p-1 h-8 w-8",children:s(J,{className:"h-4 w-4"})}),s(o,{size:"sm",variant:"ghost",onClick:O,className:"p-1 h-8 w-8",children:s(K,{className:"h-4 w-4"})})]})]}),s(b,{value:r.description||"",onChange:a=>n({...r,description:a.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),t("div",{className:"grid grid-cols-2 gap-2",children:[t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),t(u,{value:r.confidence||e.confidence,onValueChange:a=>n({...r,confidence:a}),children:[s(f,{className:"text-xs",children:s(v,{})}),t(h,{children:[s(l,{value:"low",children:"Low"}),s(l,{value:"medium",children:"Medium"}),s(l,{value:"high",children:"High"})]})]})]}),t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t(u,{value:r.phase?.toString()||e.phase.toString(),onValueChange:a=>n({...r,phase:parseInt(a)}),children:[s(f,{className:"text-xs",children:s(v,{})}),s(h,{children:[1,2,3,4,5,6,7,8,9].map(a=>t(l,{value:a.toString(),children:["Phase ",a]},a))})]})]})]}),t("div",{children:[s("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),s(p,{type:"number",min:"0",max:"100",value:r.progress||e.progress,onChange:a=>n({...r,progress:parseInt(a.target.value)||0}),className:"text-xs"})]})]}):t(Q,{children:[t("div",{className:"flex items-center gap-2 mb-2",children:[s("div",{className:`w-4 h-4 rounded-full ${e.color}`}),s("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),t("div",{className:"flex gap-1",children:[s(o,{size:"sm",variant:"ghost",onClick:()=>R(e),className:"p-1 h-8 w-8",children:s(q,{className:"h-3 w-3"})}),s(o,{size:"sm",variant:"ghost",onClick:()=>j(e.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:s(G,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex flex-wrap gap-2 mb-3",children:[t(d,{className:`text-xs ${F(e.confidence)}`,children:[e.confidence," confidence"]}),t(d,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),t(d,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[i.length," tasks"]}),t(d,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[H," pts"]})]}),e.description&&s("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),t("div",{className:"mb-3",children:[t("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[s("span",{className:"select-none",children:"Progress"}),t("span",{className:"select-none",children:[e.progress,"%"]})]}),s("div",{className:"w-full bg-muted rounded-full h-2",children:s("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),t(o,{onClick:()=>D(e.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[s(U,{className:"h-4 w-4"}),"Add Task"]})]})}),s("div",{className:"flex-1 p-4 overflow-y-auto",children:s("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${c?"border-primary bg-primary/10":"border-border"}`,children:i.length===0?t("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[s(X,{className:"h-8 w-8 mb-2"}),s("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):i.map(a=>s(E,{task:a,epic:e,onDragStart:z,onTaskClick:T,isCompact:!0},a.id))})})]},e.id)})})})})]})};export{le as a};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-Z22NSJMF.mjs";import{a as l}from"./chunk-ZXPDSSCF.mjs";import{useState as u}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function p({documents:a=[],contexts:d=[],onDocumentClick:i=o=>console.log("Document clicked:",o),onDocumentShare:m=o=>console.log("Share document:",o),onLoadDocumentContent:g,selectedDocumentId:c}){let[o,s]=u(d[0]);return!d||d.length===0?t("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:e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),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"})})]}):t("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),t("div",{className:"mt-6",children:[e("div",{className:"border-b border-border",children:e("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:d.map(n=>t("button",{onClick:()=>s(n),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===n.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[n.icon,n.label]},n.id))})}),o.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-muted-foreground",children:o.description})})]})]}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-3xl border overflow-hidden",children:e(l,{documents:a,menuConfig:o.menuConfig,onDocumentClick:i,onDocumentShare:m,selectedDocumentId:c})})})]})}export{p as a};
1
+ import{a as l}from"./chunk-ZXPDSSCF.mjs";import{a as r}from"./chunk-Z22NSJMF.mjs";import{useState as u}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function p({documents:a=[],contexts:d=[],onDocumentClick:i=o=>console.log("Document clicked:",o),onDocumentShare:m=o=>console.log("Share document:",o),onLoadDocumentContent:g,selectedDocumentId:c}){let[o,s]=u(d[0]);return!d||d.length===0?t("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:e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),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"})})]}):t("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),t("div",{className:"mt-6",children:[e("div",{className:"border-b border-border",children:e("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:d.map(n=>t("button",{onClick:()=>s(n),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===n.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[n.icon,n.label]},n.id))})}),o.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-muted-foreground",children:o.description})})]})]}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-3xl border overflow-hidden",children:e(l,{documents:a,menuConfig:o.menuConfig,onDocumentClick:i,onDocumentShare:m,selectedDocumentId:c})})})]})}export{p as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as T}from"./chunk-5WVFEIMC.mjs";import{a as F}from"./chunk-IF3425JX.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
4
+ import{a as F}from"./chunk-IF3425JX.mjs";import{a as T}from"./chunk-5WVFEIMC.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- import{a as O}from"./chunk-2B5LH5XN.mjs";import{a as v,b as U,d as B}from"./chunk-JB7IQQ3N.mjs";import{a as D}from"./chunk-5BV4MHV6.mjs";import{a as S}from"./chunk-2RGAV55J.mjs";import{a as T}from"./chunk-5RTGHMF3.mjs";import{a as I}from"./chunk-GHZ6CUY3.mjs";import{a as i}from"./chunk-Z22NSJMF.mjs";import{a as F}from"./chunk-UN57ZYKQ.mjs";import{a as P,b as j}from"./chunk-PA4ZBJDO.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{b as N}from"./chunk-CSBGSBEU.mjs";import{a as C,b as x,c as y,d as w,e as A,f as k}from"./chunk-YO3GQYRJ.mjs";import{useState as H}from"react";import{motion as oe,AnimatePresence as te}from"motion/react";import{Bot as ae}from"lucide-react";import{motion as Z}from"motion/react";import{Star as ee}from"lucide-react";import{jsx as s,jsxs as l}from"react/jsx-runtime";function f({app:a,onOpen:r,onFavorite:n,showProgress:c=!1,className:d}){return s(Z.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:d,children:l(C,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[s(x,{className:"pb-2",children:l("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:a.icon}),a.new?s(N,{className:"rounded-xl bg-amber-500",children:"New"}):s(u,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>n?.(a),children:s(ee,{className:"h-4 w-4"})})]})}),l(A,{className:"pb-2",children:[s(y,{className:"text-lg",children:a.name}),s(w,{children:a.description}),c&&a.progress<100&&l("div",{className:"mt-2",children:[l("div",{className:"flex items-center justify-between text-sm",children:[s("span",{children:"Installation"}),l("span",{children:[a.progress,"%"]})]}),s(T,{value:a.progress,className:"h-2 mt-1 rounded-xl"})]})]}),s(k,{children:s(u,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>r?.(a),children:a.progress<100?"Continue Install":"Open"})})]})})}import{jsx as e,jsxs as t}from"react/jsx-runtime";function se({title:a="Digital Colleagues",businessUnits:r,projects:n,fileCount:c,teamMemberCount:d,onCreateProject:R,onOpenProject:L,sidebarItems:ie,initialColleagues:E,users:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G}){let[m,p]=H("home"),[g,Y]=H(r[0]),b=o=>{console.log("Opening app:",o.name)},h=o=>{console.log("Favoriting app:",o.name)},K=o=>{console.log("Opening file:",o.name)},le=o=>{console.log("Sharing file:",o.name)},W=o=>{console.log("Opening project:",o.name),L(o)},_=o=>{console.log("Sharing project:",o.name)},$=o=>{Y(o),console.log("Business unit changed to:",o.name)},q=()=>{console.log("Copilot clicked - navigating to chat"),p("chat")},J=o=>{console.log("Notification removed:",o)},Q=()=>{console.log("All notifications removed")},X=()=>{switch(m){case"home":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[t("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),t("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:n.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:d}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:c}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(i,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>p("chat")}})]});case"colleagues":return e(O,{initialColleagues:E,availableUsers:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G});case"chat":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),t("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),e(i,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return t("div",{className:"space-y-8",children:[e(i,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.filter(o=>o.new).map(o=>e(f,{app:o,showProgress:!0,onOpen:b,onFavorite:h},o.name))})]}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.map(o=>e(f,{app:o,onOpen:b,onFavorite:h},o.name))})]})]});case"knowledge":return e(D,{});case"files":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),t("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(I,{files:U,onFileClick:K})]})]});case"projects":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:R}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:n.map(o=>e(S,{project:o,onOpen:W,onShare:_},o.name))})]})]});case"learn":return t("div",{className:"space-y-8",children:[e(i,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:B.slice(0,3).map(o=>t("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:o.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:o.description}),t("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:o.duration}),e("span",{children:o.level})]})]},o.title))})]})]});default:return null}};return e(F,{sidebarItems:P,title:a,notifications:j,businessUnits:r,currentBusinessUnit:g,onBusinessUnitChange:$,activeTab:m,onTabChange:p,showTabs:!0,onActionClick:q,actionIcon:e(ae,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:J,onRemoveAll:Q,children:e(te,{mode:"wait",children:e(oe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:X()},m)})})}export{se as a};
5
+ import{a as O}from"./chunk-XB3AHDV3.mjs";import{a as S}from"./chunk-2RGAV55J.mjs";import{a as T}from"./chunk-5RTGHMF3.mjs";import{a as D}from"./chunk-KG3MNGT6.mjs";import{a as I}from"./chunk-GHZ6CUY3.mjs";import{a as v,b as U,d as B}from"./chunk-JB7IQQ3N.mjs";import{a as i}from"./chunk-Z22NSJMF.mjs";import{a as F}from"./chunk-RLKXKF2X.mjs";import{a as P,b as j}from"./chunk-PA4ZBJDO.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{b as N}from"./chunk-CSBGSBEU.mjs";import{a as C,b as x,c as y,d as w,e as A,f as k}from"./chunk-YO3GQYRJ.mjs";import{useState as H}from"react";import{motion as oe,AnimatePresence as te}from"motion/react";import{Bot as ae}from"lucide-react";import{motion as Z}from"motion/react";import{Star as ee}from"lucide-react";import{jsx as s,jsxs as l}from"react/jsx-runtime";function f({app:a,onOpen:r,onFavorite:n,showProgress:c=!1,className:d}){return s(Z.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:d,children:l(C,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[s(x,{className:"pb-2",children:l("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:a.icon}),a.new?s(N,{className:"rounded-xl bg-amber-500",children:"New"}):s(u,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>n?.(a),children:s(ee,{className:"h-4 w-4"})})]})}),l(A,{className:"pb-2",children:[s(y,{className:"text-lg",children:a.name}),s(w,{children:a.description}),c&&a.progress<100&&l("div",{className:"mt-2",children:[l("div",{className:"flex items-center justify-between text-sm",children:[s("span",{children:"Installation"}),l("span",{children:[a.progress,"%"]})]}),s(T,{value:a.progress,className:"h-2 mt-1 rounded-xl"})]})]}),s(k,{children:s(u,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>r?.(a),children:a.progress<100?"Continue Install":"Open"})})]})})}import{jsx as e,jsxs as t}from"react/jsx-runtime";function se({title:a="Digital Colleagues",businessUnits:r,projects:n,fileCount:c,teamMemberCount:d,onCreateProject:R,onOpenProject:L,sidebarItems:ie,initialColleagues:E,users:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G}){let[m,p]=H("home"),[g,Y]=H(r[0]),b=o=>{console.log("Opening app:",o.name)},h=o=>{console.log("Favoriting app:",o.name)},K=o=>{console.log("Opening file:",o.name)},le=o=>{console.log("Sharing file:",o.name)},W=o=>{console.log("Opening project:",o.name),L(o)},_=o=>{console.log("Sharing project:",o.name)},$=o=>{Y(o),console.log("Business unit changed to:",o.name)},q=()=>{console.log("Copilot clicked - navigating to chat"),p("chat")},J=o=>{console.log("Notification removed:",o)},Q=()=>{console.log("All notifications removed")},X=()=>{switch(m){case"home":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[t("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),t("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:n.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:d}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:c}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(i,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>p("chat")}})]});case"colleagues":return e(O,{initialColleagues:E,availableUsers:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G});case"chat":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),t("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),e(i,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return t("div",{className:"space-y-8",children:[e(i,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.filter(o=>o.new).map(o=>e(f,{app:o,showProgress:!0,onOpen:b,onFavorite:h},o.name))})]}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.map(o=>e(f,{app:o,onOpen:b,onFavorite:h},o.name))})]})]});case"knowledge":return e(D,{});case"files":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),t("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(I,{files:U,onFileClick:K})]})]});case"projects":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:R}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:n.map(o=>e(S,{project:o,onOpen:W,onShare:_},o.name))})]})]});case"learn":return t("div",{className:"space-y-8",children:[e(i,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:B.slice(0,3).map(o=>t("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:o.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:o.description}),t("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:o.duration}),e("span",{children:o.level})]})]},o.title))})]})]});default:return null}};return e(F,{sidebarItems:P,title:a,notifications:j,businessUnits:r,currentBusinessUnit:g,onBusinessUnitChange:$,activeTab:m,onTabChange:p,showTabs:!0,onActionClick:q,actionIcon:e(ae,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:J,onRemoveAll:Q,children:e(te,{mode:"wait",children:e(oe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:X()},m)})})}export{se as a};
@@ -0,0 +1 @@
1
+ import{a as M}from"./chunk-HHYHENVF.mjs";import{a as B}from"./chunk-AM2SRWFU.mjs";import{a as O}from"./chunk-AMV3MECK.mjs";import{a as I}from"./chunk-ORNGKQM7.mjs";import{a as x}from"./chunk-PFDPO3UX.mjs";import{a as N}from"./chunk-Z22NSJMF.mjs";import{b as w}from"./chunk-CSBGSBEU.mjs";import{useEffect as D,useState as o}from"react";import{Fragment as ts,jsx as i,jsxs as r}from"react/jsx-runtime";var fs=({initialTasks:m=[],initialEpics:u=[],initialSprints:k=[],initialUsers:U=[],initialColleagues:j=[],initialProjects:is=[],onAddTask:K,onUpdateTask:g,onDeleteTask:y,onTaskClick:R,onAddEpic:F})=>{let[H,n]=o(m),[d,h]=o(u),[f,V]=o(k),[$,S]=o(!1),[q,b]=o(!1),[c,T]=o(null),[v,P]=o(null),[z,as]=o(U),[G,os]=o(j),C=d.filter(s=>!0).map(s=>s.id),l=f.find(s=>s.isSelected);C.push("no-epic"),D(()=>{n(m)},[m]),D(()=>{h(u)},[u]),D(()=>{V(k)},[k]);let J=H.filter(s=>{let e=C.includes(s.epicId)||!s.epicId;return!l||l.id==="all-tasks"?e:l.id==="backlog"?e&&!s.sprintId:e&&s.sprintId===l.id}),L=s=>J.filter(e=>e.status===s),Q=s=>{let e={};return d.forEach(t=>{e[t.id]=s.filter(a=>a.epicId===t.id)}),e["no-epic"]=s.filter(t=>!t.epicId),e},W=s=>{P(s)},X=s=>{v&&(n(e=>e.map(t=>t.id===v.id?{...t,status:s}:t)),g?.(v.id,{status:s}),P(null))},Y=s=>{let e={...s,id:Date.now().toString(),createdAt:new Date};n(t=>[...t,e]),K?.(s)},Z=async(s,e)=>{n(t=>t.map(a=>a.id===s?{...a,...e}:a)),g&&await g(s,e)},_=async s=>{n(e=>e.filter(t=>t.id!==s)),c?.id===s&&T(null),y&&await y(s)},ss=s=>{let e={...s,id:Date.now().toString(),isSelected:!0};h(t=>[...t,e]),F?.(s)},es=s=>{T(s),R?.(s)};return r("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[i(N,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>S(!0)},secondaryAction:{label:"Add epic",onClick:()=>b(!0)}}),i("div",{className:"flex-1",children:r("div",{className:"w-full",children:[i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(s=>{let e=L(s.status),t=Q(e);return i(O,{title:s.title,status:s.status,taskCount:e.length,onDrop:X,isCompact:s.status==="done",children:C.map(a=>{let E=d.find(p=>p.id===a),A=t[a]||[];return A.length===0?null:r("div",{className:"mb-6",children:[r("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),i(w,{variant:"secondary",className:"text-xs",children:A.length})]})," ",i("div",{className:"space-y-3",children:A.map(p=>i(B,{task:p,epic:E,onDragStart:W,onTaskClick:es,isCompact:s.status==="done"},p.id))})]},a)})},s.id)})}),r(ts,{children:[i(x,{isOpen:$,onClose:()=>S(!1),onAddTask:Y,assignees:[...G,...z],epics:d,sprints:f}),i(I,{isOpen:q,onClose:()=>b(!1),onAddEpic:ss}),c&&i(M,{isOpen:!!c,onClose:()=>T(null),task:c,epics:d,sprints:f,onUpdateTask:Z,onDeleteTask:_})]})]})})]})};export{fs as a};
@@ -0,0 +1 @@
1
+ import{a as S,b as T}from"./chunk-E4TE4NV6.mjs";import{a as p,c as d,d as m,g,i as r}from"./chunk-YFAZQYK4.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{a as h,f as k,g as f,h as I,i as C}from"./chunk-3UMMMQEH.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{useState as G,useEffect as x}from"react";import{BookOpen as V,Bug as E,Zap as M,AlertCircle as P}from"lucide-react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var H=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:V},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:P},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:E},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:M}],R=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],X=({isOpen:n,onClose:u,onAddTask:D,epics:A,sprints:F,assignees:L,defaultEpicId:l})=>{let[i,c]=G({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});x(()=>{n&&l&&c(e=>({...e,epicId:l}))},[n,l]),x(()=>{n&&c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:l||"",sprintId:"none",assignee:""})},[n]);let w=e=>{e.preventDefault(),i.title.trim()&&(D({title:i.title.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,points:i.points,epicId:i.epicId,sprintId:i.sprintId==="none"?void 0:i.sprintId,assignee:i.assignee.trim()||"Unassigned"}),c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:l||"",sprintId:"none",assignee:""}),u())},s=(e,v)=>{c(B=>({...B,[e]:v}))};return t(h,{open:n,onOpenChange:u,children:a(k,{className:"sm:max-w-md",children:[t(f,{children:t(C,{children:"Add New Task"})}),a("form",{onSubmit:w,className:"space-y-4",children:[a("div",{className:"space-y-2",children:[t(o,{htmlFor:"title",children:"Task Title"}),t(y,{id:"title",value:i.title,onChange:e=>s("title",e.target.value),placeholder:"Enter task title",required:!0})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"description",children:"Description"}),t(N,{id:"description",value:i.description,onChange:e=>s("description",e.target.value),placeholder:"Enter task description",rows:3})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Type"}),t(S,{type:"single",value:i.type,onValueChange:e=>e&&s("type",e),children:H.map(e=>{let v=e.icon;return a(T,{value:e.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[t(v,{className:"h-4 w-4"}),e.label]},e.value)})})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Priority"}),t(S,{type:"single",value:i.priority,onValueChange:e=>e&&s("priority",e),children:R.map(e=>t(T,{value:e.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:e.label},e.value))})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"points",children:"Story Points"}),t(y,{id:"points",type:"number",min:"1",max:"100",value:i.points,onChange:e=>s("points",parseInt(e.target.value)||1),placeholder:"Enter story points",required:!0})]}),!l&&a("div",{className:"space-y-2",children:[t(o,{htmlFor:"epic",children:"Epic"}),a(p,{value:i.epicId,onValueChange:e=>s("epicId",e),children:[t(m,{children:t(d,{placeholder:"Select an epic"})}),t(g,{children:A.map(e=>t(r,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[t("div",{className:`w-3 h-3 rounded-full ${e.color}`}),e.name]})},e.id))})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Sprint (Optional)"}),a(p,{value:i.sprintId,onValueChange:e=>s("sprintId",e),children:[t(m,{children:t(d,{placeholder:"Select a sprint"})}),a(g,{children:[t(r,{value:"none",children:"No Sprint"}),F.map(e=>t(r,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[e.name,e.isActive&&t("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},e.id))]})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Assignee"}),a(p,{value:i.assignee,onValueChange:e=>s("assignee",e),children:[t(m,{children:t(d,{placeholder:"Select an Assignee"})}),a(g,{children:[t(r,{value:"none",children:"No Assignee"}),L.map(e=>t(r,{value:e.id,children:t("div",{className:"flex items-center gap-2",children:e.name})},e.id))]})]})]}),a(I,{children:[t(b,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),t(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};export{X as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as te}from"./chunk-ZMB6R6JX.mjs";import{a as _}from"./chunk-I2ZLKSWR.mjs";import{a as Z}from"./chunk-NLFT5RPF.mjs";import{a as ee}from"./chunk-LUM6KEWN.mjs";import{a as Y}from"./chunk-ORNGKQM7.mjs";import{a as X}from"./chunk-PFDPO3UX.mjs";import{a as Q}from"./chunk-WI2RL3XQ.mjs";import{a as L}from"./chunk-CTAQQFEO.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Ye}from"next/navigation";import{jsx as a,jsxs as _e}from"react/jsx-runtime";function Ze({title:et="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:E=[],initialReminders:v=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:P=[],initialView:C="kanban",onAddTask:ie,onUpdateTask:ne,onDeleteTask:se,onTaskClick:tt,onAddEpic:ae,onUpdateEpic:oe,onDeleteEpic:de,onAddTaskToEpic:it,onAddSprint:re,onUpdateSprint:le,onDeleteSprint:ce,onAddProject:pe,onUpdateProject:ge,onDeleteProject:me,onFileAdd:ke,onFileEdit:Te,onFileDelete:ue,onFileClick:fe,onAddReminder:he,onUpdateReminder:De,onDeleteReminder:Se,onViewChange:Ee,onToggleMobileMenu:ve,onTeamClick:nt,onTeamChange:st,onCopilotClick:at}){let[p,d]=s(h),[r,g]=s(D),[c,m]=s(S),[F,k]=s(E),[Ae,T]=s(v),[U,we]=s(A),[M,Pe]=s(w),[Ce,O]=s(P),[Ue,R]=s(!1),[be,V]=s(!1),[ye,j]=s(null),[Fe,I]=s(null),[B,N]=s(null),[l,x]=s(C||"kanban"),[Me,Oe]=s(!1),G=Ye();o(()=>{d(h)},[h]),o(()=>{m(S)},[S]),o(()=>{g(D)},[D]),o(()=>{k(E)},[E]),o(()=>{O(P)},[P]),o(()=>{Pe(w)},[w]),o(()=>{we(A)},[A]),o(()=>{T(v)},[v]),o(()=>{x(C)},[C]);let Re=r.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Ve=p.filter(e=>{let t=Re.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),ot=e=>Ve.filter(t=>t.status===e),dt=e=>{let t={};return r.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},rt=e=>{N(e)},lt=e=>{B&&(d(t=>t.map(i=>i.id===B.id?{...i,status:e}:i)),N(null))},H=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),ie?.(t)},f=(e,t)=>{d(i=>i.map(n=>n.id===e?{...n,...t}:n)),ne?.(e,t)},ct=async(e,t)=>{f(e,t)},K=e=>{d(t=>t.filter(i=>i.id!==e)),ye?.id===e&&j(null),se?.(e)},pt=async e=>{K(e)},je=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),pe?.(e)},Ie=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(G.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),ge?.(e,t)},Be=e=>{k(t=>t.filter(i=>i.id!==e)),me?.(e)},W=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};g(i=>[...i,t]),ae?.({...t})},$=()=>{V(!0)},q=(e,t)=>{g(i=>i.map(n=>n.id===e?{...n,...t}:n)),oe?.(e,t)},z=e=>{g(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),de?.(e)},J=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};m(i=>[...i,t]),re?.(e)},Ne=(e,t)=>{m(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),le?.(e,t)},xe=e=>{e==="backlog"||e==="all-tasks"||(m(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ce?.(e))},b=e=>{j(e)},Ge=e=>{e==="planning"&&window.innerWidth<768||(x(e),Ee?.(e))},He=()=>{Oe(e=>!e),ve?.()},gt=()=>{G.push("/")},mt=e=>{console.log("Switching to team:",e)},kt=e=>{console.log("Switching to team:",e)},Ke=e=>{I(e),R(!0)},We=()=>{R(!1),I(null)},$e=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),he?.(e)},qe=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),De?.(e,t)},ze=e=>{T(t=>t.filter(i=>i.id!==e)),Se?.(e)},Je=()=>{ke?.()},Le=e=>{Te?.(e)},Qe=e=>{O(t=>t.filter(i=>i.name!==e)),ue?.(e)},Xe=e=>{fe?.(e)},Tt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ut=()=>{switch(l){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},y=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=y.length>3,Dt=y.slice(3);return _e(L,{projects:F,epics:r,sprints:c,currentView:l,onUpdateProject:Ie,onDeleteProject:Be,onAddProject:je,onUpdateEpic:q,onDeleteEpic:z,onAddEpic:$,onAddSprint:J,onUpdateSprint:Ne,onDeleteSprint:xe,onViewChange:Ge,mobileMenuOpen:Me,onToggleMobileMenu:He,children:[l==="kanban"&&a("div",{className:"h-full",children:a(Z,{initialProjects:F,initialEpics:r,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:M,onAddTask:H,onUpdateTask:f,onDeleteTask:K,onTaskClick:b,onAddEpic:W})}),l==="planning"&&a("div",{className:"hidden md:block h-full",children:a(ee,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:J})}),l==="tasks"&&a("div",{className:"h-full",children:a(te,{initialReminders:Ae,initialColleagues:U,onAddReminder:$e,onUpdateReminder:qe,onDeleteReminder:ze})}),l==="files"&&a("div",{className:"h-full",children:a(Q,{initialFiles:Ce,onFileAdd:Je,onFileEdit:Le,onFileDelete:Qe,onFileClick:Xe,compactView:!1})}),l==="epics"&&a("div",{className:"h-full",children:a(_,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ke,onAddEpic:$,onUpdateEpic:q,onDeleteEpic:z})}),a(X,{isOpen:Ue,onClose:We,onAddTask:H,epics:r,sprints:c,assignees:[...U,...M],defaultEpicId:Fe||void 0}),a(Y,{isOpen:be,onClose:()=>V(!1),onAddEpic:W})]})}export{Ze as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as b}from"./chunk-BHWGOTCJ.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
4
+ import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as b}from"./chunk-FGEFYI5E.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-PXLSH6S2.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
4
+ import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-ZFUP5NVF.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-PXLSH6S2.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
4
+ import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-BE5B22X7.mjs";import{a as f}from"./chunk-NVHQBM66.mjs";import{a as g}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 b=[{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 E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!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:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,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-auto",children:h})]})]})}export{E as a};
4
+ import{a}from"./chunk-BE5B22X7.mjs";import{a as f}from"./chunk-Q67RF7VO.mjs";import{a as g}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 b=[{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 E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!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:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,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-auto",children:h})]})]})}export{E as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as S}from"./chunk-XIGBDWYI.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-PXLSH6S2.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-CLGBBNRB.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
4
+ import{a as S}from"./chunk-RAGDUV7M.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-CLGBBNRB.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-PXLSH6S2.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
4
+ import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as n}from"./chunk-GHZ6CUY3.mjs";import{a as x}from"./chunk-Z22NSJMF.mjs";import{a as A}from"./chunk-BHWGOTCJ.mjs";import{a as w}from"./chunk-L5JPAKPM.mjs";import{b as v}from"./chunk-ZUA4KNIR.mjs";import{a as g,e as y}from"./chunk-YO3GQYRJ.mjs";import{useEffect as U,useState as r}from"react";import{Plus as V,Search as $,File as R,Filter as q}from"lucide-react";import{motion as z,AnimatePresence as G}from"motion/react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function M({initialFiles:c=[],onFileAdd:k,onFileEdit:S,onFileDelete:D,onFileClick:E,compactView:d=!1,className:H}){let[h,C]=r(c),[a,N]=r(""),[o,P]=r("all"),[s,B]=r("all");U(()=>{C(c)},[c]);let O=Array.from(new Set(h.map(l=>l.mimeType))),t=h.filter(l=>{let F=l.name.toLowerCase().includes(a.toLowerCase()),u=o==="all"||l.mimeType===o;return F&&u}),b=t.slice(0,10),I=t.filter(Boolean),T=()=>{k?.()},m=l=>{S?.(l)},p=l=>{console.log("deleting file",l),C(F=>F.filter(u=>u.name!==l.name)),D?.(l.id)},f=l=>{E?.(l)},L=()=>{N(""),P("all")};return e("div",{className:"px-2 md:px-4 py-4 space-y-8",children:e(G,{mode:"wait",children:e(z.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:i("div",{className:`space-y-6 ${H||""}`,children:[e(x,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:T},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),e(g,{children:e(y,{className:"pt-6",children:i("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:i("div",{className:"relative",children:[e($,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(w,{placeholder:"Search files...",value:a,onChange:l=>N(l.target.value),className:"pl-9"})]})}),(a||o!=="all")&&i(v,{variant:"outline",onClick:L,className:"gap-2",children:[e(q,{className:"h-4 w-4"}),"Clear"]})]})})}),i("div",{className:"space-y-4",children:[e(A,{activeTab:s,onTabChange:B,tabOptions:[{value:"all",label:`All Files (${t.length})`},{value:"recent",label:`Recent (${b.length})`}],maxWidth:"500px",gridCols:3}),s==="all"&&e(n,{files:t,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d}),s==="recent"&&e(n,{files:b,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d}),s==="shared"&&e(n,{files:I,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d})]}),t.length===0&&e(g,{children:e(y,{className:"pt-6",children:i("div",{className:"text-center py-8",children:[e(R,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:a||o!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),i(v,{onClick:T,className:"gap-2",children:[e(V,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}export{M as a};
4
+ import{a as n}from"./chunk-GHZ6CUY3.mjs";import{a as x}from"./chunk-Z22NSJMF.mjs";import{a as A}from"./chunk-FGEFYI5E.mjs";import{a as w}from"./chunk-L5JPAKPM.mjs";import{b as v}from"./chunk-ZUA4KNIR.mjs";import{a as g,e as y}from"./chunk-YO3GQYRJ.mjs";import{useEffect as U,useState as r}from"react";import{Plus as V,Search as $,File as R,Filter as q}from"lucide-react";import{motion as z,AnimatePresence as G}from"motion/react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function M({initialFiles:c=[],onFileAdd:k,onFileEdit:S,onFileDelete:D,onFileClick:E,compactView:d=!1,className:H}){let[h,C]=r(c),[a,N]=r(""),[o,P]=r("all"),[s,B]=r("all");U(()=>{C(c)},[c]);let O=Array.from(new Set(h.map(l=>l.mimeType))),t=h.filter(l=>{let F=l.name.toLowerCase().includes(a.toLowerCase()),u=o==="all"||l.mimeType===o;return F&&u}),b=t.slice(0,10),I=t.filter(Boolean),T=()=>{k?.()},m=l=>{S?.(l)},p=l=>{console.log("deleting file",l),C(F=>F.filter(u=>u.name!==l.name)),D?.(l.id)},f=l=>{E?.(l)},L=()=>{N(""),P("all")};return e("div",{className:"px-2 md:px-4 py-4 space-y-8",children:e(G,{mode:"wait",children:e(z.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:i("div",{className:`space-y-6 ${H||""}`,children:[e(x,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:T},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),e(g,{children:e(y,{className:"pt-6",children:i("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:i("div",{className:"relative",children:[e($,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(w,{placeholder:"Search files...",value:a,onChange:l=>N(l.target.value),className:"pl-9"})]})}),(a||o!=="all")&&i(v,{variant:"outline",onClick:L,className:"gap-2",children:[e(q,{className:"h-4 w-4"}),"Clear"]})]})})}),i("div",{className:"space-y-4",children:[e(A,{activeTab:s,onTabChange:B,tabOptions:[{value:"all",label:`All Files (${t.length})`},{value:"recent",label:`Recent (${b.length})`}],maxWidth:"500px",gridCols:3}),s==="all"&&e(n,{files:t,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d}),s==="recent"&&e(n,{files:b,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d}),s==="shared"&&e(n,{files:I,onFileClick:f,onFileEdit:m,onFileDelete:p,showHeader:!d})]}),t.length===0&&e(g,{children:e(y,{className:"pt-6",children:i("div",{className:"text-center py-8",children:[e(R,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:a||o!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),i(v,{onClick:T,className:"gap-2",children:[e(V,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}export{M as a};