cortex-react-components 2.17.4 → 2.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MX3JKY3V.mjs → chunk-23XORW7A.mjs} +1 -1
- package/dist/{chunk-QILFMWE5.mjs → chunk-2GZQYAN3.mjs} +1 -1
- package/dist/{chunk-JNJJAJPI.mjs → chunk-4NHQXOKZ.mjs} +1 -1
- package/dist/{chunk-DY2XW3LC.mjs → chunk-57HKHEQN.mjs} +1 -1
- package/dist/{chunk-MGSTQLZC.mjs → chunk-5KS3DITB.mjs} +1 -1
- package/dist/{chunk-RMZLEIRP.mjs → chunk-66ODXUVL.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-AGWQ5S2Z.mjs} +1 -1
- package/dist/{chunk-ANCSWAD7.mjs → chunk-BDNY6OKE.mjs} +1 -1
- package/dist/{chunk-MFUZNS7C.mjs → chunk-BGADMIWV.mjs} +1 -1
- package/dist/{chunk-VQBOJHZF.mjs → chunk-BN747TQM.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-CNCT3JZV.mjs} +1 -1
- package/dist/{chunk-2W4GQ3FI.mjs → chunk-CYWA6TR2.mjs} +1 -1
- package/dist/{chunk-UCPJ4KXN.mjs → chunk-DA2BPW6D.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-ERHNVIOZ.mjs} +1 -1
- package/dist/{chunk-H5VFV6Q4.mjs → chunk-GIL2SMPM.mjs} +1 -1
- package/dist/{chunk-M5QUXKCF.mjs → chunk-I6OBIS4J.mjs} +1 -1
- package/dist/{chunk-HLTP3ZQN.mjs → chunk-JLUX7EHB.mjs} +1 -1
- package/dist/{chunk-YWRU7OE3.mjs → chunk-JT65KF7C.mjs} +1 -1
- package/dist/{chunk-CCJJAUGB.mjs → chunk-JUFFNFV6.mjs} +1 -1
- package/dist/{chunk-MEVSHOG4.mjs → chunk-KRLNPNMZ.mjs} +1 -1
- package/dist/{chunk-GO42W2BM.mjs → chunk-M74BIPBM.mjs} +1 -1
- package/dist/{chunk-33CHGT4N.mjs → chunk-NXG2Y4N4.mjs} +1 -1
- package/dist/{chunk-F2MJXGRT.mjs → chunk-PMYLKWPE.mjs} +1 -1
- package/dist/{chunk-3EGSOIRH.mjs → chunk-PRK2XFAZ.mjs} +1 -1
- package/dist/{chunk-O5P35LEY.mjs → chunk-PXLSH6S2.mjs} +1 -1
- package/dist/{chunk-R33MOMFK.mjs → chunk-PZZTGPEO.mjs} +1 -1
- package/dist/chunk-RBJOTC2X.mjs +4 -0
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-UTRR5NUU.mjs → chunk-S3P6OGB7.mjs} +1 -1
- package/dist/chunk-SK2QJG6J.mjs +4 -0
- package/dist/{chunk-YPSUDHCJ.mjs → chunk-T36QUKC6.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-QZIJTAPO.mjs → chunk-UX5OJ3WS.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-CTC6WSB6.mjs → chunk-WDZOGIT2.mjs} +1 -1
- package/dist/{chunk-7AWSJZMD.mjs → chunk-X5UJBRSB.mjs} +1 -1
- package/dist/{chunk-6EKGV4I2.mjs → chunk-Y62OBV2E.mjs} +1 -1
- package/dist/{chunk-RFRNTKO7.mjs → chunk-ZAAHG2J7.mjs} +1 -1
- package/dist/chunk-ZCBUDRT7.mjs +4 -0
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.js +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.js +2 -2
- package/dist/components/Foundary/Views/KnowledgeView.mjs +2 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.js +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.js +3 -3
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.js +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.js +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +17 -17
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/index.js +14 -14
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-SX456QYL.mjs +0 -4
- package/dist/chunk-TNQS3NVB.mjs +0 -1
- package/dist/chunk-UK7PR73C.mjs +0 -4
package/dist/chunk-UK7PR73C.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as O}from"./chunk-UCPJ4KXN.mjs";import{a as H}from"./chunk-FT3AE7L2.mjs";import{a as L}from"./chunk-L5JPAKPM.mjs";import{motion as p}from"motion/react";import{ChevronRight as F,File as B,FileText as K,Search as U}from"lucide-react";import{useState as b,useMemo as $,useEffect as A}from"react";import{jsx as e,jsxs as r}from"react/jsx-runtime";function M({label:f,documents:l,children:i,level:u,onDocumentClick:w,selectedDocumentId:h,showDocumentCount:y=!0}){let[c,s]=b(u===0),N=i&&Object.keys(i).length>0,v=l.length+(i?Object.values(i).reduce((t,n)=>t+n.documents.length,0):0),D=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(B,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(B,{className:"h-3.5 w-3.5 text-muted-foreground"})}},x=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(N||l.length>0)&&r(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 ${x(u)}`}),e(p.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(F,{className:"h-4 w-4 text-muted-foreground"})}),r("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})}),y&&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:r("div",{className:"pt-2 space-y-1",children:[l.map((t,n)=>r(p.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.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:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:D(t.format)}),r("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,n])=>e(M,{label:t,documents:n.documents,children:n.children,level:u+1,onDocumentClick:w,selectedDocumentId:h,showDocumentCount:y},t))]})})]})}function Y({documents:f,menuConfig:l,onDocumentClick:i,onDocumentShare:u,onDocumentUpdate:w,selectedDocumentId:h,className:y,editable:c=!0}){let[s,N]=b(""),[v,D]=b(null),[x,t]=b(f);A(()=>{t(f)},[f]);let n=$(()=>s?x.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()))):x,[x,s]),j=$(()=>{let o=(d,S)=>{if(S.length===0)return{};let[T,...I]=S;return d.reduce((a,C)=>{let E=C.metadata?.[T]||"Uncategorized",m=String(E);if(a[m]||(a[m]={documents:[],children:{}}),I.length===0)a[m].documents.push(C);else{let k=o([C],I),g=Object.keys(k)[0];g&&(a[m].children||(a[m].children={}),a[m].children[g]?a[m].children[g].documents.push(...k[g].documents):a[m].children[g]=k[g])}return a},{})};return o(n,l.groupBy)},[n,l.groupBy]),P=o=>{D(o),i?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(U,{className:"h-4 w-4 text-muted-foreground"})}),e(L,{placeholder:"Search knowledge base...",value:s,onChange:o=>N(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(H,{className:"h-[calc(100%-100px)]",children:r("div",{className:"p-4 space-y-3",children:[Object.entries(j).map(([o,d])=>e(M,{label:o,documents:d.documents,children:d.children,level:0,onDocumentClick:P,selectedDocumentId:h,showDocumentCount:l.showDocumentCount},o)),Object.keys(j).length===0&&r(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(O,{document:v,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(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{Y as a};
|