cortex-react-components 2.17.2 → 2.17.4

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 (163) hide show
  1. package/dist/{chunk-JCWFPKF3.mjs → chunk-2W4GQ3FI.mjs} +1 -1
  2. package/dist/{chunk-7R47MHQE.mjs → chunk-33CHGT4N.mjs} +1 -1
  3. package/dist/{chunk-CXOVEABI.mjs → chunk-3EGSOIRH.mjs} +1 -1
  4. package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
  5. package/dist/{chunk-NINFDOV5.mjs → chunk-6EKGV4I2.mjs} +1 -1
  6. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  7. package/dist/{chunk-Q4SENBJV.mjs → chunk-7AWSJZMD.mjs} +1 -1
  8. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ANCSWAD7.mjs} +1 -1
  9. package/dist/{chunk-EM3T2XYC.mjs → chunk-CCJJAUGB.mjs} +1 -1
  10. package/dist/{chunk-3GROWGZ5.mjs → chunk-CQAMS7RZ.mjs} +1 -1
  11. package/dist/{chunk-75F3LJMX.mjs → chunk-CTC6WSB6.mjs} +1 -1
  12. package/dist/{chunk-TKXBSTKU.mjs → chunk-DY2XW3LC.mjs} +1 -1
  13. package/dist/{chunk-IBUT2LYD.mjs → chunk-EUMMM454.mjs} +1 -1
  14. package/dist/{chunk-RS4VD3ML.mjs → chunk-F2MJXGRT.mjs} +1 -1
  15. package/dist/{chunk-3NRXQBBS.mjs → chunk-GO42W2BM.mjs} +1 -1
  16. package/dist/{chunk-KWYJ3XZI.mjs → chunk-H5VFV6Q4.mjs} +1 -1
  17. package/dist/{chunk-RJGYVDOU.mjs → chunk-HLTP3ZQN.mjs} +1 -1
  18. package/dist/{chunk-FE7ZGUPU.mjs → chunk-JNJJAJPI.mjs} +1 -1
  19. package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
  20. package/dist/{chunk-RQLUMNJE.mjs → chunk-L5NPH5RX.mjs} +1 -1
  21. package/dist/{chunk-Z6HIWYMX.mjs → chunk-M5QUXKCF.mjs} +1 -1
  22. package/dist/{chunk-3Y7QG6VP.mjs → chunk-MEVSHOG4.mjs} +1 -1
  23. package/dist/{chunk-2BRDNDUB.mjs → chunk-MFUZNS7C.mjs} +1 -1
  24. package/dist/{chunk-RGOKBIQ5.mjs → chunk-MGSTQLZC.mjs} +1 -1
  25. package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
  26. package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
  27. package/dist/chunk-ONNK2NEI.mjs +4 -0
  28. package/dist/{chunk-3HNU2NYP.mjs → chunk-QILFMWE5.mjs} +1 -1
  29. package/dist/{chunk-ZEALRBXW.mjs → chunk-QZIJTAPO.mjs} +1 -1
  30. package/dist/{chunk-GTZJWMZR.mjs → chunk-R33MOMFK.mjs} +1 -1
  31. package/dist/{chunk-OYE7B4PN.mjs → chunk-R5P4ZICA.mjs} +1 -1
  32. package/dist/{chunk-Z2SJVYUM.mjs → chunk-RFRNTKO7.mjs} +1 -1
  33. package/dist/{chunk-AJQHGVZ5.mjs → chunk-RMZLEIRP.mjs} +1 -1
  34. package/dist/chunk-RZELSUQT.mjs +4 -0
  35. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  36. package/dist/{chunk-GCRVTTBJ.mjs → chunk-SX456QYL.mjs} +1 -1
  37. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  38. package/dist/{chunk-723U74ZC.mjs → chunk-TNQS3NVB.mjs} +1 -1
  39. package/dist/{chunk-SH2SBOG7.mjs → chunk-UCPJ4KXN.mjs} +1 -1
  40. package/dist/{chunk-AGDKFAMN.mjs → chunk-UECG3SCG.mjs} +1 -1
  41. package/dist/{chunk-KG3MNGT6.mjs → chunk-UENQZNU3.mjs} +1 -1
  42. package/dist/{chunk-6OJBBMB5.mjs → chunk-UK7PR73C.mjs} +1 -1
  43. package/dist/{chunk-PWFVXG44.mjs → chunk-UTRR5NUU.mjs} +1 -1
  44. package/dist/{chunk-C4RWEPVF.mjs → chunk-VQBOJHZF.mjs} +1 -1
  45. package/dist/chunk-VZBIMHCR.mjs +4 -0
  46. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  47. package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
  48. package/dist/{chunk-GHOL5L32.mjs → chunk-YPSUDHCJ.mjs} +1 -1
  49. package/dist/{chunk-5MWZTJYP.mjs → chunk-YWRU7OE3.mjs} +1 -1
  50. package/dist/chunk-ZNSW443Y.mjs +4 -0
  51. package/dist/components/Blocks/Banner.mjs +1 -1
  52. package/dist/components/Blocks/CallToAction.mjs +1 -1
  53. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  54. package/dist/components/Blocks/Content.mjs +1 -1
  55. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  56. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  57. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  58. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  59. package/dist/components/Blocks/index.mjs +1 -1
  60. package/dist/components/Cards/ContentCard.mjs +1 -1
  61. package/dist/components/Cards/FeatureCard.mjs +1 -1
  62. package/dist/components/Cards/index.mjs +1 -1
  63. package/dist/components/Chat/example-usage.mjs +1 -1
  64. package/dist/components/Chat/index.mjs +1 -1
  65. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  66. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  68. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  69. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
  70. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  72. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  73. package/dist/components/DigitalColleagues/document-edit.js +1 -1
  74. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  75. package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
  76. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  77. package/dist/components/DigitalColleagues/document-preview.js +1 -1
  78. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  79. package/dist/components/DigitalColleagues/index.js +1 -1
  80. package/dist/components/DigitalColleagues/index.mjs +1 -1
  81. package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
  82. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  83. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  84. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  85. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  86. package/dist/components/Foundary/MainPage.mjs +1 -1
  87. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  88. package/dist/components/Foundary/RichText/index.mjs +1 -1
  89. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  90. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  91. package/dist/components/Foundary/Views/index.mjs +1 -1
  92. package/dist/components/Foundary/document-edit.mjs +1 -1
  93. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  94. package/dist/components/Foundary/document-preview.mjs +1 -1
  95. package/dist/components/Foundary/index.mjs +1 -1
  96. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  97. package/dist/components/HeaderFooter/Header.mjs +1 -1
  98. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  99. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  100. package/dist/components/HeaderFooter/index.mjs +1 -1
  101. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  102. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  103. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  104. package/dist/components/Heros/PostHero/index.mjs +1 -1
  105. package/dist/components/Heros/RenderHero.mjs +1 -1
  106. package/dist/components/Heros/index.mjs +1 -1
  107. package/dist/components/Holidays/CalendarView.js +1 -1
  108. package/dist/components/Holidays/CalendarView.mjs +1 -1
  109. package/dist/components/Holidays/HolidayTracker.js +1 -1
  110. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  111. package/dist/components/Holidays/index.js +1 -1
  112. package/dist/components/Holidays/index.mjs +1 -1
  113. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  114. package/dist/components/Layouts/Print.mjs +1 -1
  115. package/dist/components/Layouts/SlideShow.mjs +1 -1
  116. package/dist/components/Layouts/index.mjs +1 -1
  117. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  118. package/dist/components/Menus/SidebarRight.mjs +1 -1
  119. package/dist/components/Menus/index.mjs +1 -1
  120. package/dist/components/Payload/RichText/index.mjs +1 -1
  121. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  122. package/dist/components/Payload/index.mjs +1 -1
  123. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  124. package/dist/components/Projects/ProjectPage.mjs +1 -1
  125. package/dist/components/Projects/ProjectView.mjs +1 -1
  126. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  127. package/dist/components/Projects/index.mjs +1 -1
  128. package/dist/components/dc-temp/index.js +1 -1
  129. package/dist/components/dc-temp/index.mjs +1 -1
  130. package/dist/components/index.js +7 -7
  131. package/dist/components/index.mjs +1 -1
  132. package/dist/components/ui/index.mjs +1 -1
  133. package/dist/components/ui/sidebar.mjs +1 -1
  134. package/dist/globals.css +1 -1
  135. package/dist/index.js +7 -7
  136. package/dist/index.mjs +1 -1
  137. package/dist/metafile-cjs.json +1 -1
  138. package/dist/metafile-esm.json +1 -1
  139. package/dist/pages/Blog.mjs +1 -1
  140. package/dist/pages/Documentation.mjs +1 -1
  141. package/dist/pages/IndexPage.mjs +1 -1
  142. package/dist/pages/Intranet.mjs +1 -1
  143. package/dist/pages/LandingPage.mjs +1 -1
  144. package/dist/pages/Page.mjs +1 -1
  145. package/dist/pages/Publish.mjs +1 -1
  146. package/dist/pages/Website.mjs +1 -1
  147. package/dist/sections/AboutSection.mjs +1 -1
  148. package/dist/sections/BlogDetail.mjs +1 -1
  149. package/dist/sections/BlogList.mjs +1 -1
  150. package/dist/sections/BlogListSection.mjs +1 -1
  151. package/dist/sections/ContactSection.mjs +1 -1
  152. package/dist/sections/PageSections.mjs +1 -1
  153. package/dist/sections/PricingSection.mjs +1 -1
  154. package/dist/sections/ServiceDetail.mjs +1 -1
  155. package/dist/sections/ServiceDetailSection.mjs +1 -1
  156. package/dist/sections/ServiceSection.mjs +1 -1
  157. package/dist/sections/form/index.mjs +1 -1
  158. package/dist/sections/index.mjs +1 -1
  159. package/package.json +1 -1
  160. package/dist/chunk-AREQGH47.mjs +0 -4
  161. package/dist/chunk-RGZHZIKQ.mjs +0 -4
  162. package/dist/chunk-RHR3YOLG.mjs +0 -4
  163. package/dist/chunk-ZXPDSSCF.mjs +0 -4
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import{useState as u}from"react";import{ChevronLeft as y,ChevronRight as b}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function k({currentDate:a,setCurrentDate:d,holidays:g}){let[l,x]=u(null);console.log("holidaysIds",g.map(e=>e.id));let p=(new Date(a.getFullYear(),a.getMonth(),1).getDay()+6)%7,m=Array.from({length:42},(e,o)=>{let n=new Date(a.getFullYear(),a.getMonth(),o-p+1);return{date:n,isCurrentMonth:n.getMonth()===a.getMonth(),isToday:n.toDateString()===new Date().toDateString(),holidays:g.filter(c=>new Date(c.startDate)<=n&&new Date(c.endDate)>=n)}}),v=()=>{d(new Date(a.getFullYear(),a.getMonth()-1,1))},h=()=>{d(new Date(a.getFullYear(),a.getMonth()+1,1))},f=()=>{d(new Date)};return s("div",{className:"lg:flex lg:h-full lg:flex-col",children:[s("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[t("h1",{className:"text-base font-semibold text-foreground",children:t("time",{dateTime:a.toISOString(),children:a.toLocaleString("default",{month:"long",year:"numeric"})})}),t("div",{className:"flex items-center",children:s("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[s(r,{onClick:v,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Previous month"}),t(y,{className:"h-5 w-5","aria-hidden":"true"})]}),t(r,{variant:"outline",onClick:f,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),s(r,{onClick:h,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Next month"}),t(b,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),s("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[s("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[s("div",{className:"bg-white py-2",children:["M",t("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),s("div",{className:"bg-white py-2",children:["W",t("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),s("div",{className:"bg-white py-2",children:["F",t("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),s("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[t("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:m.map(e=>s("div",{className:i(e.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[t("time",{dateTime:e.date.toISOString(),className:i("flex h-6 w-6 items-center justify-center rounded-full",e.isToday&&"bg-indigo-600 font-semibold text-white"),children:e.date.getDate()}),e.holidays.length>0&&t("ol",{className:"mt-2 space-y-1 overflow-visible",children:e.holidays.map(o=>t("li",{className:"overflow-visible",children:t("div",{className:`text-xs px-1 py-0.5 rounded ${o.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:o.userName})},o.id))})]},e.date.toISOString()))}),t("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:m.map(e=>s("button",{type:"button",className:i(e.isCurrentMonth?"bg-white":"bg-gray-50",(e.date===l||e.isToday)&&"font-semibold",e.date===l&&"text-white",!e.date&&e.isToday&&"text-indigo-600",e.date!==l&&e.isCurrentMonth&&!e.isToday&&"text-gray-900",e.date!==l&&!e.isCurrentMonth&&!e.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[t("time",{dateTime:e.date.toISOString(),className:i("ml-auto",e.date===l&&e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",e.date===l&&!e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:e.date.getDate()}),s("span",{className:"sr-only",children:[e.holidays.length," holidays"]}),e.holidays.length>0&&t("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:e.holidays.map(o=>t("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${o.status==="approved"?"bg-green-500":"bg-gray-500"}`},o.id))})]},e.date.toISOString()))})]})]})]})}export{k as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as i}from"./chunk-AREQGH47.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{motion as D}from"motion/react";import{File as l,FileText as m,Edit3 as $,Type as C}from"lucide-react";import{useState as T}from"react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var u=t=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:t.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),c=t=>e("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:t}),K=t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[e("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),e("pre",{className:"text-sm",children:t})]}),M=t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),u(t)]});function B({document:t,onDocumentUpdate:g,editable:p=!0,renderers:x,availableDocuments:b=[],knowledgeContexts:f=[]}){let[v,d]=T(!1),N=a=>{switch(a){case"markdown":case"mdx":return e(m,{className:"h-6 w-6 text-primary"});case"richtext":return e(l,{className:"h-6 w-6 text-success"});case"text":return e(C,{className:"h-6 w-6 text-muted-foreground"});default:return e(l,{className:"h-6 w-6 text-muted-foreground"})}},h=a=>{switch(a){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},w=(a,s)=>{let R={markdown:u,mdx:M,richtext:K,text:c},o=x?.[s]||R[s];return o?o(a):c(a)},y=a=>{d(!1),g?.(a)},k=()=>{d(!1)};return v?e(i,{document:t,onSave:y,onCancel:k,availableDocuments:b,knowledgeContexts:f}):r(D.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[r("div",{className:"border-b border-border bg-card p-8",children:[r("div",{className:"flex items-start justify-between gap-4 mb-4",children:[r("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[e("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:N(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:t.title}),t.description&&e("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:t.description})]})]}),p&&e("div",{className:"flex-shrink-0",children:r(n,{variant:"outline",size:"sm",onClick:()=>d(!0),className:"gap-2",children:[e($,{className:"h-4 w-4"}),"Edit"]})})]}),r("div",{className:"flex flex-wrap gap-2",children:[e("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${h(t.format)}`,children:t.format.toUpperCase()}),t.tags?.map(a=>r("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",a]},a))]})]}),e("div",{className:"flex-1 overflow-auto",children:r("div",{className:"p-8",children:[t.metadata&&Object.keys(t.metadata).length>0&&r("div",{className:"mb-6",children:[e("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),e("div",{className:"bg-muted rounded-lg p-3 border border-border",children:e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(t.metadata).map(([a,s])=>r("div",{className:"flex gap-1",children:[r("span",{className:"text-muted-foreground font-medium",children:[a.replace(/([A-Z])/g," $1").trim(),":"]}),e("span",{className:"text-foreground truncate",children:String(s)})]},a))})})]}),e("div",{className:"space-y-4",children:t.content?e("div",{className:"relative",children:e("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:w(t.content,t.format)})}):r("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:e(m,{className:"h-8 w-8 text-muted-foreground"})}),e("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),e("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}export{B as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as H}from"./chunk-RHR3YOLG.mjs";import{a as L}from"./chunk-FT3AE7L2.mjs";import{a as I}from"./chunk-L5JPAKPM.mjs";import{motion as p}from"motion/react";import{ChevronRight as T,File as O,FileText as k,Search as F}from"lucide-react";import{useState as K,useMemo as B}from"react";import{jsx as e,jsxs as n}from"react/jsx-runtime";function $({label:f,documents:m,children:i,level:u,onDocumentClick:x,selectedDocumentId:h,showDocumentCount:w=!0}){let[c,s]=K(u===0),b=i&&Object.keys(i).length>0,v=m.length+(i?Object.values(i).reduce((t,r)=>t+r.documents.length,0):0),N=t=>{switch(t){case"markdown":case"mdx":return e(k,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return e(O,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(O,{className:"h-3.5 w-3.5 text-muted-foreground"})}},y=t=>{let r=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return r[t%r.length]};return n("div",{className:"space-y-1",children:[(b||m.length>0)&&n(p.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${u*20}px`},onClick:()=>s(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${y(u)}`}),e(p.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(T,{className:"h-4 w-4 text-muted-foreground"})}),n("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:f})}),w&&v>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:v})})]})]}),e(p.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:n("div",{className:"pt-2 space-y-1",children:[m.map((t,r)=>n(p.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:r*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${h===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${u*20+20}px`},onClick:()=>x?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:N(t.format)}),n("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${h===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),i&&Object.entries(i).map(([t,r])=>e($,{label:t,documents:r.documents,children:r.children,level:u+1,onDocumentClick:x,selectedDocumentId:h,showDocumentCount:w},t))]})})]})}function V({documents:f,menuConfig:m,onDocumentClick:i,onDocumentShare:u,onDocumentUpdate:x,selectedDocumentId:h,className:w,editable:c=!0}){let[s,b]=K(""),[v,N]=K(null),y=B(()=>s?f.filter(o=>o.title.toLowerCase().includes(s.toLowerCase())||o.description?.toLowerCase().includes(s.toLowerCase())||o.tags?.some(d=>d.toLowerCase().includes(s.toLowerCase()))||Object.values(o.metadata||{}).some(d=>String(d).toLowerCase().includes(s.toLowerCase()))):f,[f,s]),t=B(()=>{let o=(d,j)=>{if(j.length===0)return{};let[M,...S]=j;return d.reduce((a,D)=>{let P=D.metadata?.[M]||"Uncategorized",l=String(P);if(a[l]||(a[l]={documents:[],children:{}}),S.length===0)a[l].documents.push(D);else{let C=o([D],S),g=Object.keys(C)[0];g&&(a[l].children||(a[l].children={}),a[l].children[g]?a[l].children[g].documents.push(...C[g].documents):a[l].children[g]=C[g])}return a},{})};return o(y,m.groupBy)},[y,m.groupBy]),r=o=>{N(o),i?.(o)};return n("div",{className:`flex h-full ${w||""}`,children:[n("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:n("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(F,{className:"h-4 w-4 text-muted-foreground"})}),e(I,{placeholder:"Search knowledge base...",value:s,onChange:o=>b(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(L,{className:"h-[calc(100%-100px)]",children:n("div",{className:"p-4 space-y-3",children:[Object.entries(t).map(([o,d])=>e($,{label:o,documents:d.documents,children:d.children,level:0,onDocumentClick:r,selectedDocumentId:h,showDocumentCount:m.showDocumentCount},o)),Object.keys(t).length===0&&n(p.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(k,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),e("div",{className:"flex-1 bg-background",children:v?e(H,{document:v,onDocumentUpdate:x,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:n(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(k,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{V as a};