cortex-react-components 2.17.3 → 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-P7S6XFU4.mjs → chunk-23XORW7A.mjs} +1 -1
- package/dist/{chunk-2OOJ4ZFB.mjs → chunk-2GZQYAN3.mjs} +1 -1
- package/dist/{chunk-PNUBVBSR.mjs → chunk-4NHQXOKZ.mjs} +1 -1
- package/dist/{chunk-KUFXQZI5.mjs → chunk-57HKHEQN.mjs} +1 -1
- package/dist/{chunk-GETYSIZV.mjs → chunk-5KS3DITB.mjs} +1 -1
- package/dist/{chunk-PTZT4QJW.mjs → chunk-66ODXUVL.mjs} +1 -1
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-AGWQ5S2Z.mjs} +1 -1
- package/dist/{chunk-2GM2LPLB.mjs → chunk-BDNY6OKE.mjs} +1 -1
- package/dist/{chunk-FYQBRCQM.mjs → chunk-BGADMIWV.mjs} +1 -1
- package/dist/{chunk-HKMNAXLM.mjs → chunk-BN747TQM.mjs} +1 -1
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-CNCT3JZV.mjs} +1 -1
- package/dist/{chunk-3GROWGZ5.mjs → chunk-CQAMS7RZ.mjs} +1 -1
- package/dist/{chunk-JCWFPKF3.mjs → chunk-CYWA6TR2.mjs} +1 -1
- package/dist/{chunk-UCPJ4KXN.mjs → chunk-DA2BPW6D.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-ERHNVIOZ.mjs} +1 -1
- package/dist/{chunk-O24GFE6Q.mjs → chunk-GIL2SMPM.mjs} +1 -1
- package/dist/{chunk-GQEGZKN6.mjs → chunk-I6OBIS4J.mjs} +1 -1
- package/dist/{chunk-GAZHKHGB.mjs → chunk-JLUX7EHB.mjs} +1 -1
- package/dist/{chunk-MO4HRQEL.mjs → chunk-JT65KF7C.mjs} +1 -1
- package/dist/{chunk-R6AYIVIR.mjs → chunk-JUFFNFV6.mjs} +1 -1
- package/dist/{chunk-FEWOSBUJ.mjs → chunk-KRLNPNMZ.mjs} +1 -1
- package/dist/{chunk-RQLUMNJE.mjs → chunk-L5NPH5RX.mjs} +1 -1
- package/dist/{chunk-HDKHF3EA.mjs → chunk-M74BIPBM.mjs} +1 -1
- package/dist/{chunk-4SRUEQTP.mjs → chunk-NXG2Y4N4.mjs} +1 -1
- package/dist/chunk-ONNK2NEI.mjs +4 -0
- package/dist/{chunk-RS4VD3ML.mjs → chunk-PMYLKWPE.mjs} +1 -1
- package/dist/{chunk-7OMPPFGG.mjs → chunk-PRK2XFAZ.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
- package/dist/{chunk-P6OSMPUQ.mjs → chunk-PZZTGPEO.mjs} +1 -1
- package/dist/chunk-RBJOTC2X.mjs +4 -0
- package/dist/chunk-RZELSUQT.mjs +4 -0
- package/dist/{chunk-KVLUT4U2.mjs → chunk-S3P6OGB7.mjs} +1 -1
- package/dist/chunk-SK2QJG6J.mjs +4 -0
- package/dist/{chunk-F64CA5CH.mjs → chunk-T36QUKC6.mjs} +1 -1
- package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
- package/dist/{chunk-AGDKFAMN.mjs → chunk-UECG3SCG.mjs} +1 -1
- package/dist/{chunk-KG3MNGT6.mjs → chunk-UENQZNU3.mjs} +1 -1
- package/dist/{chunk-3ANJOET7.mjs → chunk-UX5OJ3WS.mjs} +1 -1
- package/dist/{chunk-BQQ4V4PX.mjs → chunk-WDZOGIT2.mjs} +1 -1
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/{chunk-NSWNM3O5.mjs → chunk-X5UJBRSB.mjs} +1 -1
- package/dist/{chunk-U3FYDDE2.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/chunk-ZNSW443Y.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/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/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/document-edit.js +1 -1
- package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
- package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview.js +1 -1
- package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.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/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.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/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/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/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/globals.css +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-AREQGH47.mjs +0 -4
- package/dist/chunk-RHR3YOLG.mjs +0 -4
- package/dist/chunk-SX456QYL.mjs +0 -4
- package/dist/chunk-TNQS3NVB.mjs +0 -1
- package/dist/chunk-UK7PR73C.mjs +0 -4
- package/dist/chunk-ZXPDSSCF.mjs +0 -4
package/dist/chunk-RHR3YOLG.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-SX456QYL.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as s}from"./chunk-EUMMM454.mjs";import{AutoFocusPlugin as m}from"@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin";import{LexicalComposer as u}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposer";import{ContentEditable as h}from"@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable";import{LexicalErrorBoundary as p}from"@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary";import{HistoryPlugin as x}from"@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin";import{RichTextPlugin as g}from"@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin";import{ListPlugin as f}from"@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin";import{ListItemNode as C,ListNode as b}from"@payloadcms/richtext-lexical/lexical/list";import{HeadingNode as v}from"@payloadcms/richtext-lexical/lexical/rich-text";import{OnChangePlugin as E}from"@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin";import{useEffect as L}from"react";import{useLexicalComposerContext as P}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{Fragment as y,jsx as t,jsxs as a}from"react/jsx-runtime";var R=({setValue:n,value:e,name:l,editable:o=!0})=>{let[i]=P(),r=d=>{d.read(()=>{let c=d.toJSON();n?.(()=>c)})};return L(()=>{e&&i.update(()=>{i.setEditorState(i.parseEditorState(e))})},[]),t("div",{className:"w-full px-10",children:a("div",{className:" ",children:[o&&t(s,{}),a("div",{className:"px-4 my-4 border-l border-[#222222]",children:[t(g,{contentEditable:t(h,{name:l,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:p}),o&&a(y,{children:[t(x,{}),t(m,{}),t(f,{}),t(E,{onChange:r})]})]})]})})},N=({setValue:n,value:e,name:l,editable:o=!0})=>t(u,{initialConfig:{namespace:"Lexical editor",nodes:[b,C,v],onError(r){throw console.error("Lexical error:",r),r},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:t(R,{value:e,setValue:n,name:l,editable:o})}),G=N;export{G as a};
|
package/dist/chunk-TNQS3NVB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk-3F6AUCZF.mjs";import{a as g}from"./chunk-U2OXF7PJ.mjs";import{a as p}from"./chunk-UK7PR73C.mjs";import{a as u}from"./chunk-Z22NSJMF.mjs";import{useState as m}from"react";import{Fragment as k,jsx as e,jsxs as d}from"react/jsx-runtime";function A({documents:x=[],contexts:t=[],onDocumentClick:v=n=>console.log("Document clicked:",n),onDocumentShare:w=n=>console.log("Share document:",n),onLoadDocumentContent:O,selectedDocumentId:C,onAddKnowledge:l,onAddTeamContext:a,onDocumentUpdate:K}){let[n,h]=m(t[0]),[b,i]=m(!1),[D,r]=m(!1),N=o=>{l&&l(o),i(!1)},y=o=>{a&&a(o),r(!1)},s=()=>e(u,{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:l?{label:"Create",onClick:()=>i(!0)}:void 0,secondaryAction:a?{label:"Add Context",onClick:()=>r(!0)}:void 0}),c=()=>d(k,{children:[e(g,{isOpen:D,onClose:()=>r(!1),onAddTeamContext:y}),e(f,{isOpen:b,onClose:()=>i(!1),onAddKnowledge:N,knowledgeContexts:t})]});return!t||t.length===0?d("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[e("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:e(s,{})}),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"})}),e(c,{})]}):d("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[d("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[e(s,{}),d("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:t.map(o=>d("button",{onClick:()=>h(o),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===o.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[o.icon,o.label]},o.id))})}),n.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-muted-foreground",children:n.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(p,{documents:x,menuConfig:n.menuConfig,onDocumentClick:v,onDocumentShare:w,selectedDocumentId:C,onDocumentUpdate:K})})}),e(c,{})]})}export{A as a};
|
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};
|
package/dist/chunk-ZXPDSSCF.mjs
DELETED
|
@@ -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};
|