ocean-brain 0.3.2 → 0.3.3

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 (44) hide show
  1. package/dist/mcp.js +4 -4
  2. package/package.json +1 -1
  3. package/server/client/dist/assets/Calendar-DyXzs5M3.js +25 -0
  4. package/server/client/dist/assets/Graph-C8K4PJOn.js +1 -0
  5. package/server/client/dist/assets/{Image.es-Dnn4SMzG.js → Image.es-CFTbON7k.js} +1 -1
  6. package/server/client/dist/assets/{ModalActionRow-B3vNjcDc.js → ModalActionRow-Hg6MY61u.js} +1 -1
  7. package/server/client/dist/assets/Note-BbgZvrC3.js +1 -0
  8. package/server/client/dist/assets/Reminders-jFhljND4.js +1 -0
  9. package/server/client/dist/assets/Search-X6QIR_m2.js +1 -0
  10. package/server/client/dist/assets/SurfaceCard-BV6y4bCo.js +1 -0
  11. package/server/client/dist/assets/Tag-Ba2Dw4gH.js +1 -0
  12. package/server/client/dist/assets/TagNotes-BRJv6sDI.js +1 -0
  13. package/server/client/dist/assets/{Trash.es-DLiHgjNo.js → Trash.es-CPtRLE0y.js} +1 -1
  14. package/server/client/dist/assets/{image.api-CjJgNbC0.js → image.api-Dsrx9S-G.js} +1 -1
  15. package/server/client/dist/assets/index-BglnLSet.js +205 -0
  16. package/server/client/dist/assets/index-CD2bFEqK.css +1 -0
  17. package/server/client/dist/assets/index-DpqKngJz.js +1 -0
  18. package/server/client/dist/assets/manage-image-C6Y_0M5H.js +1 -0
  19. package/server/client/dist/assets/manage-image-detail-Dv3xofpe.js +1 -0
  20. package/server/client/dist/assets/mcp-BijQkpfY.js +1 -0
  21. package/server/client/dist/assets/placeholder-MNsco0AT.js +34 -0
  22. package/server/client/dist/assets/trash-CiFJm_PK.js +1 -0
  23. package/server/client/dist/assets/useReminderMutate-yJak8FzP.js +82 -0
  24. package/server/client/dist/index.html +2 -2
  25. package/server/dist/modules/blocknote.js +99 -25
  26. package/server/dist/modules/blocknote.js.map +1 -1
  27. package/server/client/dist/assets/Calendar-DynpmB3D.js +0 -25
  28. package/server/client/dist/assets/Callout-tNHgPhLM.js +0 -1
  29. package/server/client/dist/assets/Graph-DMXLUfCv.js +0 -1
  30. package/server/client/dist/assets/Note-PDMuj62M.js +0 -1
  31. package/server/client/dist/assets/Reminders-ComtTLuN.js +0 -1
  32. package/server/client/dist/assets/Search-BJeZTbVu.js +0 -1
  33. package/server/client/dist/assets/SurfaceCard-DAcVMY4f.js +0 -1
  34. package/server/client/dist/assets/Tag-BuNCDGD5.js +0 -1
  35. package/server/client/dist/assets/TagNotes-ajFOP5pZ.js +0 -1
  36. package/server/client/dist/assets/index-CDrZmLC2.js +0 -1
  37. package/server/client/dist/assets/index-DAZMX8bQ.css +0 -1
  38. package/server/client/dist/assets/index-DqFkOWbi.js +0 -205
  39. package/server/client/dist/assets/manage-image-CVyZTDT_.js +0 -1
  40. package/server/client/dist/assets/manage-image-detail-Bp17tylS.js +0 -1
  41. package/server/client/dist/assets/mcp-BpD7VH-d.js +0 -1
  42. package/server/client/dist/assets/placeholder-DSf4QF4v.js +0 -34
  43. package/server/client/dist/assets/trash-Ceb17h_s.js +0 -1
  44. package/server/client/dist/assets/useReminderMutate-CzyOQ_VB.js +0 -82
package/dist/mcp.js CHANGED
@@ -375,10 +375,10 @@ async function startMcpServer(serverUrl, token, options = {}) {
375
375
  );
376
376
  server.tool(
377
377
  OCEAN_BRAIN_MCP_TOOLS.createNote,
378
- "Create an Ocean Brain note from markdown through the MCP write path. This is the preferred way to author new notes without sending internal BlockNote JSON.",
378
+ "Create an Ocean Brain note from markdown through the MCP write path. In MCP markdown, use explicit tags like [@project] or [#project], and use [[Note Title]] for note links.",
379
379
  {
380
380
  title: z2.string().describe("Note title"),
381
- markdown: z2.string().optional().default("").describe("Markdown body for the new note. Defaults to an empty note body."),
381
+ markdown: z2.string().optional().default("").describe("Markdown body for the new note. In MCP markdown, tags must use [@tag] or [#tag]. Defaults to an empty note body."),
382
382
  layout: noteLayoutSchema.optional().describe("Optional note layout: narrow, wide, or full. Prefer wide for most notes unless the user explicitly wants narrow or full.")
383
383
  },
384
384
  async ({ title, markdown, layout }) => {
@@ -398,11 +398,11 @@ async function startMcpServer(serverUrl, token, options = {}) {
398
398
  );
399
399
  server.tool(
400
400
  OCEAN_BRAIN_MCP_TOOLS.updateNote,
401
- "Update an Ocean Brain note from markdown through the MCP write path. Pass only the fields you want to change.",
401
+ "Update an Ocean Brain note from markdown through the MCP write path. In MCP markdown, use explicit tags like [@project] or [#project], and use [[Note Title]] for note links.",
402
402
  {
403
403
  id: z2.string().describe("Note ID to update"),
404
404
  title: z2.string().optional().describe("New note title"),
405
- markdown: z2.string().optional().describe("Replacement markdown body"),
405
+ markdown: z2.string().optional().describe("Replacement markdown body. In MCP markdown, tags must use [@tag] or [#tag]."),
406
406
  layout: noteLayoutSchema.optional().describe("Optional note layout: narrow, wide, or full. Prefer wide for most notes unless the user explicitly wants narrow or full.")
407
407
  },
408
408
  async ({ id, title, markdown, layout }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocean-brain",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,25 @@
1
+ import{j as e}from"./note-vendor-BofYbzmZ.js";import{p as ae,T as b,L as se,N as re,c as Y,d as f,s as ne,a as oe,M as R,b as ie,S as le,e as U,B as Z,f as ce,g as de,u as P,q,h as Q,P as me,i as ue,j as he,C as ge}from"./index-BglnLSet.js";import{a as n}from"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const pe=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),B=n.forwardRef((a,t)=>n.createElement(ae,{ref:t,...a,weights:pe}));B.displayName="InfoIcon";const xe=B,ye=({children:a,className:t=""})=>e.jsxs("div",{className:`flex items-start gap-2.5 rounded-[12px] border border-border-subtle bg-hover-subtle/50 px-4 py-3 ${t}`,children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary"}),e.jsx(b,{as:"div",variant:"meta",weight:"medium",tone:"secondary",children:a})]}),fe=({day:a,cellClassName:t,dayNumberClassName:s,isCurrentMonth:l,items:i,overflowCount:c,onOpenOverflow:u})=>e.jsxs("div",{className:`min-h-[196px] rounded-[16px] border p-2.5 ${t}`.trim(),children:[e.jsx("div",{className:"mb-2.5 flex justify-end",children:e.jsx(b,{as:"span",variant:"label",className:`flex h-7 w-7 items-center justify-center rounded-[10px] ${s}`.trim(),children:a})}),l&&i.length>0?e.jsxs("div",{className:"flex flex-col gap-1.5",children:[i,c>0?e.jsxs("button",{type:"button",onClick:u,className:"focus-ring-soft w-full rounded-[10px] border border-dashed border-border-subtle/70 bg-subtle/70 py-1 text-center text-micro font-semibold text-fg-tertiary outline-none transition-colors hover:border-border-secondary/70 hover:bg-hover-subtle hover:text-fg-secondary",children:["+",c," more"]}):null]}):null]}),K=({params:a,toneClassName:t="",header:s,title:l,meta:i,titleClassName:c=""})=>e.jsx(se,{to:re,params:a,className:"focus-ring-soft group block rounded-[8px] outline-none",children:e.jsxs("div",{className:Y("flex items-start gap-1.5 rounded-[8px] px-1.5 py-1 transition-colors group-hover:bg-hover-subtle",t),children:[s?e.jsx("span",{className:"mt-[2px] flex h-4 w-4 shrink-0 items-center justify-center text-fg-tertiary",children:s}):e.jsx("span",{"aria-hidden":"true",className:"mt-[6px] h-1.5 w-1.5 shrink-0 rounded-full bg-fg-placeholder"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(b,{as:"div",variant:"label",weight:"medium",tone:"secondary",className:Y("line-clamp-1",c),children:l}),i?e.jsx(b,{as:"div",variant:"micro",weight:"medium",tone:"tertiary",className:"mt-0.5",children:i}):null]})]})}),be=({note:a,type:t})=>e.jsx(K,{params:{id:a.id},header:e.jsx(ne,{size:12}),title:a.title,meta:f(Number(t==="create"?a.createdAt:a.updatedAt)).format("HH:mm")}),je=({reminder:a})=>e.jsx(K,{params:{id:String(a.note?.id??a.noteId)},header:e.jsx(oe,{size:12}),title:a.content||a.note?.title||"No title",titleClassName:a.completed?"line-through":"",meta:f(Number(a.reminderDate)).format("HH:mm")}),T=3,H=(a,t)=>a.map(s=>s.type==="note"?e.jsx(be,{note:s.item,type:t},`note-${s.item.id}`):e.jsx(je,{reminder:s.item},`reminder-${s.item.id}`)),ve=({year:a,month:t,day:s,isCurrentMonth:l,isSunday:i,isToday:c,isPast:u,notes:h,reminders:g,type:v})=>{const[M,N]=n.useState(!1),x=n.useMemo(()=>{const r=h.map(m=>({type:"note",item:m})),d=g.map(m=>({type:"reminder",item:m}));return u?[...r,...d]:[...d,...r]},[u,h,g]),D=x.length>T,C=n.useMemo(()=>H(x.slice(0,T),v),[x,v]),S=n.useMemo(()=>H(x,v),[x,v]),A=n.useCallback(()=>N(!0),[]),w=n.useCallback(()=>N(!1),[]),$=()=>l?c?"border-border-secondary/70 bg-[color:color-mix(in_srgb,var(--surface)_88%,var(--accent-soft-primary)_12%)]":"bg-surface border-border-subtle":"bg-muted/18 border-border-subtle/70",k=()=>c?"bg-cta text-fg-on-filled font-semibold":l?i?"text-fg-weekend font-bold":"text-fg-secondary font-bold":"text-fg-disabled opacity-55";return e.jsxs(e.Fragment,{children:[e.jsx(fe,{day:s,cellClassName:$(),dayNumberClassName:k(),isCurrentMonth:l,items:C,overflowCount:D?x.length-T:0,onOpenOverflow:A}),D&&e.jsxs(R,{isOpen:M,onClose:w,children:[e.jsx(R.Header,{title:`${a}/${String(t).padStart(2,"0")}/${String(s).padStart(2,"0")}`,onClose:w}),e.jsxs(R.Body,{children:[e.jsxs(R.Description,{className:"sr-only",children:["View all notes and reminders scheduled for day ",s,"."]}),e.jsx("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto",children:S})]})]})]})},Ne=n.memo(ve),Me=["January","February","March","April","May","June","July","August","September","October","November","December"],De=({month:a,year:t,type:s,onPrevMonth:l,onNextMonth:i,onToday:c,onTypeChange:u})=>e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-end gap-x-2.5 gap-y-1",children:[e.jsx(b,{as:"h1",variant:"display",weight:"bold",tracking:"tighter",className:"text-2xl leading-none sm:text-[2.15rem]",children:Me[a-1]}),e.jsx(b,{as:"span",variant:"subheading",weight:"medium",tone:"secondary",tracking:"tight",className:"pb-0.5",children:t})]}),e.jsx(b,{as:"p",variant:"meta",weight:"medium",tone:"secondary",children:"Track note activity and reminders across the month"})]}),e.jsx("div",{className:"flex lg:justify-end",children:e.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ie,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),e.jsx(b,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Note date"}),e.jsxs(le,{value:s,onValueChange:g=>u(g),variant:"ghost",size:"sm",children:[e.jsx(U,{value:"create",children:"Created"}),e.jsx(U,{value:"update",children:"Updated"})]})]}),e.jsx("div",{className:"h-5 w-px bg-divider"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Z,{variant:"ghost",size:"sm",onClick:c,children:"Today"}),e.jsx(Z,{variant:"ghost",size:"icon-sm",onClick:l,children:e.jsx(ce,{width:18,height:18})}),e.jsx(Z,{variant:"ghost",size:"icon-sm",onClick:i,children:e.jsx(de,{width:18,height:18})})]})]})})]}),we=`
2
+ query NotesInDateRange($dateRange: DateRangeInput) {
3
+ notesInDateRange(dateRange: $dateRange) {
4
+ id
5
+ title
6
+ createdAt
7
+ updatedAt
8
+ }
9
+ }
10
+ `,Ee=`
11
+ query RemindersInDateRange($dateRange: DateRangeInput) {
12
+ remindersInDateRange(dateRange: $dateRange) {
13
+ id
14
+ noteId
15
+ reminderDate
16
+ completed
17
+ priority
18
+ content
19
+ note {
20
+ id
21
+ title
22
+ }
23
+ }
24
+ }
25
+ `,Re=async a=>{const t=await Q(we,{dateRange:a});if(t.type==="error")throw t;return t.notesInDateRange},Ce=async a=>{const t=await Q(Ee,{dateRange:a});if(t.type==="error")throw t;return t.remindersInDateRange},Se=({year:a,month:t})=>{const s=`${a}-${String(t).padStart(2,"0")}-01`,l=t===12?1:t+1,c=`${t===12?a+1:a}-${String(l).padStart(2,"0")}-01`,u={start:s,end:c},h=P({queryKey:q.calendar.notesInDateRange(a,t),queryFn:()=>Re(u)}),g=P({queryKey:q.reminders.inDateRange(a,t),queryFn:()=>Ce(u)});return{notes:h.data??[],reminders:g.data??[],isLoading:h.isLoading||g.isLoading,isError:h.isError||g.isError}},Ae=["SUN","MON","TUE","WED","THU","FRI","SAT"],$e=[],ke=[],z=he(ge);function Le(){const a=z.useNavigate(),{year:t,month:s,type:l}=z.useSearch(),i=n.useRef(null),c=n.useRef(!1),u=n.useRef(0),h=n.useRef(0),g=n.useCallback(r=>{c.current=!0,u.current=r.pageX-(i.current?.offsetLeft??0),h.current=i.current?.scrollLeft??0,i.current&&(i.current.style.cursor="grabbing",i.current.style.userSelect="none")},[]),v=n.useCallback(r=>{if(!c.current||!i.current)return;r.preventDefault();const m=(r.pageX-i.current.offsetLeft-u.current)*1.2;i.current.scrollLeft=h.current-m},[]),M=n.useCallback(()=>{c.current=!1,i.current&&(i.current.style.cursor="grab",i.current.style.userSelect="")},[]),{notes:N,reminders:x,isLoading:D,isError:C}=Se({year:t,month:s}),S=n.useMemo(()=>{const r=f(),d=`${r.year()}-${r.month()+1}-${r.date()}`,m=new Map;for(const o of N){const y=l==="create"?f(Number(o.createdAt)):f(Number(o.updatedAt)),p=`${y.year()}-${y.month()+1}-${y.date()}`,j=m.get(p)||[];j.push(o),m.set(p,j)}const I=new Map;for(const o of x){const y=f(Number(o.reminderDate)),p=`${y.year()}-${y.month()+1}-${y.date()}`,j=I.get(p)||[];j.push(o),I.set(p,j)}const W=new Date(t,s-1,1),X=new Date(t,s,0),O=W.getDay(),L=X.getDate(),E=[],F=s===1?12:s-1,_=s===1?t-1:t,J=new Date(_,F,0).getDate();for(let o=O-1;o>=0;o--)E.push({day:J-o,isCurrentMonth:!1,year:_,month:F});for(let o=1;o<=L;o++)E.push({day:o,isCurrentMonth:!0,year:t,month:s});const V=(O+L)%7,G=V===0?0:7-V,ee=s===12?1:s+1,te=s===12?t+1:t;for(let o=1;o<=G;o++)E.push({day:o,isCurrentMonth:!1,year:te,month:ee});return E.map((o,y)=>{const p=`${o.year}-${o.month}-${o.day}`,j=f(`${o.year}-${String(o.month).padStart(2,"0")}-${String(o.day).padStart(2,"0")}`);return{key:p,year:o.year,month:o.month,day:o.day,isCurrentMonth:o.isCurrentMonth,isSunday:y%7===0,isToday:p===d,isPast:j.isBefore(r,"day"),notes:m.get(p)||$e,reminders:I.get(p)||ke}})},[t,s,N,x,l]),A=()=>{const r=s===1?12:s-1,d=s===1?t-1:t;a({search:m=>({...m,month:r,year:d})})},w=()=>{const r=s===12?1:s+1,d=s===12?t+1:t;a({search:m=>({...m,month:r,year:d})})},$=()=>{a({search:r=>({...r,month:f().month()+1,year:f().year()})})},k=r=>{r&&a({search:d=>({...d,type:r})})};return e.jsx(me,{title:"Calendar",variant:"none",children:C?e.jsx(ye,{children:"Failed to load calendar data. Please try again later."}):e.jsxs("div",{className:"surface-base",children:[e.jsx("div",{className:"border-b border-border-subtle/80 px-4 py-4 sm:px-5",children:e.jsx(De,{month:s,year:t,type:l,onPrevMonth:A,onNextMonth:w,onToday:$,onTypeChange:k})}),e.jsx("div",{ref:i,className:"cursor-grab overflow-x-auto px-4 pb-4 pt-3 sm:px-5",onMouseDown:g,onMouseMove:v,onMouseUp:M,onMouseLeave:M,children:e.jsxs("div",{className:"min-w-[1260px]",children:[e.jsx("div",{className:"mb-2.5 grid grid-cols-7 gap-1.5",children:Ae.map((r,d)=>e.jsx(b,{as:"div",variant:"label",weight:"semibold",tracking:"wider",transform:"uppercase",className:`py-2 text-center ${d===0?"text-fg-weekend":"text-fg-tertiary"}`,children:r},r))}),D?e.jsx("div",{className:"grid grid-cols-7 gap-1.5",children:Array.from({length:35}).map((r,d)=>e.jsx(ue,{height:180},d))}):e.jsx("div",{className:"grid grid-cols-7 gap-1.5",children:S.map(r=>e.jsx(Ne,{year:r.year,month:r.month,day:r.day,isCurrentMonth:r.isCurrentMonth,isSunday:r.isSunday,isToday:r.isToday,isPast:r.isPast,notes:r.notes,reminders:r.reminders,type:l},r.key))})]})})]})})}export{Le as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./note-vendor-BofYbzmZ.js";import{a as i,F as _}from"./graph-vendor-CUxe67Lr.js";import{Q as U,P as C,n as Y,i as G,o as J,r as X,t as ee,v as ne,q as te,N as re,E as oe,T as N,w as se}from"./index-BglnLSet.js";import"./note-core-BCgMq5QA.js";const ae=s=>{let a=0;for(let r=0;r<s.length;r++)a+=s.charCodeAt(r);return a},ie={background:"#f4f6f8",nodeHub:"#2c2f36",nodeSelected:"#111318",nodeConnected:"#636b76",nodeDefault:["#d6dbe1","#c8ced6","#b7bec7","#a7afb9"],nodeDimmed:["rgba(214,219,225,0.28)","rgba(200,206,214,0.24)","rgba(183,190,199,0.24)","rgba(167,175,185,0.2)"],nodeHubDimmed:"rgba(44,47,54,0.16)",nodeStroke:"#eef1f4",nodeSelectedStroke:"#a6b0bc",labelBackground:"rgba(246,248,250,0.92)",labelText:"#222831",labelFontFamily:"Pretendard Variable, Pretendard, system-ui, sans-serif",linkIdle:"rgba(99, 107, 117, 0.34)",linkConnected:"#68717c",linkDimmed:"rgba(127, 136, 146, 0.12)",legendHub:"#2c2f36"},le={background:"#121316",nodeHub:"#d6dce3",nodeSelected:"#eef1f5",nodeConnected:"#9099a4",nodeDefault:["#343a43","#2d333c","#262c35","#20262f"],nodeDimmed:["rgba(52,58,67,0.28)","rgba(45,51,60,0.24)","rgba(38,44,53,0.22)","rgba(32,38,47,0.2)"],nodeHubDimmed:"rgba(214,220,227,0.16)",nodeStroke:"#171c23",nodeSelectedStroke:"#7f8a97",labelBackground:"rgba(16,18,22,0.9)",labelText:"#eef2f6",labelFontFamily:"Pretendard Variable, Pretendard, system-ui, sans-serif",linkIdle:"rgba(118, 127, 138, 0.42)",linkConnected:"#a2abb6",linkDimmed:"rgba(118, 127, 138, 0.1)",legendHub:"#d6dce3"};function D(s){return s==="dark"?le:ie}function de(s,a){const r=D(s),{connections:g,colorIndex:y,selectedNodeId:d,nodeId:b,isConnected:c}=a,h=d===b;return d!==null&&!h&&!c?g>3?r.nodeHubDimmed:r.nodeDimmed[y%r.nodeDimmed.length]:h?r.nodeSelected:c?r.nodeConnected:g>3?r.nodeHub:r.nodeDefault[y%r.nodeDefault.length]}function ce(s,a){const r=D(s);return a.selectedNodeId!==null&&!a.isConnected?r.linkDimmed:a.isConnected?r.linkConnected:r.linkIdle}function ue(s,a){const r=D(s);return`${a.emphasize?"700":"400"} ${a.fontSize}px ${r.labelFontFamily}`}function z(s){return s<=1?3.5:s<=3?4.5:s<=6?5.5:Math.min(7,5.5+Math.sqrt(s)*.5)}const fe=t.jsx(C,{title:"Knowledge Graph",description:t.jsx(G,{width:184,height:16,className:"rounded-full"}),children:t.jsx("div",{className:"flex h-[600px] items-center justify-center",children:t.jsx(G,{width:"100%",height:"100%"})})});function he(){const s=J(),a=i.useRef(null),r=i.useRef(null),[g,y]=i.useState({width:800,height:600}),[d,b]=i.useState(null),{theme:c}=X(e=>e),h=D(c),v=i.useRef(h);v.current=h;const{data:w}=ee({queryKey:te.notes.graph(),queryFn:async()=>{const e=await ne();if(e.type==="error")throw e;return e.noteGraph}}),l=i.useMemo(()=>{if(w.nodes.length===0)return null;const e=w.nodes.filter(o=>o.connections>0);if(e.length===0)return null;const n=new Set(e.map(o=>o.id));return{nodes:e,links:w.links.filter(o=>n.has(o.source)&&n.has(o.target))}},[w]);i.useEffect(()=>{if(!l)return;const e=()=>{if(!a.current)return;const n=a.current.getBoundingClientRect();y({width:n.width,height:Math.max(600,window.innerHeight-150)})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[l]),i.useEffect(()=>{if(!l||!r.current)return;const e=window.setTimeout(()=>{r.current?.zoomToFit(400,50)},500);return()=>window.clearTimeout(e)},[l]);const R=i.useRef(d);R.current=d;const B=i.useCallback(e=>{if(R.current===e.id){s({to:re,params:{id:e.id}});return}b(e.id)},[s]),L=i.useCallback(()=>{b(null)},[]),K=i.useCallback(e=>{a.current&&(a.current.style.cursor=e?"pointer":"default")},[]),I=i.useRef(!1),q=i.useCallback(()=>{I.current||(I.current=!0,r.current?.enableZoomInteraction(!1))},[]),A=i.useCallback(()=>{I.current=!1,r.current?.enableZoomInteraction(!0)},[]),E=i.useRef(new Map),O=i.useMemo(()=>{const e=new Map;if(l)for(const n of l.links)e.has(n.source)||e.set(n.source,new Set),e.has(n.target)||e.set(n.target,new Set),e.get(n.source)?.add(n.target),e.get(n.target)?.add(n.source);return e},[l]);E.current=O;const Z=i.useCallback((e,n,o)=>{const u=v.current,f=d,p=E.current,m=z(e.connections),x=e.x||0,S=e.y||0,k=f===e.id,T=f?p.get(f)?.has(e.id)??!1:!1,Q=f!==null&&!k&&!T,V=ae(e.id);if(n.beginPath(),n.arc(x,S,m,0,Math.PI*2),n.fillStyle=de(c,{connections:e.connections,colorIndex:V,selectedNodeId:f,nodeId:e.id,isConnected:T}),n.fill(),Q)return;n.strokeStyle=u.nodeStroke,n.lineWidth=(k?2:1)/o,n.stroke(),k&&(n.beginPath(),n.arc(x,S,m+2/o,0,Math.PI*2),n.strokeStyle=u.nodeSelectedStroke,n.lineWidth=1.5/o,n.stroke());const W=T&&e.connections>=4;if(k||W||o>2.5){const H=e.title||"Untitled",P=Math.max(10/o,2.5);n.font=ue(c,{fontSize:P,emphasize:k}),n.textAlign="center",n.textBaseline="top";const M=n.measureText(H).width,j=2/o,F=S+m+3/o;n.fillStyle=u.labelBackground,n.fillRect(x-M/2-j,F,M+j*2,P+j*2),n.fillStyle=u.labelText,n.fillText(H,x,F+j)}},[d,c]),$=i.useCallback((e,n,o)=>{const u=d,f=e.source,p=e.target,m=u?f.id===u||p.id===u:!1;n.beginPath(),n.moveTo(f.x||0,f.y||0),n.lineTo(p.x||0,p.y||0),n.strokeStyle=ce(c,{selectedNodeId:u,isConnected:m}),n.lineWidth=m?2/o:.5/o,n.stroke()},[d,c]);return l?t.jsx(C,{title:"Knowledge Graph",description:`${l.nodes.length} linked notes, ${l.links.length} connections`,children:t.jsxs("div",{ref:a,className:"surface-base graph-canvas relative overflow-hidden",style:{"--graph-bg":h.background},children:[d&&(()=>{const e=l.nodes.find(n=>n.id===d);return e?t.jsxs("div",{className:"surface-floating absolute top-3 left-3 z-10 flex items-center gap-2 px-3 py-2",children:[t.jsx(N,{as:"span",variant:"meta",weight:"semibold",truncate:!0,className:"max-w-48",children:e.title}),t.jsxs(N,{as:"span",variant:"label",tone:"tertiary",children:[e.connections," links"]}),t.jsx("button",{type:"button",onClick:()=>b(null),className:"focus-ring-soft ml-1 flex h-6 w-6 cursor-pointer items-center justify-center rounded-[8px] text-fg-tertiary transition-colors hover:bg-hover-subtle hover:text-fg-default","aria-label":"Deselect node",children:t.jsx(se,{className:"h-3.5 w-3.5"})})]}):null})(),t.jsxs("div",{className:"surface-floating absolute top-3 right-3 z-10 flex flex-col gap-1.5 px-3 py-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"legend-dot h-2.5 w-2.5 shrink-0 rounded-full",style:{"--legend-color":h.legendHub}}),t.jsx(N,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Hub notes (4+ connections)"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"legend-dot h-2.5 w-2.5 shrink-0 rounded-full",style:{"--legend-color":h.nodeConnected}}),t.jsx(N,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Connected notes"})]})]}),t.jsx(_,{ref:r,graphData:l,width:g.width,height:g.height,nodeId:"id",nodeLabel:"",nodeCanvasObject:Z,nodePointerAreaPaint:(e,n,o)=>{o.beginPath(),o.arc(e.x||0,e.y||0,Math.max(z(e.connections)+4,10),0,2*Math.PI),o.fillStyle=n,o.fill()},linkCanvasObject:$,linkCanvasObjectMode:()=>"replace",linkDirectionalParticles:0,onNodeClick:B,onNodeHover:K,onBackgroundClick:L,onNodeDrag:q,onNodeDragEnd:A,warmupTicks:30,cooldownTicks:80,d3AlphaDecay:.05,d3VelocityDecay:.3,enableZoomInteraction:!0,enablePanInteraction:!0,minZoom:.3,maxZoom:5})]})}):t.jsx(C,{title:"Knowledge Graph",description:"0 linked notes, 0 connections",children:t.jsx(oe,{title:"No constellations yet",description:"Link your notes together and watch your own starry sky unfold"})})}function ke(){return t.jsx(U,{fallback:fe,errorTitle:"Failed to load graph",errorDescription:"Retry loading your linked note constellation",renderError:({error:s,retry:a})=>t.jsx(C,{title:"Knowledge Graph",children:t.jsx(Y,{title:"Failed to load graph",description:"Retry loading your linked note constellation",error:s,onRetry:a})}),children:t.jsx(he,{})})}export{ke as default};
@@ -1 +1 @@
1
- import{a}from"./graph-vendor-CUxe67Lr.js";import{p as m}from"./index-DqFkOWbi.js";const n=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),e=a.forwardRef((l,t)=>a.createElement(m,{ref:t,...l,weights:n}));e.displayName="ImageIcon";const Z=e;export{Z as I};
1
+ import{a}from"./graph-vendor-CUxe67Lr.js";import{p as m}from"./index-BglnLSet.js";const n=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),e=a.forwardRef((l,t)=>a.createElement(m,{ref:t,...l,weights:n}));e.displayName="ImageIcon";const Z=e;export{Z as I};
@@ -1 +1 @@
1
- import{a as e}from"./graph-vendor-CUxe67Lr.js";import{p as n}from"./index-DqFkOWbi.js";import{j as r}from"./note-vendor-BofYbzmZ.js";const m=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),t=e.forwardRef((a,l)=>e.createElement(n,{ref:l,...a,weights:m}));t.displayName="PlusIcon";const s=t;function p({children:a}){return r.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:a})}export{p as M,s as n};
1
+ import{a as e}from"./graph-vendor-CUxe67Lr.js";import{p as n}from"./index-BglnLSet.js";import{j as r}from"./note-vendor-BofYbzmZ.js";const m=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),t=e.forwardRef((a,l)=>e.createElement(n,{ref:l,...a,weights:m}));t.displayName="PlusIcon";const s=t;function p({children:a}){return r.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:a})}export{p as M,s as n};
@@ -0,0 +1 @@
1
+ import{j as e,U as G,y as me,v as ue,i as P,k as he,X as pe,F as xe}from"./note-vendor-BofYbzmZ.js";import{p as W,T as u,c as R,t as J,I as fe,q as C,M as j,B as k,J as X,K as ge,u as ye,O as be,U as ve,V as je,d as w,W as ee,L as Y,N as z,G as Ne,X as te,Y as we,z as Me,Z as Ce,r as Ae,_ as Z,$ as Re,a0 as Se,a1 as ke,a2 as F,g as Ee,a3 as Te,k as He,D as ae,m as se,Q as O,P as U,n as $,j as Le,i as H,a4 as Ve,a5 as De,a6 as Ze,a7 as Fe,a8 as Ie,a9 as _}from"./index-BglnLSet.js";import{a}from"./graph-vendor-CUxe67Lr.js";import{u as Oe}from"./image.api-Dsrx9S-G.js";import{V as $e,a2 as Pe,a3 as Ye,A as ze}from"./note-core-BCgMq5QA.js";import{M as ne,n as Ue}from"./ModalActionRow-Hg6MY61u.js";import{u as Be,R as qe}from"./useReminderMutate-yJak8FzP.js";const _e=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),a.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),Qe=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M209.94,113.94l-96,96a48,48,0,0,1-67.88-67.88l96-96a48,48,0,0,1,67.88,67.88Z",opacity:"0.2"}),a.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM144.56,173.66l-21.45,21.45a44,44,0,0,1-62.22-62.22l21.45-21.46a8,8,0,0,1,11.32,11.31L72.2,144.2a28,28,0,0,0,39.6,39.6l21.45-21.46a8,8,0,0,1,11.31,11.32Zm-34.9-16a8,8,0,0,1-11.32-11.32l48-48a8,8,0,0,1,11.32,11.32Zm85.45-34.55-21.45,21.45a8,8,0,0,1-11.32-11.31L183.8,111.8a28,28,0,0,0-39.6-39.6L122.74,93.66a8,8,0,0,1-11.31-11.32l21.46-21.45a44,44,0,0,1,62.22,62.22Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M164.25,91.75a6,6,0,0,1,0,8.49l-64,64a6,6,0,0,1-8.49-8.48l64-64A6,6,0,0,1,164.25,91.75ZM214.2,41.8a54.07,54.07,0,0,0-76.38,0L107.75,71.85a6,6,0,0,0,8.49,8.49l30.07-30.06a42,42,0,0,1,59.41,59.41l-30.08,30.07a6,6,0,1,0,8.49,8.49l30.07-30.07A54,54,0,0,0,214.2,41.8ZM139.76,175.64l-30.07,30.08a42,42,0,0,1-59.41-59.41l30.06-30.07a6,6,0,0,0-8.49-8.49l-30,30.07a54,54,0,0,0,76.38,76.39l30.07-30.08a6,6,0,0,0-8.49-8.49Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M162.84,93.16a4,4,0,0,1,0,5.66l-64,64a4,4,0,0,1-5.66-5.66l64-64A4,4,0,0,1,162.84,93.16Zm49.95-49.95a52.07,52.07,0,0,0-73.56,0L109.17,73.27a4,4,0,0,0,5.65,5.66l30.07-30.06a44,44,0,0,1,62.24,62.24l-30.07,30.06a4,4,0,0,0,5.66,5.66l30.07-30.06A52.07,52.07,0,0,0,212.79,43.21ZM141.17,177.06l-30.06,30.07a44,44,0,0,1-62.24-62.24l30.06-30.06a4,4,0,0,0-5.66-5.66L43.21,139.23a52,52,0,0,0,73.56,73.56l30.06-30.07a4,4,0,1,0-5.66-5.66Z"}))]]),re=a.forwardRef((t,n)=>a.createElement(W,{ref:n,...t,weights:_e}));re.displayName="FileIcon";const Ke=re,le=a.forwardRef((t,n)=>a.createElement(W,{ref:n,...t,weights:Qe}));le.displayName="LinkSimpleIcon";const Ge=le;function B({icon:t,title:n,className:r}){return e.jsxs("div",{className:R("flex items-center gap-2",r),children:[e.jsx("div",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center text-current",children:t}),e.jsx(u,{as:"span",variant:"label",weight:"semibold",className:"text-current",children:n})]})}function We({title:t,description:n,selected:r=!1,onClick:l,children:o}){return e.jsxs("button",{type:"button","aria-pressed":r,className:`focus-ring-soft flex w-full items-start justify-between gap-3 p-3 text-left transition-colors sm:p-4 ${r?"surface-floating bg-elevated":"rounded-[14px] border border-border-subtle bg-transparent hover:border-border-secondary hover:bg-hover-subtle"}`,onClick:l,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(u,{as:"div",variant:"body",weight:"semibold",tone:r?"default":"secondary",children:t}),e.jsx(u,{as:"div",variant:"meta",weight:"medium",tone:r?"secondary":"tertiary",className:"mt-1",children:n})]}),o?e.jsx("div",{className:"shrink-0",children:o}):null]})}const Je=t=>{const{data:n}=J({queryKey:C.notes.backReferences(t.noteId),async queryFn(){const r=await fe(t.noteId);if(r.type==="error")throw r;return r.backReferences}});return t.render(n)},Xe=[{value:"narrow",label:"Narrow",description:"Optimized for reading long-form content"},{value:"wide",label:"Wide",description:"Balanced width suitable for most content"},{value:"full",label:"Full Width",description:"Maximize screen space utilization"}];function et({isOpen:t,onClose:n,onSave:r,currentLayout:l="wide"}){const[o,i]=a.useState(l);a.useEffect(()=>{t&&i(l)},[t,l]);const s=()=>{r(o),n()};return e.jsxs(j,{isOpen:t,onClose:n,children:[e.jsx(j.Header,{title:"Layout Settings",onClose:n}),e.jsx(j.Body,{children:e.jsx("div",{className:"flex flex-col gap-3 sm:gap-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(u,{as:"div",variant:"body",weight:"semibold",tone:"secondary",children:"Note layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:Xe.map(c=>e.jsx(We,{title:c.label,description:c.description,selected:o===c.value,onClick:()=>i(c.value)},c.value))})]})})}),e.jsx(j.Footer,{children:e.jsxs(ne,{children:[e.jsx(k,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),e.jsx(k,{variant:"primary",size:"sm",onClick:s,children:"Apply"})]})})]})}const tt=(t,n)=>t||(n==="mobile"?"Mobile browser":n==="mcp"?"MCP":"Web browser");function at({isOpen:t,noteId:n,onClose:r,onRestored:l}){const o=X(),i=ge(),s=ye({queryKey:C.notes.snapshots(n),queryFn:async()=>{const m=await be(n);if(m.type==="error")throw m;return m.noteSnapshots},enabled:t}),c=ve({mutationFn:je,onSuccess:async m=>{if(m.type==="error"){o(m.errors[0].message);return}await Promise.all([i.invalidateQueries({queryKey:C.notes.detail(n),exact:!0}),i.invalidateQueries({queryKey:C.notes.listAll(),exact:!1}),i.invalidateQueries({queryKey:C.notes.tagListAll(),exact:!1}),i.invalidateQueries({queryKey:C.notes.pinned(),exact:!0}),i.invalidateQueries({queryKey:C.notes.backReferences(n),exact:!0}),i.invalidateQueries({queryKey:C.notes.snapshots(n),exact:!1})]),o("Previous version restored."),l?.(m.restoreNoteSnapshot),r()}});return e.jsxs(j,{isOpen:t,onClose:r,children:[e.jsx(j.Header,{title:"Restore Previous Version",onClose:r}),e.jsx(j.Body,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(u,{as:"p",variant:"meta",tone:"secondary",children:"Choose a previous snapshot to restore this note back to that state."}),s.isLoading&&e.jsx(u,{as:"div",variant:"meta",tone:"secondary",children:"Loading previous versions..."}),!s.isLoading&&s.data?.length===0&&e.jsx(u,{as:"div",variant:"meta",tone:"secondary",className:"rounded-[14px] border border-border-subtle bg-hover-subtle/50 px-4 py-3",children:"A recovery snapshot will appear after the first edit in a session and older ones are cleaned up automatically."}),!s.isLoading&&s.data&&s.data.length>0&&e.jsx("div",{className:"flex flex-col gap-2",children:s.data.map(m=>e.jsx("div",{className:"surface-base p-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs(u,{as:"p",variant:"body",weight:"semibold",children:["Before ",tt(m.meta.label,m.meta.entrypoint)," edit"]}),e.jsx(u,{as:"p",variant:"meta",truncate:!0,tone:"secondary",children:m.title}),e.jsx(u,{as:"p",variant:"label",tone:"tertiary",children:w(m.createdAt).format("YYYY-MM-DD HH:mm:ss")})]}),e.jsx(k,{size:"sm",isLoading:c.isPending,onClick:()=>c.mutate(m.id),children:"Restore"})]})},m.id))})]})})]})}const st="_Reference_6yru9_1",nt={Reference:st},rt=ee.bind(nt),lt=G({type:"reference",propSchema:{id:{default:""},title:{default:"Unknown"}},content:"none"},{render:t=>e.jsx("span",{className:rt("Reference"),children:e.jsx(Y,{to:z,params:{id:t.inlineContent.props.id},children:e.jsxs("span",{children:["[",t.inlineContent.props.title,"]"]})})})}),ot="_Tag_16liq_1",it={Tag:ot},ct=ee.bind(it),dt=G({type:"tag",propSchema:{id:{default:""},tag:{default:"@Unknown"}},content:"none"},{render:t=>e.jsx("span",{className:ct("Tag"),children:e.jsx(Y,{to:Ne,params:{id:t.inlineContent.props.id},search:{page:1},children:e.jsx("span",{children:t.inlineContent.props.tag})})})}),mt=()=>{const t=ue(),[n,r]=a.useState([]),l={1:"pl-3",2:"pl-[26px]",3:"pl-[40px]",4:"pl-[54px]",5:"pl-[68px]",6:"pl-[82px]"};a.useEffect(()=>{const s=()=>{const m=t.document,M=[],y=N=>{for(const g of N){if(g.type==="heading"){const p=g,E=p.props.level||1,T=p.content?.map(S=>S.text||"").join("")||"";T.trim()&&M.push({id:g.id,level:E,text:T})}g.children&&Array.isArray(g.children)&&y(g.children)}};y(m),r(M)};s();const c=t.onChange?.(s);return()=>{c&&c()}},[t]);const o=s=>{t.setTextCursorPosition(s);const c=document.querySelector(`[data-id="${s}"]`);c&&c.scrollIntoView({behavior:"smooth",block:"center"})},i=e.jsx(B,{icon:e.jsx(te,{className:"h-3.5 w-3.5"}),title:"Table of Contents",className:"text-fg-tertiary"});return n.length===0?e.jsxs("div",{className:"surface-base w-full p-4",children:[i,e.jsx(u,{as:"p",variant:"meta",tone:"secondary",className:"mt-2",children:"Add headings to your document to generate a table of contents"})]}):e.jsxs("div",{className:"surface-base w-full p-4",children:[e.jsx("div",{className:"mb-2",children:i}),e.jsx("nav",{className:"space-y-0.5",children:n.map(s=>{const c=s.level===1;return e.jsxs("button",{type:"button",onClick:()=>o(s.id),className:R("focus-ring-soft","flex","w-full","items-center","gap-2","rounded-[10px]","px-2.5","py-1.5",l[s.level]??"pl-2.5","text-left","transition-colors","hover:bg-hover-subtle",c?"text-fg-default":"text-fg-secondary"),children:[e.jsxs(u,{as:"span",variant:"label",weight:"medium",tone:"tertiary",className:"min-w-[1.5rem]",children:["H",s.level]}),e.jsx(u,{as:"span",variant:"body",weight:c?"semibold":"medium",className:"line-clamp-2 text-current",children:s.text})]},s.id)})})]})},ut=me({type:"tableOfContents",propSchema:{},content:"none"},{render:()=>e.jsx(mt,{})})(),ht=$e.create({inlineContentSpecs:{...Ye,tag:dt,reference:lt},blockSpecs:{...Pe,tableOfContents:ut}}),pt=({editor:t})=>e.jsx(P,{triggerCharacter:"/",getItems:async n=>ze([...he(t).filter(r=>r.title!=="Audio"&&r.title!=="Video"&&r.title!=="File"),{title:"Table of Contents",subtext:"Insert a table of contents based on headings",onItemClick:()=>{t.insertBlocks([{type:"tableOfContents"}],t.getTextCursorPosition().block,"after")},aliases:["toc","table of contents","contents","outline","index"],group:"Other",icon:e.jsx(te,{})}],n)}),xt=({onClick:t})=>e.jsx(P,{triggerCharacter:"[",getItems:async n=>{const r=await we({query:n,limit:5});if(r.type==="error")return[];const{notes:l}=r.allNotes;return l.map(o=>({title:o.title,onItemClick:()=>t({type:"reference",props:{id:o.id,title:o.title}})}))}}),ft=({onClick:t})=>e.jsx(P,{triggerCharacter:"@",getItems:async n=>{const r=await Me({query:n,limit:5});if(r.type==="error")return[];const{tags:l}=r.allTags,o=l.some(s=>s.name!==`@${n}`),i=[{title:"Add a new tag",onItemClick:async()=>{const s=await Ce({name:"@"+n});if(s.type==="error")return;const{id:c,name:m}=s.createTag;t({type:"tag",props:{id:c,tag:m}})}}];return l.length===0?i:l.map(s=>({title:s.name,onItemClick:()=>t({type:"tag",props:{id:s.id,tag:s.name}})})).concat(n&&o?i:[])}});async function gt(t){return new Promise((n,r)=>{const l=new FileReader;l.readAsDataURL(t),l.onload=()=>n(l.result),l.onerror=o=>r(o)})}const yt=a.forwardRef(({content:t,editable:n,onChange:r},l)=>{const{theme:o}=Ae(s=>s),i=pe({schema:ht,initialContent:t&&JSON.parse(t)||void 0,uploadFile:async s=>Oe({base64:await gt(s)})},[]);return a.useImperativeHandle(l,()=>({getContent:()=>JSON.stringify(i.document)})),e.jsxs(xe,{slashMenu:!1,theme:o,editor:i,editable:n,onChange:r,children:[e.jsx(pt,{editor:i}),e.jsx(xt,{onClick:s=>{i.insertInlineContent([s," "])}}),e.jsx(ft,{onClick:s=>{i.insertInlineContent([s," "])}})]})}),Q={low:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"},medium:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"},high:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"}};function bt({isOpen:t,onClose:n,onSave:r,reminder:l,mode:o}){const[i,s]=a.useState(new Date),[c,m]=a.useState("medium"),[M,y]=a.useState("");a.useEffect(()=>{t&&o==="edit"&&l?(s(new Date(Number(l.reminderDate))),m(l.priority||"medium"),y(l.content||"")):t&&o==="create"&&(s(new Date),m("medium"),y(""))},[t,o,l]);const N=()=>{r(i,c,M||void 0),n()},g=p=>c===p?Q[p].active:Q[p].inactive;return e.jsxs(j,{isOpen:t,onClose:n,children:[e.jsx(j.Header,{title:o==="create"?"Create Reminder":"Edit Reminder",onClose:n}),e.jsx(j.Body,{children:e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Z,{children:"Date & Time"}),e.jsx(Re,{type:"datetime-local",size:"sm",value:w(i).format("YYYY-MM-DDTHH:mm"),onChange:p=>s(new Date(p.target.value))})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Z,{children:"Content"}),e.jsx(Se,{size:"sm",placeholder:"Enter reminder content (optional)",value:M,onChange:p=>y(p.target.value)})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Z,{children:"Priority"}),e.jsxs(ke,{type:"single",value:c,onValueChange:p=>p&&m(p),className:"gap-1.5 border-none rounded-[14px] bg-muted/70 p-1 sm:gap-2",children:[e.jsx(F,{value:"low",className:`flex-1 rounded-[10px] border ${g("low")}`,children:e.jsx(u,{as:"span",weight:"medium",className:"text-current",children:"Low"})}),e.jsx(F,{value:"medium",className:`flex-1 rounded-[10px] border ${g("medium")}`,children:e.jsx(u,{as:"span",weight:"medium",className:"text-current",children:"Medium"})}),e.jsx(F,{value:"high",className:`flex-1 rounded-[10px] border ${g("high")}`,children:e.jsx(u,{as:"span",weight:"medium",className:"text-current",children:"High"})})]})]})]})}),e.jsx(j.Footer,{children:e.jsxs(ne,{children:[e.jsx(k,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),e.jsx(k,{variant:"primary",size:"sm",onClick:N,children:o==="create"?"Create":"Save"})]})})]})}function vt({noteId:t}){const[n,r]=a.useState(!1),[l,o]=a.useState(!1),[i,s]=a.useState("create"),[c,m]=a.useState(void 0),{onCreate:M,onUpdate:y,onDelete:N}=Be(),g=()=>{s("create"),m(void 0),o(!0)},p=x=>{s("edit"),m(x),o(!0)},E=(x,f,d)=>{i==="create"?M(t,x,f,()=>{o(!1)},d):i==="edit"&&c&&y(c.id,t,{reminderDate:x,priority:f,content:d},()=>{o(!1)})},T=x=>{y(x.id,t,{completed:!x.completed})},S=x=>{const f=w(Number(x)),d=w();return f.isSame(d,"day")?`Today at ${f.format("HH:mm")}`:f.isSame(d.add(1,"day"),"day")?`Tomorrow at ${f.format("HH:mm")}`:f.format("YYYY-MM-DD HH:mm")},V=x=>{const f=w(Number(x)),d=w(),v=f.diff(d,"hour");return v<=6?"high":v<=24?"medium":"low"},L=x=>{const f=w(Number(x)),d=w(),v=f.diff(d,"hour"),A=f.diff(d,"minute")%60;return v<0||A<0?"Overdue":v===0?`${A}m remaining`:`${v}h ${A}m remaining`};return e.jsxs("div",{className:"surface-base mb-5 p-4",children:[e.jsxs("div",{className:R("flex items-center justify-between",!n&&"mb-3"),children:[e.jsx("button",{type:"button",onClick:()=>r(!n),className:"focus-ring-soft flex items-center gap-2 rounded-[10px] px-2 py-1.5 text-fg-tertiary transition-colors hover:bg-hover-subtle hover:text-fg-default",children:e.jsx(B,{icon:n?e.jsx(Ee,{size:12}):e.jsx(Te,{size:12}),title:"Reminders"})}),!n&&e.jsxs(k,{size:"sm",variant:"ghost",onClick:g,children:[e.jsx(Ue,{className:"w-3 h-3"}),e.jsx(u,{as:"span",variant:"label",className:"hidden sm:inline",children:"Add"})]})]}),!n&&e.jsx(qe,{noteId:t,searchParams:{offset:0,limit:9999},render:({reminders:x,totalCount:f})=>e.jsx("div",{className:"flex flex-col gap-2",children:x.length===0?e.jsx(u,{as:"p",variant:"meta",tone:"secondary",className:"py-3 text-center",children:f===0?"No reminders yet":"All reminders complete"}):e.jsx("div",{className:"flex flex-col",children:x.map(d=>{const v=d.priority||V(d.reminderDate),A=L(d.reminderDate),D=A==="Overdue";return e.jsxs("div",{className:R("flex items-center gap-2.5 px-2 py-1.5"),children:[e.jsx(He,{checked:d.completed,onChange:()=>T(d),size:"sm"}),e.jsx(u,{as:"div",variant:"body",weight:"medium",className:R("truncate flex-1 min-w-0",d.completed&&"line-through opacity-40"),children:d.content||S(d.reminderDate)}),e.jsxs("div",{className:R("shrink-0 flex items-center gap-1",d.completed&&"opacity-40"),children:[d.content&&e.jsx(u,{as:"span",variant:"meta",tone:"secondary",children:S(d.reminderDate)}),!d.completed&&e.jsx(u,{as:"span",variant:"label",weight:"medium",tone:D||v==="high"?"error":"tertiary",className:R(d.content&&'before:content-["·"] before:mr-1'),children:A})]}),e.jsx(ae,{button:e.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-secondary outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(se,{size:16,className:"text-current"}),e.jsx("span",{className:"sr-only",children:"Reminder actions"})]}),items:[{name:"Edit",onClick:()=>p(d)},{name:"Delete",onClick:()=>N(d.id,t)}]})]},d.id)})})})}),e.jsx(bt,{isOpen:l,onClose:()=>o(!1),onSave:E,reminder:c,mode:i})]})}const oe=Le(z),K=t=>w(Number(t)).format("YYYY-MM-DD HH:mm:ss"),I=()=>typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,jt={narrow:"max-w-[640px]",wide:"max-w-[896px]",full:"max-w-full px-4"},Nt=e.jsx(U,{title:"Loading note",variant:"none",children:e.jsxs("main",{className:"mx-auto max-w-[896px]",children:[e.jsx(H,{className:"mb-8",height:"66px"}),e.jsx(H,{className:"ml-12 mb-8",height:"150px"}),e.jsx(H,{className:"mb-5",height:"80px"}),e.jsx(H,{height:"80px"})]})});function wt({id:t}){const n=X(),r=oe.useNavigate(),l=a.useRef(null),o=a.useRef(null),i=a.useRef(I()),{data:s}=J({queryKey:C.notes.detail(t),queryFn:async()=>{const h=await Ve(t);if(h.type==="error")throw h;return h.note},gcTime:0}),[c,m]=a.useState(s.title),[M,y]=a.useState(()=>K(s.updatedAt)),[N,g]=a.useState(s.pinned),[p,E]=a.useState(s.layout||"wide"),[T,S]=a.useState(!1),[V,L]=a.useState(!1),[x,f]=De(1e3);a.useEffect(()=>{m(s.title),g(s.pinned),E(s.layout||"wide"),y(K(s.updatedAt))},[s.layout,s.pinned,s.title,s.updatedAt]),a.useEffect(()=>{i.current=I()},[t]);const d=async({title:h="",content:b=""})=>{f(async()=>{const q=await _({id:t,title:h,content:b,editSessionId:i.current});if(q.type==="error"){n(q.errors[0].message);return}m(h),y(w().format("YYYY-MM-DD HH:mm:ss"))})},v=()=>{d({title:c,content:l.current?.getContent()})},A=h=>{m(h),d({title:h,content:l.current?.getContent()})},D=async h=>{const b=await _({id:t,layout:h,editSessionId:i.current});if(b.type==="error"){n(b.errors[0].message);return}E(h),n("Layout has been updated.")},{onCreate:ie,onDelete:ce,onPinned:de}=Ze();return e.jsx(U,{title:c,variant:"none",children:e.jsxs("main",{className:R("mx-auto",jt[p]),children:[e.jsx("div",{className:"surface-floating sticky top-20 z-[1001] mb-7 px-5 pt-4 pb-3.5",children:e.jsxs("div",{className:"flex flex-col gap-3.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-5",children:[e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsx(u,{as:"div",variant:"micro",weight:"semibold",tracking:"widest",transform:"uppercase",tone:"tertiary",className:"mb-1.5",children:"Thought in progress"}),e.jsx("input",{ref:o,placeholder:"Title",className:"text-heading sm:text-display w-full bg-transparent font-semibold leading-[1.25] tracking-[-0.02em] outline-none",type:"text",value:c,onChange:h=>A(h.target.value)})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx(ae,{button:e.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-9 w-9 items-center justify-center rounded-[12px] border border-transparent bg-transparent text-fg-tertiary outline-none transition-colors hover:border-border-subtle hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("span",{className:"sr-only",children:"Note actions"})]}),items:[{name:N?"Unpin":"Pin",onClick:()=>de(t,N,()=>{g(h=>!h)})},{name:"Change layout",onClick:()=>S(!0)},{type:"separator"},{name:"Clone this note",onClick:()=>ie(o.current?.value||"untitled",l.current?.getContent()||"",p)},{name:"Restore previous version",onClick:()=>L(!0)},{type:"separator"},{name:"Delete",onClick:()=>ce(t,()=>{r({to:Fe,search:{page:1}})})}]}),e.jsx(k,{size:"sm",variant:"subtle",isLoading:x,onClick:v,children:"Save"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-t border-border-subtle/80 pt-3",children:[N&&e.jsxs(u,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center gap-1.5",children:[e.jsx(Ie,{className:"h-3 w-3",weight:"fill"}),"Pinned"]}),N&&e.jsx("span",{className:"h-1 w-1 rounded-full bg-border-secondary"}),e.jsxs(u,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Last saved ",M]})]})]})}),e.jsx(yt,{ref:l,content:s.content,onChange:v},`${t}:${s.updatedAt}`),e.jsx(O,{fallback:e.jsx(H,{className:"mb-5",height:"80px"}),errorTitle:"Failed to load reminders",errorDescription:"Retry loading reminder details for this note.",renderError:({error:h,retry:b})=>e.jsx($,{title:"Failed to load reminders",description:"Retry loading reminder details for this note.",error:h,onRetry:b,showBackAction:!1,showHomeAction:!1}),children:e.jsx(vt,{noteId:t})}),e.jsx(O,{fallback:e.jsx(H,{height:"80px"}),errorTitle:"Failed to load back references",errorDescription:"Retry loading notes that link back here.",renderError:({error:h,retry:b})=>e.jsx($,{title:"Failed to load back references",description:"Retry loading notes that link back here.",error:h,onRetry:b,showBackAction:!1,showHomeAction:!1}),children:e.jsx(Je,{noteId:t,render:h=>h&&h.length>0&&e.jsxs("div",{className:"surface-base p-4",children:[e.jsx(B,{icon:e.jsx(Ge,{className:"h-3.5 w-3.5"}),title:"Back References",className:"mb-3 text-fg-tertiary"}),e.jsx("ul",{className:"flex flex-col",children:h.map(b=>e.jsx("li",{children:e.jsxs(Y,{to:z,params:{id:b.id},className:"flex items-center gap-2 rounded-[10px] px-2.5 py-1.5 text-fg-secondary transition-colors hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(Ke,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary"}),e.jsx(u,{as:"span",variant:"body",weight:"medium",className:"text-current",children:b.title})]})},b.id))})]})})}),e.jsx(et,{isOpen:T,onClose:()=>S(!1),onSave:D,currentLayout:p}),e.jsx(at,{isOpen:V,noteId:t,onClose:()=>L(!1),onRestored:()=>{i.current=I()}})]})})}function Tt(){const{id:t}=oe.useParams();if(!t)throw new Error("Note id is required.");return e.jsx(O,{fallback:Nt,errorTitle:"Failed to load note",errorDescription:"Retry loading the note editor.",resetKeys:[t],renderError:({error:n,retry:r})=>e.jsx(U,{title:"Note",variant:"none",children:e.jsx($,{title:"Failed to load note",description:"Retry loading the note editor.",error:n,onRetry:r})}),children:e.jsx(wt,{id:t},t)})}export{Tt as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./note-vendor-BofYbzmZ.js";import{k as $,T as h,L as H,N as E,D as M,m as L,d as x,Q as S,P as v,E as O,l as U,i as o,j as C,R as I}from"./index-BglnLSet.js";import"./graph-vendor-CUxe67Lr.js";import{u as P,R as Y}from"./useReminderMutate-yJak8FzP.js";import"./note-core-BCgMq5QA.js";const u={high:"bg-priority-high",medium:"bg-priority-medium",low:"bg-priority-low"};function A({reminder:t,onUpdate:l,onDelete:g}){const f=y=>{const r=x(Number(y)),m=x();return r.isSame(m,"day")?`Today at ${r.format("HH:mm")}`:r.isSame(m.add(1,"day"),"day")?`Tomorrow at ${r.format("HH:mm")}`:r.format("YYYY-MM-DD HH:mm")},a=y=>{const r=x(Number(y)),m=x(),b=r.diff(m,"hour"),N=r.diff(m,"minute")%60;return b<0||N<0?"Overdue":b===0?`${N}m remaining`:`${b}h ${N}m remaining`},d=a(t.reminderDate)==="Overdue",i=t.priority||"low",s=i==="high"?"High":i==="medium"?"Medium":"Low",p=u[i],c=t.noteId.toString(),n=d?"text-fg-error":"text-fg-tertiary",j=t.content?.trim()||t.note?.title||"Untitled reminder",R=t.note?.title||"Untitled note",T=!!(t.content?.trim()&&t.note?.title),D=a(t.reminderDate),k=f(t.reminderDate);return e.jsxs("div",{className:"surface-base flex flex-col gap-2.5 px-4 py-3 sm:flex-row sm:items-center sm:gap-4",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[e.jsx($,{checked:t.completed,onChange:()=>l(t.id,c,{completed:!t.completed}),size:"sm"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(h,{as:"p",variant:"body",weight:"semibold",className:t.completed?"truncate line-through opacity-45":"truncate",children:j}),T&&e.jsx(h,{as:"div",variant:"meta",tone:"secondary",className:t.completed?"mt-0.5 truncate opacity-45":"mt-0.5 truncate",children:e.jsx(H,{to:E,params:{id:String(t.note?.id??t.noteId)},className:"transition-colors hover:text-fg-default hover:underline",children:R})})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 sm:shrink-0",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 rounded-full border border-border-subtle ${p}`,"aria-label":`${s} priority`,title:`${s} priority`}),e.jsx(h,{as:"span",variant:"meta",weight:"medium",tone:"secondary",className:t.completed?"opacity-45":void 0,children:k}),e.jsx("span",{className:"h-1 w-1 rounded-full bg-border-secondary"}),e.jsx(h,{as:"span",variant:"label",weight:"medium",className:t.completed?"opacity-45":n,children:D})]}),e.jsx("div",{className:"flex items-center justify-end gap-1.5 sm:shrink-0",children:e.jsx(M,{button:e.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-[10px] border border-transparent bg-transparent text-fg-tertiary outline-none transition-colors hover:border-border-subtle hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(L,{className:"h-5 w-5 text-current"}),e.jsx("span",{className:"sr-only",children:"Reminder actions"})]}),items:[{name:"Delete",onClick:()=>g(t.id,c)}]})})]})}const w=C(I),B=[{label:"High",className:u.high},{label:"Medium",className:u.medium},{label:"Low",className:u.low}];function q(){const t=w.useNavigate(),{page:l}=w.useSearch(),{onUpdate:g,onDelete:f}=P(),a=25,d=e.jsx("div",{className:"flex flex-wrap items-center gap-3",children:B.map(({label:i,className:s})=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`h-2.5 w-2.5 rounded-full border border-border-subtle ${s}`,"aria-hidden":"true"}),e.jsx(h,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:i})]},i))});return e.jsx(S,{fallback:e.jsx(v,{title:"Reminders",heading:e.jsx(o,{width:164,height:24,className:"rounded-full"}),description:e.jsx(o,{width:224,height:16,className:"rounded-full"}),headerRight:d,children:e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx(o,{height:"60px"}),e.jsx(o,{height:"60px"}),e.jsx(o,{height:"60px"}),e.jsx(o,{height:"60px"})]})}),errorTitle:"Failed to load reminders",errorDescription:"Retry loading the upcoming reminder list",resetKeys:[l,a],children:e.jsx(Y,{searchParams:{offset:(l-1)*a,limit:a},render:({reminders:i,totalCount:s})=>{const p=s>0?`Reminders (${s})`:void 0,c="Review reminders created from notes and mark them complete here";return i.length===0?e.jsx(v,{title:"Reminders",heading:p,description:c,headerRight:d,children:e.jsx(O,{title:"No upcoming reminders",description:"Add a reminder inside any note to see it here"})}):e.jsx(v,{title:"Reminders",heading:p,description:c,headerRight:d,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-col gap-2.5",children:i.map(n=>e.jsx(A,{reminder:n,onUpdate:g,onDelete:f},n.id))}),s&&a<s&&e.jsx(U,{page:l,last:Math.ceil(s/a),onChange:n=>{t({search:j=>({...j,page:n})})}})]})})}})})}export{q as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./note-vendor-BofYbzmZ.js";import{P as m,E as f,Q as N,x as b,T as h,L as w,N as S,l as E,j as k,y as $,i as d}from"./index-BglnLSet.js";import{a as R}from"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const L=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),g=({children:t,match:s})=>{const r=s.trim();if(!r)return e.jsx("span",{children:t});const a=L(r),n=new RegExp(`(${a})`,"gi"),l=new RegExp(`^${a}$`,"i"),c=t.split(n);return e.jsx("span",{children:c.map((i,o)=>l.test(i)?e.jsx("mark",{children:i},o):e.jsx(R.Fragment,{children:i},o))})},j=k($),y=180,x=t=>t.replace(/\s+/g," ").trim(),T=(t,s)=>{const r=x(t),a=x(s).toLowerCase();if(!a)return r;const n=r.toLowerCase().indexOf(a);if(n===-1)return r.length>y?`${r.slice(0,y-1).trimEnd()}…`:r;const l=Math.max(0,n-56),c=Math.min(r.length,n+a.length+84);let i=r.slice(l,c).trim();return l>0&&(i=`…${i}`),c<r.length&&(i=`${i}…`),i},A=t=>Array.isArray(t)?t.map(s=>{if(!s||typeof s!="object")return"";const r=s.text;return typeof r=="string"?r:""}).join(""):"",B=(t,s)=>t==="heading"?`Heading ${typeof s?.level=="number"?s.level:1}`:t==="bulletListItem"?"Bullet":t==="numberedListItem"?"Numbered":t==="checkListItem"?"Checklist":t==="quote"?"Quote":t==="codeBlock"?"Code":"Content",v=(t,s)=>{Array.isArray(t)&&t.forEach(r=>{if(!r||typeof r!="object")return;const a=typeof r.type=="string"?r.type:void 0,n=typeof r.props=="object"&&r.props?r.props:void 0,l=x(A(r.content));l&&s.push({label:B(a,n),text:l});const c=r.children;Array.isArray(c)&&v(c,s)})},C=(t,s)=>{try{const r=JSON.parse(t),a=[];if(v(r,a),a.length===0)return[];const n=x(s).toLowerCase(),l=n?a.filter(i=>i.text.toLowerCase().includes(n)):a;return(l.length>0?l:a).slice(0,2).map(i=>({...i,text:T(i.text,s)}))}catch{return[]}},P=t=>t===1?"1 result":`${t} results`,M=()=>"Open the note to inspect matching content.",z=(t,s)=>`${P(s)} for "${t}"`,I=()=>e.jsx(m,{title:"Search",variant:"default",description:e.jsx(d,{width:208,height:16,className:"rounded-full"}),children:e.jsx("main",{className:"flex flex-col gap-3",children:Array.from({length:2},(t,s)=>e.jsxs("div",{className:"surface-base flex flex-col gap-3 p-4",children:[e.jsx(d,{width:"34%",height:18,className:"rounded-full"}),e.jsx("div",{className:"rounded-[14px] bg-muted px-3 py-3",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{children:[e.jsx(d,{width:84,height:12,className:"rounded-full"}),e.jsx(d,{width:"100%",height:14,className:"mt-2 rounded-full"}),e.jsx(d,{width:"82%",height:14,className:"mt-1.5 rounded-full"})]}),e.jsxs("div",{className:"border-t border-border-subtle pt-2",children:[e.jsx(d,{width:72,height:12,className:"rounded-full"}),e.jsx(d,{width:"94%",height:14,className:"mt-2 rounded-full"})]})]})})]},s))})});function F(){const t=j.useNavigate(),{page:s,query:r}=j.useSearch(),a=r.trim(),n=10;return a?e.jsx(N,{fallback:e.jsx(I,{}),errorTitle:"Failed to load search results",errorDescription:`Retry loading results for "${a}".`,resetKeys:[a,s],children:e.jsx(b,{searchParams:{query:a,limit:n,offset:(s-1)*n,fields:["content"]},render:({notes:l,totalCount:c})=>e.jsx(m,{title:"Search",description:z(a,c),variant:"default",children:e.jsxs("main",{className:"flex flex-col gap-4",children:[l.length>0?e.jsx("div",{className:"flex flex-col gap-3",children:l.map(i=>{const o=C(i.content,a);return e.jsxs("article",{className:"surface-base flex flex-col gap-3 p-4",children:[e.jsx(h,{as:"h2",variant:"body",weight:"semibold",tracking:"tight",children:e.jsx(w,{to:S,params:{id:i.id},className:"transition-colors hover:text-fg-default/85",children:e.jsx(g,{match:a,children:i.title||"Untitled"})})}),o.length>0?e.jsx("div",{className:"rounded-[14px] bg-muted px-3 py-3",children:e.jsx("div",{className:"flex flex-col gap-2",children:o.map((u,p)=>e.jsxs("div",{className:p>0?"border-t border-border-subtle pt-2":void 0,children:[e.jsx(h,{as:"div",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",tone:"tertiary",children:u.label}),e.jsx(h,{as:"p",variant:"meta",tone:"secondary",className:"mt-1 leading-[1.65]",children:e.jsx(g,{match:a,children:u.text})})]},`${i.id}:${u.label}:${p}`))})}):e.jsx(h,{as:"p",variant:"meta",tone:"secondary",className:"leading-[1.65]",children:M()})]},i.id)})}):e.jsx(f,{title:"No results found",description:"Try searching for a different word or phrase"}),c>n&&e.jsx(E,{page:s,last:Math.ceil(c/n),onChange:i=>{t({search:o=>({...o,page:i})})}})]})})})}):e.jsx(m,{title:"Search",description:"Search note titles and matching sections across your workspace",variant:"default",children:e.jsx("main",{children:e.jsx(f,{title:"Start searching",description:"Enter a keyword to look through note titles and matching content"})})})}export{F as default};
@@ -0,0 +1 @@
1
+ import{j as f}from"./note-vendor-BofYbzmZ.js";import{au as o}from"./index-BglnLSet.js";const u=o("surface-base",{variants:{tone:{default:"",elevated:"surface-elevated"},padding:{default:"p-4",compact:"px-3 py-2.5",roomy:"p-6",flush:"overflow-hidden"}},defaultVariants:{tone:"default",padding:"default"}});function i({children:a,className:e,flush:t=!1,padding:d="default",tone:s="default"}){const r=t?"flush":d;return f.jsx("div",{className:u({tone:s,padding:r,className:e}),children:a})}export{i as S};
@@ -0,0 +1 @@
1
+ import{j as e}from"./note-vendor-BofYbzmZ.js";import{t as p,z as m,q as u,A as f,Q as j,P as h,F as o,L as y,G as T,T as c,l as w,E as b,i as s,j as v,H as N}from"./index-BglnLSet.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const A=a=>{const{data:t}=p({queryKey:u.tags.list(a.searchParams),async queryFn(){const i=await m({offset:a.searchParams.offset,limit:a.searchParams.limit});if(i.type==="error")throw i;return i.allTags}});return a.render(t)},R=100,G=8,P=12,x=v(N);function q(){const a=x.useNavigate(),{page:t}=x.useSearch(),{containerRef:i,limit:n}=f({minItemWidth:R,gap:G,rows:P});return e.jsx("div",{ref:i,children:e.jsx(j,{fallback:e.jsx(h,{title:"Tags",heading:e.jsx(s,{width:120,height:24,className:"rounded-full"}),description:e.jsx(s,{width:188,height:16,className:"rounded-full"}),children:e.jsxs("div",{className:"flex flex-wrap gap-2.5",children:[e.jsx(s,{width:"90px",height:"36px"}),e.jsx(s,{width:"120px",height:"36px"}),e.jsx(s,{width:"80px",height:"36px"}),e.jsx(s,{width:"100px",height:"36px"}),e.jsx(s,{width:"110px",height:"36px"}),e.jsx(s,{width:"70px",height:"36px"})]})}),errorTitle:"Failed to load tags",errorDescription:"Retry loading the tag catalog",resetKeys:[t,n],children:e.jsx(A,{searchParams:{offset:(t-1)*n,limit:n},render:({tags:d,totalCount:l})=>e.jsx(h,{title:"Tags",heading:l>0?`Tags (${l})`:void 0,description:"Browse the tags you added with @ across your notes",children:e.jsx(o,{fallback:e.jsx(b,{title:"No tags yet",description:"Add @tags inside notes and they will appear here"}),children:d.length>0&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-wrap gap-2.5",children:d.map(r=>e.jsxs(y,{to:T,params:{id:r.id},search:{page:1},className:"inline-flex items-center gap-1.5 rounded-full border border-border-subtle bg-hover-subtle px-3 py-1.5 text-fg-secondary transition-colors hover:border-border-secondary hover:bg-hover hover:text-fg-default",children:[e.jsx(c,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:r.name}),e.jsx(c,{as:"span",variant:"label",weight:"medium",tone:"tertiary",className:"text-current/70",children:r.referenceCount})]},r.id))}),e.jsx(o,{fallback:null,children:l&&n<l&&e.jsx(w,{page:t,last:Math.ceil(l/n),onChange:r=>{a({search:g=>({...g,page:r})})}})})]})})})})})})}export{q as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./note-vendor-BofYbzmZ.js";import{t as f,aa as j,q as p,a6 as y,Q as N,P as g,F as h,ab as P,l as T,E as v,i as d,j as q,G as w}from"./index-BglnLSet.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const b=s=>{const{data:r}=f({queryKey:p.notes.tagList(s.searchParams),async queryFn(){const t=await j({query:s.searchParams.query,offset:s.searchParams.offset,limit:s.searchParams.limit});if(t.type==="error")throw t;return t.tagNotes}});return s.render(r)},c=q(w);function S(){const s=c.useNavigate(),{id:r}=c.useParams(),{page:t}=c.useSearch(),i=25,{onDelete:u,onPinned:m}=y();return e.jsx(N,{fallback:e.jsx(g,{title:"Tagged Notes",heading:e.jsx(d,{width:148,height:24,className:"rounded-full"}),description:e.jsx(d,{width:196,height:16,className:"rounded-full"}),variant:"default",children:e.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[e.jsx(d,{height:"112px"}),e.jsx(d,{height:"112px"}),e.jsx(d,{height:"112px"})]})}),errorTitle:"Failed to load tagged notes",errorDescription:"Retry loading notes for this tag",resetKeys:[r,t,i],children:e.jsx(b,{searchParams:{query:r,offset:(t-1)*i,limit:i},render:({notes:o,totalCount:n})=>{const l=o.flatMap(a=>a.tags).find(a=>a.id===r)?.name;return e.jsx(g,{title:l??"Tagged Notes",heading:l?n>0?`${l} (${n})`:l:"Tagged Notes",description:"Browse every note linked to this tag",variant:"default",children:e.jsx(h,{fallback:e.jsx(v,{title:"No tagged notes yet",description:"Notes tagged with this label will appear here"}),children:o.length>0&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"grid-auto-cards grid gap-5",children:o.map(a=>e.jsx(P,{...a,onPinned:()=>m(a.id,a.pinned),onDelete:()=>u(a.id)},a.id))}),e.jsx(h,{fallback:null,children:n&&i<n&&e.jsx(T,{page:t,last:Math.ceil(n/i),onChange:a=>{s({search:x=>({...x,page:a})})}})})]})})})}})})}export{S as default};
@@ -1 +1 @@
1
- import{a}from"./graph-vendor-CUxe67Lr.js";import{p as l}from"./index-DqFkOWbi.js";const r=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),a.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),m=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),n=a.forwardRef((e,t)=>a.createElement(l,{ref:t,...e,weights:r}));n.displayName="LinkIcon";const V=n,h=a.forwardRef((e,t)=>a.createElement(l,{ref:t,...e,weights:m}));h.displayName="TrashIcon";const Z=h;export{V as c,Z as n};
1
+ import{a}from"./graph-vendor-CUxe67Lr.js";import{p as l}from"./index-BglnLSet.js";const r=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),a.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),m=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),n=a.forwardRef((e,t)=>a.createElement(l,{ref:t,...e,weights:r}));n.displayName="LinkIcon";const V=n,h=a.forwardRef((e,t)=>a.createElement(l,{ref:t,...e,weights:m}));h.displayName="TrashIcon";const Z=h;export{V as c,Z as n};
@@ -1,4 +1,4 @@
1
- import{g as t,ac as n}from"./index-DqFkOWbi.js";function o({limit:a=50,offset:e=0}={}){return t(`query FetchImages($pagination: PaginationInput) {
1
+ import{h as t,ag as n}from"./index-BglnLSet.js";function o({limit:a=50,offset:e=0}={}){return t(`query FetchImages($pagination: PaginationInput) {
2
2
  allImages(pagination: $pagination) {
3
3
  totalCount
4
4
  images {