UNPKG

@coji/journal-mcp

Version:

MCP server for journal entries with web viewer

3 lines (2 loc) 1.87 kB
import{o as e,t as r}from"./chunk-DQRVZFIR-BjeRaiJT.js";function d({entry:s,date:t}){return e.jsxs("div",{className:"p-4 outline rounded-md",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"text-sm font-mono text-gray-600",children:s.timestamp}),e.jsx("h4",{className:"font-medium text-gray-900",children:s.title})]}),e.jsx("div",{className:"prose prose-sm max-w-none text-gray-700 mb-3",children:s.content.split(` `).map((a,n)=>e.jsx("p",{className:"mb-1",children:a},n))}),s.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1",children:s.tags.map(a=>e.jsxs(r,{to:`/search?tags=${encodeURIComponent(a)}`,className:"text-xs px-2 py-1 bg-blue-100 text-blue-700 rounded-full hover:bg-blue-200 transition-colors",children:["#",a]},a))})]})}function i({file:s}){return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(r,{to:`/entries/${s.date}`,className:"text-lg font-semibold text-gray-900 hover:text-blue-600 transition-colors",children:s.date}),e.jsxs("div",{className:"text-sm text-gray-500",children:[s.entries_count," ",s.entries_count===1?"entry":"entries"]})]}),s.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-4",children:s.tags.map(t=>e.jsxs(r,{to:`/search?tags=${encodeURIComponent(t)}`,className:"text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded-full hover:bg-gray-200 transition-colors",children:["#",t]},t))}),e.jsx("div",{className:"space-y-4",children:s.entries.map((t,a)=>e.jsx(d,{entry:t,date:s.date},`${t.id}_${a}`))}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-100 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last updated: ",new Date(s.updated).toLocaleDateString()]})]})}export{i as E};