ocean-brain 0.6.0 → 0.6.1

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 (37) hide show
  1. package/package.json +1 -1
  2. package/server/client/dist/assets/{Calendar-BytW4PeT.js → Calendar-BJHLksEZ.js} +1 -1
  3. package/server/client/dist/assets/{Callout-9sJgGNRb.js → Callout-wFx9oCas.js} +1 -1
  4. package/server/client/dist/assets/{Graph-o5u-NzrA.js → Graph-9piERaNR.js} +1 -1
  5. package/server/client/dist/assets/{Image-DxWhlIDG.js → Image-DK0lnaK2.js} +1 -1
  6. package/server/client/dist/assets/{Image.es-B0LL3pb7.js → Image.es-Be7par_j.js} +1 -1
  7. package/server/client/dist/assets/{Note-CYoYzZNu.js → Note-CC9ybxXL.js} +2 -2
  8. package/server/client/dist/assets/{Plus.es-DpxzgRtY.js → Plus.es-BKm7uDYu.js} +1 -1
  9. package/server/client/dist/assets/{Reminders-DAepTZg1.js → Reminders-DRxA8v98.js} +1 -1
  10. package/server/client/dist/assets/{Search-6KH7An44.js → Search-BunSQrqv.js} +1 -1
  11. package/server/client/dist/assets/{SurfaceCard-EMs50xSF.js → SurfaceCard-FhlC8VSR.js} +1 -1
  12. package/server/client/dist/assets/Tag-z_crJ5JP.js +1 -0
  13. package/server/client/dist/assets/{TagNotes-BTbu-f6v.js → TagNotes-D7wIJ4jy.js} +1 -1
  14. package/server/client/dist/assets/{Trash.es-C5x35NKF.js → Trash.es-ByMVwx0d.js} +1 -1
  15. package/server/client/dist/assets/{ViewNotes-DPEuki3y.js → ViewNotes-Duo9XmcJ.js} +1 -1
  16. package/server/client/dist/assets/{Views-BGkuNhVd.js → Views-D4Z_O9Kd.js} +1 -1
  17. package/server/client/dist/assets/{image.api-DRhRQ0Gf.js → image.api-B5Qi-Txv.js} +1 -1
  18. package/server/client/dist/assets/{index-DswSFFMb.js → index-cHJQCo8V.js} +1 -1
  19. package/server/client/dist/assets/{index-DYlYUrjH.js → index-nYj7BL3a.js} +40 -40
  20. package/server/client/dist/assets/{manage-image-detail-CJkfybR9.js → manage-image-detail-DcZggB1M.js} +1 -1
  21. package/server/client/dist/assets/manage-image-glbtBibn.js +1 -0
  22. package/server/client/dist/assets/{mcp-piouFDNm.js → mcp-BBUpQdS9.js} +1 -1
  23. package/server/client/dist/assets/{note-core-Z6kqulGB.js → note-core-DMZcZ4yV.js} +53 -53
  24. package/server/client/dist/assets/{note-vendor-i1M2FSI2.js → note-vendor-uuJO2MTD.js} +1 -1
  25. package/server/client/dist/assets/{placeholder-DGz3CHej.js → placeholder-B_qb_qkc.js} +1 -1
  26. package/server/client/dist/assets/{properties-CM4khczg.js → properties-CiyQv6Tb.js} +1 -1
  27. package/server/client/dist/assets/{trash-C2lItz-b.js → trash-CQnj4Rmv.js} +1 -1
  28. package/server/client/dist/assets/{useReminderMutate-DHjDDHKg.js → useReminderMutate-CSKliBcc.js} +1 -1
  29. package/server/client/dist/assets/{view-dashboard-C17WsdL7.js → view-dashboard-B5fKgvk_.js} +1 -1
  30. package/server/client/dist/index.html +3 -3
  31. package/server/dist/features/note/services/markdown-intent-write.js +17 -0
  32. package/server/dist/features/note/services/markdown-intent-write.js.map +1 -1
  33. package/server/dist/features/note/services/markdown-patch.js.map +1 -1
  34. package/server/dist/modules/blocknote.js +320 -5
  35. package/server/dist/modules/blocknote.js.map +1 -1
  36. package/server/client/dist/assets/Tag-C89j8x56.js +0 -1
  37. package/server/client/dist/assets/manage-image-C6sHhWnI.js +0 -1
@@ -1 +1 @@
1
- import{j as e}from"./note-vendor-i1M2FSI2.js";import{a6 as j,aL as p,q as y,av as N,a0 as P,P as c,ac as h,aM as T,a1 as v,G as q,i as d,j as w,ad as k}from"./index-DYlYUrjH.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-Z6kqulGB.js";const R=s=>{const{data:r}=j({queryKey:y.notes.tagList(s.searchParams),async queryFn(){const t=await p({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)},g=w(k);function M(){const s=g.useNavigate(),{id:r}=g.useParams(),{page:t}=g.useSearch(),i=25,{onDelete:u,onPinned:m,deleteWarningDialog:x}=N();return e.jsxs(P,{fallback:e.jsx(c,{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(R,{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(c,{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(q,{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(T,{...a,onPinned:()=>m(a.id,a.pinned),onDelete:()=>u(a.id)},a.id))}),e.jsx(h,{fallback:null,children:n&&i<n&&e.jsx(v,{page:t,last:Math.ceil(n/i),onChange:a=>{s({search:f=>({...f,page:a})})}})})]})})})}}),x]})}export{M as default};
1
+ import{j as e}from"./note-vendor-uuJO2MTD.js";import{a6 as j,aL as p,q as y,av as N,a0 as P,P as c,ac as h,aM as T,a1 as v,G as q,i as d,j as w,ad as k}from"./index-nYj7BL3a.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-DMZcZ4yV.js";const R=s=>{const{data:r}=j({queryKey:y.notes.tagList(s.searchParams),async queryFn(){const t=await p({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)},g=w(k);function M(){const s=g.useNavigate(),{id:r}=g.useParams(),{page:t}=g.useSearch(),i=25,{onDelete:u,onPinned:m,deleteWarningDialog:x}=N();return e.jsxs(P,{fallback:e.jsx(c,{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(R,{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(c,{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(q,{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(T,{...a,onPinned:()=>m(a.id,a.pinned),onDelete:()=>u(a.id)},a.id))}),e.jsx(h,{fallback:null,children:n&&i<n&&e.jsx(v,{page:t,last:Math.ceil(n/i),onChange:a=>{s({search:f=>({...f,page:a})})}})})]})})})}}),x]})}export{M as default};
@@ -1 +1 @@
1
- import{a}from"./graph-vendor-CUxe67Lr.js";import{p as l}from"./index-DYlYUrjH.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-nYj7BL3a.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 +1 @@
1
- import{j as e}from"./note-vendor-i1M2FSI2.js";import{P as p,G as j,a0 as F,i as r,j as P,V as C,av as T,u as k,q as f,a6 as q,ac as m,aM as R,a1 as $,T as D}from"./index-DYlYUrjH.js";import{v as E,f as A,a as K,d as y}from"./view-dashboard-C17WsdL7.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-Z6kqulGB.js";const h=P(C);function M(){const o=h.useNavigate(),{page:i,sectionId:n}=h.useSearch(),{onDelete:w,onPinned:v,deleteWarningDialog:N}=T(),a=25,{data:l}=k({queryKey:f.views.section(n),async queryFn(){const t=await E(n);if(t.type==="error")throw t;return t.viewSection}}),{data:s}=q({queryKey:f.views.sectionNotes(n,{limit:a,offset:(i-1)*a}),async queryFn(){const t=await A(n,{limit:a,offset:(i-1)*a});if(t.type==="error")throw t;return t.viewSectionNotes}}),d=l?.title||"View Notes",c=l?.tagNames??[],x=l?.mode??"and",u=l?.propertyFilters??[],b=c.length>0,g=u.length>0,V=b?g?`Property and tag filters · ${y(x)}`:`Tag filters · ${y(x)}`:g?"Property filters":"All notes";return e.jsxs(p,{title:d,heading:s.totalCount>0?`${d} (${s.totalCount})`:d,description:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{as:"span",variant:"meta",tone:"tertiary",children:V}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.map(t=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:t},t)),u.map(t=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:K(t)},`${t.key}-${t.operator}-${t.value??""}`)),c.length===0&&u.length===0&&e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:"All notes"})]})]}),children:[e.jsx(m,{fallback:e.jsx(j,{title:"No notes match this saved view",description:"Adjust this view's filters or keep writing until matching notes appear."}),children:s.notes.length>0&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"grid-auto-cards grid gap-5",children:s.notes.map(t=>e.jsx(R,{...t,onPinned:()=>v(t.id,t.pinned),onDelete:()=>w(t.id)},t.id))}),e.jsx(m,{fallback:null,children:s.totalCount&&a<s.totalCount&&e.jsx($,{page:i,last:Math.ceil(s.totalCount/a),onChange:t=>{o({search:S=>({...S,page:t})})}})})]})}),N]})}function _(){const{sectionId:o,page:i}=h.useSearch();return o?e.jsx(F,{fallback:e.jsx(p,{title:"View Notes",heading:e.jsx(r,{width:180,height:24,className:"rounded-full"}),description:e.jsx(r,{width:220,height:16,className:"rounded-full"}),children:e.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[e.jsx(r,{height:"112px"}),e.jsx(r,{height:"112px"}),e.jsx(r,{height:"112px"})]})}),errorTitle:"Failed to load view notes",errorDescription:"Retry loading notes for this saved view section",resetKeys:[i,o],children:e.jsx(M,{})}):e.jsx(p,{title:"View Notes",description:"Saved view note lists require a section id.",children:e.jsx(j,{title:"No section selected",description:"Return to Views and open a section from there."})})}export{_ as default};
1
+ import{j as e}from"./note-vendor-uuJO2MTD.js";import{P as p,G as j,a0 as F,i as r,j as P,V as C,av as T,u as k,q as f,a6 as q,ac as m,aM as R,a1 as $,T as D}from"./index-nYj7BL3a.js";import{v as E,f as A,a as K,d as y}from"./view-dashboard-B5fKgvk_.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-DMZcZ4yV.js";const h=P(C);function M(){const o=h.useNavigate(),{page:i,sectionId:n}=h.useSearch(),{onDelete:w,onPinned:v,deleteWarningDialog:N}=T(),a=25,{data:l}=k({queryKey:f.views.section(n),async queryFn(){const t=await E(n);if(t.type==="error")throw t;return t.viewSection}}),{data:s}=q({queryKey:f.views.sectionNotes(n,{limit:a,offset:(i-1)*a}),async queryFn(){const t=await A(n,{limit:a,offset:(i-1)*a});if(t.type==="error")throw t;return t.viewSectionNotes}}),d=l?.title||"View Notes",c=l?.tagNames??[],x=l?.mode??"and",u=l?.propertyFilters??[],b=c.length>0,g=u.length>0,V=b?g?`Property and tag filters · ${y(x)}`:`Tag filters · ${y(x)}`:g?"Property filters":"All notes";return e.jsxs(p,{title:d,heading:s.totalCount>0?`${d} (${s.totalCount})`:d,description:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{as:"span",variant:"meta",tone:"tertiary",children:V}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.map(t=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:t},t)),u.map(t=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:K(t)},`${t.key}-${t.operator}-${t.value??""}`)),c.length===0&&u.length===0&&e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:"All notes"})]})]}),children:[e.jsx(m,{fallback:e.jsx(j,{title:"No notes match this saved view",description:"Adjust this view's filters or keep writing until matching notes appear."}),children:s.notes.length>0&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"grid-auto-cards grid gap-5",children:s.notes.map(t=>e.jsx(R,{...t,onPinned:()=>v(t.id,t.pinned),onDelete:()=>w(t.id)},t.id))}),e.jsx(m,{fallback:null,children:s.totalCount&&a<s.totalCount&&e.jsx($,{page:i,last:Math.ceil(s.totalCount/a),onChange:t=>{o({search:S=>({...S,page:t})})}})})]})}),N]})}function _(){const{sectionId:o,page:i}=h.useSearch();return o?e.jsx(F,{fallback:e.jsx(p,{title:"View Notes",heading:e.jsx(r,{width:180,height:24,className:"rounded-full"}),description:e.jsx(r,{width:220,height:16,className:"rounded-full"}),children:e.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[e.jsx(r,{height:"112px"}),e.jsx(r,{height:"112px"}),e.jsx(r,{height:"112px"})]})}),errorTitle:"Failed to load view notes",errorDescription:"Retry loading notes for this saved view section",resetKeys:[i,o],children:e.jsx(M,{})}):e.jsx(p,{title:"View Notes",description:"Saved view note lists require a section id.",children:e.jsx(j,{title:"No section selected",description:"Return to Views and open a section from there."})})}export{_ as default};
@@ -1 +1 @@
1
- import{j as e}from"./note-vendor-i1M2FSI2.js";import{p as Le,u as G,q as D,T as c,L as te,V as le,D as Te,k as Se,B as k,N as Me,t as Re,M as L,l as A,I as ie,S as q,e as v,m as Ie,n as qe,o as oe,r as Ce,v as Oe,w as We,x as _e,y as Pe,z as de,A as He,K as Ke,E as $e,F as Be,P as Ue,i as se,G as ce,H as me,J as Ze,O as ue,Q as xe,R as Qe,U as Ye,W as Ge,X as Je,Y as Ve,Z as Fe,c as J,_ as Ee}from"./index-DYlYUrjH.js";import{a as r}from"./graph-vendor-CUxe67Lr.js";import{b as Xe,f as et,g as tt,a as st,n as pe,c as at,d as he,e as rt,h as nt,E as it,s as lt,i as ot,r as dt,j as ct,k as mt,l as ut,m as xt,u as pt,o as ht,p as gt,q as ft,t as bt}from"./view-dashboard-C17WsdL7.js";import{S as H}from"./SurfaceCard-EMs50xSF.js";import{n as ae}from"./Plus.es-DpxzgRtY.js";import"./note-core-Z6kqulGB.js";const vt=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),r.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),De=r.forwardRef((t,i)=>r.createElement(Le,{ref:i,...t,weights:vt}));De.displayName="ArrowRightIcon";const yt=De,jt="flex items-start justify-between gap-3 rounded-[14px] border border-border-subtle/70 px-3 py-2.5 transition-colors hover:border-border-secondary hover:bg-hover-subtle";function wt({section:t,onEdit:i,onDelete:n,dragHandle:u}){const x=Xe(t),{data:p,isPending:g,isError:f,refetch:V}=G({queryKey:D.views.sectionNotes(t.id,{limit:t.limit,offset:0}),async queryFn(){const h=await et(t.id,{limit:t.limit,offset:0});if(h.type==="error")throw h;return h.viewSectionNotes}}),j=p?.notes??[],O=p?.totalCount??0,N=tt(t.mode),l=t.tagNames.length>0||t.propertyFilters.length>0;return e.jsxs(H,{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[u&&e.jsx("div",{className:"-mr-1 shrink-0 self-center",children:u}),e.jsx("div",{className:"min-w-0",children:e.jsx(c,{as:"h2",variant:"subheading",weight:"semibold",tracking:"tight",className:"min-w-0",children:e.jsx(te,{to:le,search:x,className:"truncate hover:text-fg-default/85",children:t.title})})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[t.tagNames.map((h,M)=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[M>0&&e.jsx("span",{className:"px-0.5 text-[10px] font-semibold tracking-[0.08em] text-fg-tertiary/85",children:N}),e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-transparent px-2.5 py-1 text-xs font-medium text-fg-secondary",children:h})]},h)),t.propertyFilters.map(h=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:st(h)},`${h.key}-${h.operator}-${h.value??""}`)),!l&&e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-transparent px-2.5 py-1 text-xs font-medium text-fg-tertiary",children:"All notes"})]})]}),e.jsx("div",{className:"shrink-0",children:e.jsx(Te,{button:e.jsx(Se,{label:"Section actions"}),items:[{name:"Edit section",onClick:i},{type:"separator"},{name:"Delete section",onClick:n}]})})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[g&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"}),e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"}),e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"})]}),f&&e.jsxs("div",{className:"rounded-[16px] border border-border-subtle bg-hover-subtle/70 p-4",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"Failed to load this section"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Retry to refresh this saved query."}),e.jsx("div",{className:"mt-3",children:e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>V(),children:"Retry"})})]}),!g&&!f&&j.length===0&&e.jsxs("div",{className:"rounded-[16px] border border-dashed border-border-subtle px-4 py-5",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"No notes match yet"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Add matching notes, or edit this view query."})]}),!g&&!f&&j.map(h=>e.jsxs(te,{to:Me,params:{id:h.id},className:jt,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{as:"div",variant:"body",weight:"semibold",className:"line-clamp-1",children:h.title||"Untitled"}),e.jsxs(c,{as:"div",variant:"meta",tone:"tertiary",className:"mt-1",children:["Updated ",Re(Number(h.updatedAt))]})]}),e.jsx(yt,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary"})]},h.id))]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-border-subtle/70 pt-4",children:[e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:g?"Loading notes...":`Showing ${j.length} of ${O} notes`}),e.jsx(k,{asChild:!0,variant:"subtle",size:"sm",children:e.jsx(te,{to:le,search:x,children:"Open list"})})]})]})}const re="__choose_property__",ge=t=>String(t?.limit??5),fe=t=>t?.mode??"and",be=t=>t?t.tagNames.join(", "):"",ve=t=>t?.title??"",ye=t=>t?.sortBy??"updatedAt",je=t=>t?.sortOrder??"desc",Ae=t=>`property-filter-${Date.now()}-${t}`,we=t=>(t?.propertyFilters??[]).map((i,n)=>({id:Ae(n),key:i.key,operator:i.operator,value:i.value??""})),Ne=t=>t?t.valueType==="date"||t.valueType==="number"?["equals","before","after","exists","notExists"]:["equals","exists","notExists"]:["exists","notExists"],ke=t=>t?"equals":"exists",Nt=t=>t?t.valueType==="boolean"?"true":t.valueType==="select"?t.options[0]?.value??"":"":"",ne=t=>t!=="exists"&&t!=="notExists";function kt({open:t,mode:i,initialSection:n=null,availableTags:u,availableProperties:x,isTagsLoading:p=!1,isPropertiesLoading:g=!1,onClose:f,onSubmit:V}){const[j,O]=r.useState(ve(n)),[N,l]=r.useState(be(n)),[h,M]=r.useState(fe(n)),[K,Z]=r.useState(ye(n)),[Q,Y]=r.useState(je(n)),[$,C]=r.useState(ge(n)),[y,W]=r.useState(we(n)),[X,B]=r.useState((n?.tagNames.length??0)>0),[U,w]=r.useState(""),_=r.useMemo(()=>new Map(x.map(a=>[a.key,a])),[x]);r.useEffect(()=>{t&&(O(ve(n)),l(be(n)),M(fe(n)),Z(ye(n)),Y(je(n)),C(ge(n)),W(we(n)),B((n?.tagNames.length??0)>0),w(""))},[n,t]);const F=pe([N]),P=X||F.length>0,s=F.length===0&&y.length===0,d=a=>{const m=F.includes(a)?F.filter(z=>z!==a):[...F,a];l(m.join(", ")),w("")},E=()=>{B(!0),w("")},T=()=>{l(""),M("and"),B(!1),w("")},R=()=>{if(x.length===0){w("Create a shared property before adding a filter.");return}W(a=>[...a,{id:Ae(a.length),key:"",operator:"exists",value:""}]),w("")},S=(a,m)=>{W(z=>z.map(o=>{if(o.id!==a)return o;const I={...o,...m},b=_.get(I.key);return Ne(b).includes(I.operator)||(I.operator=ke(b)),"key"in m&&(I.value=Nt(b),I.operator=ke(b)),I})),w("")},ze=a=>{W(m=>m.filter(z=>z.id!==a)),w("")};return e.jsxs(L,{isOpen:t,onClose:f,variant:"form",className:"sm:max-w-[720px]",children:[e.jsx(L.Header,{title:i==="create"?"Create view":"Edit view",onClose:f}),e.jsx(L.Body,{children:e.jsxs("form",{id:"view-section-form",className:"flex flex-col gap-5",onSubmit:a=>{a.preventDefault();const m=pe([N]);if(P&&m.length===0){w("Choose at least one tag, or remove this tag filter.");return}if(y.find(b=>!b.key||!_.has(b.key))){w("Choose a property for every filter.");return}const o=y.map(b=>{const ee=_.get(b.key);return{key:ee?.key??b.key,valueType:ee?.valueType??"text",operator:b.operator,value:ne(b.operator)?b.value:null}});if(o.some(b=>ne(b.operator)&&!b.value?.trim())){w("Fill every filter value, or switch it to is set / is empty.");return}V({title:j,displayType:"list",tagNames:m,mode:h,propertyFilters:o,sortBy:K,sortOrder:Q,limit:Number($)})},children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-title",size:"md",children:"View name"}),e.jsx(ie,{id:"view-section-title",value:j,onChange:a=>O(a.target.value),placeholder:"Doing notes",autoFocus:!0})]}),e.jsxs("section",{className:"flex flex-col gap-3 rounded-[20px] border border-border-subtle bg-subtle/40 p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(A,{size:"md",children:"Filters"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Use properties for structured fields, and tags for loose topics or context."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(k,{type:"button",variant:"subtle",size:"sm",onClick:R,children:"Add property filter"}),!P&&e.jsx(k,{type:"button",variant:"subtle",size:"sm",onClick:E,children:"Add tag filter"})]})]}),y.length===0&&!P?e.jsxs("div",{className:"rounded-[16px] border border-dashed border-border-subtle bg-elevated/60 px-4 py-3",children:[e.jsx(c,{as:"p",variant:"label",tone:"default",children:s?"All notes":"No filters"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Add a property filter, a tag filter, or leave this view open to all notes."})]}):null,y.length>0?e.jsx("div",{className:"flex flex-col gap-2.5",children:y.map(a=>{const m=_.get(a.key),z=Ne(m);return e.jsxs("div",{className:"grid gap-2 rounded-[16px] border border-border-subtle bg-elevated p-3 md:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_auto] md:items-center",children:[e.jsxs(q,{value:a.key||re,onValueChange:o=>{o!==re&&S(a.id,{key:o})},children:[e.jsx(v,{value:re,disabled:!0,children:"Choose property"}),x.map(o=>e.jsx(v,{value:o.key,children:o.name},o.key))]}),e.jsx(q,{value:a.operator,disabled:!m,onValueChange:o=>S(a.id,{operator:o}),children:z.map(o=>e.jsx(v,{value:o,children:at(o)},o))}),ne(a.operator)&&m?m.valueType==="select"?e.jsx(q,{value:a.value,onValueChange:o=>S(a.id,{value:o}),children:m.options.map(o=>e.jsx(v,{value:o.value,children:o.label},o.value))}):m.valueType==="boolean"?e.jsxs(q,{value:a.value||"true",onValueChange:o=>S(a.id,{value:o}),children:[e.jsx(v,{value:"true",children:"True"}),e.jsx(v,{value:"false",children:"False"})]}):e.jsx(ie,{type:m.valueType==="date"?"date":m.valueType==="number"?"number":m.valueType==="url"?"url":"text",value:a.value,onChange:o=>S(a.id,{value:o.target.value}),placeholder:m.valueType==="url"?"https://example.com":m.valueType==="text"?"Value":void 0}):e.jsx(c,{as:"span",variant:"label",tone:"tertiary",children:m?"No value needed":"Choose a property first"}),e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>ze(a.id),children:"Remove"})]},a.id)})}):null,P?e.jsxs("div",{className:"flex flex-col gap-3 rounded-[16px] border border-border-subtle bg-elevated p-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{as:"p",variant:"label",tone:"default",children:"Tag filter"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Match notes by selected tags."})]}),e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:T,children:"Remove"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-tags",size:"sm",children:"Tag names"}),e.jsx(Ie,{id:"view-section-tags",value:N,onChange:a=>{l(a.target.value),w("")},placeholder:"@OceanBrain, @todo",size:"sm"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"You can use tags only, properties only, both together, or no filters."})]}),F.length>1?e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{size:"sm",children:"When multiple tags are selected"}),e.jsxs(qe,{type:"single",value:h,onValueChange:a=>{(a==="and"||a==="or")&&M(a)},variant:"quiet",size:"sm",className:"self-start",children:[e.jsx(oe,{value:"and","aria-label":he("and"),children:"Match all"}),e.jsx(oe,{value:"or","aria-label":he("or"),children:"Match any"})]})]}):null,e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(A,{size:"sm",children:"Existing tags"}),e.jsx(c,{as:"span",variant:"meta",tone:"tertiary",children:p?"Loading...":`${u.length} available`})]}),u.length>0?e.jsx("div",{className:"max-h-44 overflow-y-auto rounded-[16px] border border-border-subtle bg-hover-subtle/60 p-3",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(a=>{const m=F.includes(a.name);return e.jsx("button",{type:"button",className:`inline-flex items-center rounded-full border px-3 py-1.5 text-sm font-medium transition-colors ${m?"border-border-secondary bg-elevated text-fg-default":"border-border-subtle bg-transparent text-fg-secondary hover:border-border-secondary hover:bg-elevated hover:text-fg-default"}`,onClick:()=>d(a.name),children:a.name},a.id)})})}):e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"No tags yet. You can still type tag names manually."})]}):null,e.jsx(c,{as:"p",variant:"meta",tone:U?"default":"tertiary",className:U?"text-fg-error":void 0,children:U||(g||p?"Loading filter options...":`${x.length} properties · ${u.length} tags available`)})]}),e.jsxs("details",{className:"group rounded-[18px] border border-border-subtle bg-elevated px-4 py-3",children:[e.jsx("summary",{className:"cursor-pointer list-none",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(c,{as:"span",variant:"label",tone:"default",children:"Sort and limit"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Defaults to recently updated notes."})]}),e.jsxs(c,{as:"span",variant:"meta",tone:"tertiary",children:[$," notes"]})]})}),e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-sort-by",size:"sm",children:"Sort by"}),e.jsxs(q,{value:K,onValueChange:a=>Z(a),children:[e.jsx(v,{value:"updatedAt",children:"Updated time"}),e.jsx(v,{value:"createdAt",children:"Created time"}),e.jsx(v,{value:"title",children:"Title"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-sort-order",size:"sm",children:"Order"}),e.jsxs(q,{value:Q,onValueChange:a=>Y(a),children:[e.jsx(v,{value:"desc",children:"Descending"}),e.jsx(v,{value:"asc",children:"Ascending"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-limit",size:"sm",children:"Max notes"}),e.jsxs(q,{value:$,onValueChange:C,children:[e.jsx(v,{value:"3",children:"3 notes"}),e.jsx(v,{value:"5",children:"5 notes"}),e.jsx(v,{value:"8",children:"8 notes"}),e.jsx(v,{value:"10",children:"10 notes"}),e.jsx(v,{value:"12",children:"12 notes"})]})]})]})]})]})}),e.jsx(L.Footer,{children:e.jsxs(Ce,{children:[e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:f,children:"Cancel"}),e.jsx(k,{type:"submit",size:"sm",form:"view-section-form",children:i==="create"?"Create view":"Save view"})]})})]})}function Tt({open:t,mode:i,initialTitle:n="",onClose:u,onSubmit:x}){const[p,g]=r.useState(n);return r.useEffect(()=>{t&&g(n)},[n,t]),e.jsxs(L,{isOpen:t,onClose:u,variant:"form",className:"sm:max-w-[480px]",children:[e.jsx(L.Header,{title:i==="create"?"Create view tab":"Rename view tab",onClose:u}),e.jsx(L.Body,{children:e.jsxs("form",{id:"view-tab-form",className:"flex flex-col gap-4",onSubmit:f=>{f.preventDefault(),x(p)},children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-tab-title",size:"md",children:"Tab name"}),e.jsx(ie,{id:"view-tab-title",value:p,onChange:f=>g(f.target.value),placeholder:"Now",autoFocus:!0})]}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"Each tab is one saved view inside the Views page."})]})}),e.jsx(L.Footer,{children:e.jsxs(Ce,{children:[e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:u,children:"Cancel"}),e.jsx(k,{type:"submit",size:"sm",form:"view-tab-form",children:i==="create"?"Create tab":"Save tab"})]})})]})}const St="Save reusable note queries with tags, shared properties, and sorting.",Ct="focus-ring-soft inline-flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-default/70 outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default touch-none",Vt="group relative -mb-px flex h-10 min-w-[92px] max-w-[118px] shrink-0 items-center gap-0.5 rounded-t-[12px] border border-b-0 px-1.5 transition-[background-color,border-color,color,box-shadow]",Ft="focus-ring-soft inline-flex min-w-0 flex-1 items-center gap-1 rounded-[9px] px-0.5 py-1.5 text-[13px] font-medium outline-none",Et="focus-ring-soft inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] text-current/55 outline-none transition-[background-color,color,opacity] hover:bg-hover-subtle hover:text-current touch-none",Dt="focus-ring-soft relative mb-0.5 inline-flex h-9 shrink-0 items-center gap-1 rounded-[10px] px-2.5 text-[13px] font-medium text-fg-secondary outline-none transition-colors hover:bg-hover-subtle/85 hover:text-fg-default",At=({tab:t,isActive:i,onSelect:n})=>{const{attributes:u,listeners:x,setNodeRef:p,setActivatorNodeRef:g,transform:f,transition:V,isDragging:j}=Ve({id:t.id});return e.jsxs("div",{ref:p,style:{transform:Ee.Transform.toString(f),transition:V,opacity:j?.6:1},className:J(Vt,i?"z-10 border-border-secondary/75 bg-elevated text-fg-default shadow-[0_10px_18px_-20px_rgba(15,18,24,0.24)]":"border-transparent bg-hover-subtle/45 text-fg-secondary hover:bg-hover-subtle/75 hover:text-fg-default"),children:[e.jsx("button",{type:"button",ref:g,"aria-label":`Reorder view tab ${t.title}`,...u,...x,className:J(Et,j?"cursor-grabbing opacity-100":"cursor-grab opacity-70 group-hover:opacity-100"),children:e.jsx(Fe,{className:"size-4"})}),e.jsxs("button",{type:"button",role:"tab","aria-selected":i,className:J(Ft,i?"text-fg-default":"text-fg-secondary group-hover:text-fg-default"),onClick:n,children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.title}),e.jsx("span",{className:"inline-flex min-w-4 shrink-0 items-center justify-center rounded-full bg-hover-subtle/75 px-1 py-0 text-[10px] leading-4 text-current/70",children:t.sections.length})]})]})},zt=({section:t,onEdit:i,onDelete:n})=>{const{attributes:u,listeners:x,setNodeRef:p,setActivatorNodeRef:g,transform:f,transition:V,isDragging:j}=Ve({id:t.id});return e.jsx("div",{ref:p,style:{transform:Ee.Transform.toString(f),transition:V,opacity:j?.6:1},children:e.jsx(wt,{section:t,onEdit:i,onDelete:n,dragHandle:e.jsx("button",{type:"button",ref:g,"aria-label":`Reorder section ${t.title}`,...u,...x,className:J(Ct,j?"cursor-grabbing":"cursor-grab"),children:e.jsx(Fe,{className:"size-4"})})})})};function _t(){const t=Oe(),i=Je(),n=We(),[u,x]=r.useState(null),[p,g]=r.useState(null),{data:f,isPending:V,isError:j,refetch:O}=G({queryKey:D.views.workspace(),async queryFn(){const s=await rt();if(s.type==="error")throw s;return s.viewWorkspace}}),N=f??it,l=nt(N),{data:h,isPending:M}=G({queryKey:D.tags.list({limit:200}),async queryFn(){const s=await _e({limit:200});if(s.type==="error")throw s;return s.allTags}}),K=Pe(de($e,{activationConstraint:{distance:8}}),de(Ke,{coordinateGetter:He})),Z=h?.tags??[],{data:Q,isPending:Y}=G({queryKey:D.notes.propertyKeys({limit:100}),async queryFn(){const s=await Be({limit:100});if(s.type==="error")throw s;return s.notePropertyKeys}}),$=Q?.keys??[],C=s=>{n.setQueryData(D.views.workspace(),s)},y=async()=>{await n.invalidateQueries({queryKey:D.views.all(),exact:!1})},W=async({active:s,over:d})=>{if(!d||s.id===d.id)return;const E=n.getQueryData(D.views.workspace())??N,T=dt(E,String(s.id),String(d.id));C(T);const R=await ct(T.tabs.map(S=>S.id));if(R.type==="error"){C(E),i(R.errors[0].message);return}await y()},X=async({active:s,over:d})=>{if(!l||!d||s.id===d.id)return;const E=n.getQueryData(D.views.workspace())??N,T=mt(E,l.id,String(s.id),String(d.id));C(T);const R=await ut(l.id,T.tabs.find(S=>S.id===l.id)?.sections.map(S=>S.id)??[]);if(R.type==="error"){C(E),i(R.errors[0].message);return}await y()},B=async s=>{const d=await xt(s);if(d.type==="error"){i(d.errors[0].message);return}await y(),x(null)},U=async s=>{if(!l)return;const d=await pt(l.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),x(null)},w=async()=>{if(!l||!await t("Delete this view tab and all of its sections?"))return;const s=await ht(l.id);if(s.type==="error"){i(s.errors[0].message);return}await y()},_=async s=>{if(!l)return;const d=await gt(l.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),g(null)},F=async s=>{if(!l||!p||p.mode!=="edit")return;const d=await ft(p.section.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),g(null)},P=async s=>{if(!l||!await t("Delete this section from the current view tab?"))return;const d=await bt(s);if(d.type==="error"){i(d.errors[0].message);return}await y()};return e.jsxs(e.Fragment,{children:[e.jsx(Ue,{title:"Views",description:St,children:V&&!f?e.jsx(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{height:20,width:180,className:"rounded-full"}),e.jsx(se,{height:16,width:260,className:"rounded-full"}),e.jsx(se,{height:44,width:140,className:"rounded-[12px]"})]})}):j?e.jsxs(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"Failed to load saved views"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Retry loading your saved view tabs."}),e.jsx("div",{className:"mt-4",children:e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>{O()},children:"Retry"})})]}):N.tabs.length===0?e.jsxs(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:[e.jsx(ce,{title:"Create your first view tab",description:"Start with a saved view tab, then add sections that query notes by tags, properties, or both."}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsxs(k,{type:"button",onClick:()=>x({mode:"create"}),children:[e.jsx(ae,{className:"h-4 w-4"}),"Create first tab"]})})]}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"border-b border-border-secondary/75",children:e.jsx(me,{sensors:K,collisionDetection:ue,modifiers:[Ze],onDragEnd:W,children:e.jsxs("div",{className:"flex items-end gap-1 overflow-x-auto overflow-y-hidden pb-px",children:[e.jsx(xe,{items:N.tabs.map(s=>s.id),strategy:Qe,children:e.jsx("div",{role:"tablist","aria-label":"Views tab list",className:"flex min-w-0 items-end gap-1",children:N.tabs.map(s=>e.jsx(At,{tab:s,isActive:s.id===l?.id,onSelect:async()=>{const d=n.getQueryData(D.views.workspace())??N,E=lt(d,s.id);C(E);const T=await ot(s.id);if(T.type==="error"){C(d),i(T.errors[0].message);return}C(T.setActiveViewTab)}},s.id))})}),e.jsxs("button",{type:"button",className:Dt,onClick:()=>x({mode:"create"}),children:[e.jsx(ae,{className:"size-4"}),"Add tab"]})]})})}),l&&e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(H,{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsx(c,{as:"h2",variant:"heading",weight:"bold",tracking:"tight",children:l.title}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:l.sections.length>0?`${l.sections.length} section${l.sections.length===1?"":"s"} in this view`:"Add sections to build this view"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs(k,{type:"button",size:"sm",onClick:()=>g({mode:"create"}),children:[e.jsx(ae,{className:"h-4 w-4"}),"Add section"]}),e.jsx(Te,{button:e.jsx(Se,{label:"View tab actions"}),items:[{name:"Rename",onClick:()=>x({mode:"edit",tab:l})},{type:"separator"},{name:"Delete tab",onClick:()=>{w()}}]})]})]}),l.sections.length===0?e.jsx(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:e.jsx(ce,{title:"Add the first section to this tab",description:"Sections can pull notes by tags, properties, or both."})}):e.jsx("div",{className:"flex flex-col",children:e.jsx(me,{sensors:K,collisionDetection:ue,modifiers:[Ye],onDragEnd:X,children:e.jsx(xe,{items:l.sections.map(s=>s.id),strategy:Ge,children:e.jsx("div",{className:"flex flex-col gap-4",children:l.sections.map(s=>e.jsx(zt,{section:s,onEdit:()=>g({mode:"edit",section:s}),onDelete:()=>{P(s.id)}},s.id))})})})})]})]})}),e.jsx(Tt,{open:u!==null,mode:u?.mode??"create",initialTitle:u?.mode==="edit"?u.tab.title:"",onClose:()=>x(null),onSubmit:s=>{if(u?.mode==="edit"){U(s);return}B(s)}}),e.jsx(kt,{open:p!==null,mode:p?.mode??"create",initialSection:p?.mode==="edit"?p.section:null,availableTags:Z,availableProperties:$,isTagsLoading:M,isPropertiesLoading:Y,onClose:()=>g(null),onSubmit:s=>{if(p?.mode==="edit"){F(s);return}_(s)}})]})}export{_t as default};
1
+ import{j as e}from"./note-vendor-uuJO2MTD.js";import{p as Le,u as G,q as D,T as c,L as te,V as le,D as Te,k as Se,B as k,N as Me,t as Re,M as L,l as A,I as ie,S as q,e as v,m as Ie,n as qe,o as oe,r as Ce,v as Oe,w as We,x as _e,y as Pe,z as de,A as He,K as Ke,E as $e,F as Be,P as Ue,i as se,G as ce,H as me,J as Ze,O as ue,Q as xe,R as Qe,U as Ye,W as Ge,X as Je,Y as Ve,Z as Fe,c as J,_ as Ee}from"./index-nYj7BL3a.js";import{a as r}from"./graph-vendor-CUxe67Lr.js";import{b as Xe,f as et,g as tt,a as st,n as pe,c as at,d as he,e as rt,h as nt,E as it,s as lt,i as ot,r as dt,j as ct,k as mt,l as ut,m as xt,u as pt,o as ht,p as gt,q as ft,t as bt}from"./view-dashboard-B5fKgvk_.js";import{S as H}from"./SurfaceCard-FhlC8VSR.js";import{n as ae}from"./Plus.es-BKm7uDYu.js";import"./note-core-DMZcZ4yV.js";const vt=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),r.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),De=r.forwardRef((t,i)=>r.createElement(Le,{ref:i,...t,weights:vt}));De.displayName="ArrowRightIcon";const yt=De,jt="flex items-start justify-between gap-3 rounded-[14px] border border-border-subtle/70 px-3 py-2.5 transition-colors hover:border-border-secondary hover:bg-hover-subtle";function wt({section:t,onEdit:i,onDelete:n,dragHandle:u}){const x=Xe(t),{data:p,isPending:g,isError:f,refetch:V}=G({queryKey:D.views.sectionNotes(t.id,{limit:t.limit,offset:0}),async queryFn(){const h=await et(t.id,{limit:t.limit,offset:0});if(h.type==="error")throw h;return h.viewSectionNotes}}),j=p?.notes??[],O=p?.totalCount??0,N=tt(t.mode),l=t.tagNames.length>0||t.propertyFilters.length>0;return e.jsxs(H,{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[u&&e.jsx("div",{className:"-mr-1 shrink-0 self-center",children:u}),e.jsx("div",{className:"min-w-0",children:e.jsx(c,{as:"h2",variant:"subheading",weight:"semibold",tracking:"tight",className:"min-w-0",children:e.jsx(te,{to:le,search:x,className:"truncate hover:text-fg-default/85",children:t.title})})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[t.tagNames.map((h,M)=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[M>0&&e.jsx("span",{className:"px-0.5 text-[10px] font-semibold tracking-[0.08em] text-fg-tertiary/85",children:N}),e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-transparent px-2.5 py-1 text-xs font-medium text-fg-secondary",children:h})]},h)),t.propertyFilters.map(h=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-subtle px-2.5 py-1 text-xs font-medium text-fg-secondary",children:st(h)},`${h.key}-${h.operator}-${h.value??""}`)),!l&&e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle/80 bg-transparent px-2.5 py-1 text-xs font-medium text-fg-tertiary",children:"All notes"})]})]}),e.jsx("div",{className:"shrink-0",children:e.jsx(Te,{button:e.jsx(Se,{label:"Section actions"}),items:[{name:"Edit section",onClick:i},{type:"separator"},{name:"Delete section",onClick:n}]})})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[g&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"}),e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"}),e.jsx("div",{className:"h-14 animate-pulse rounded-[14px] bg-hover-subtle"})]}),f&&e.jsxs("div",{className:"rounded-[16px] border border-border-subtle bg-hover-subtle/70 p-4",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"Failed to load this section"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Retry to refresh this saved query."}),e.jsx("div",{className:"mt-3",children:e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>V(),children:"Retry"})})]}),!g&&!f&&j.length===0&&e.jsxs("div",{className:"rounded-[16px] border border-dashed border-border-subtle px-4 py-5",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"No notes match yet"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Add matching notes, or edit this view query."})]}),!g&&!f&&j.map(h=>e.jsxs(te,{to:Me,params:{id:h.id},className:jt,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{as:"div",variant:"body",weight:"semibold",className:"line-clamp-1",children:h.title||"Untitled"}),e.jsxs(c,{as:"div",variant:"meta",tone:"tertiary",className:"mt-1",children:["Updated ",Re(Number(h.updatedAt))]})]}),e.jsx(yt,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary"})]},h.id))]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-border-subtle/70 pt-4",children:[e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:g?"Loading notes...":`Showing ${j.length} of ${O} notes`}),e.jsx(k,{asChild:!0,variant:"subtle",size:"sm",children:e.jsx(te,{to:le,search:x,children:"Open list"})})]})]})}const re="__choose_property__",ge=t=>String(t?.limit??5),fe=t=>t?.mode??"and",be=t=>t?t.tagNames.join(", "):"",ve=t=>t?.title??"",ye=t=>t?.sortBy??"updatedAt",je=t=>t?.sortOrder??"desc",Ae=t=>`property-filter-${Date.now()}-${t}`,we=t=>(t?.propertyFilters??[]).map((i,n)=>({id:Ae(n),key:i.key,operator:i.operator,value:i.value??""})),Ne=t=>t?t.valueType==="date"||t.valueType==="number"?["equals","before","after","exists","notExists"]:["equals","exists","notExists"]:["exists","notExists"],ke=t=>t?"equals":"exists",Nt=t=>t?t.valueType==="boolean"?"true":t.valueType==="select"?t.options[0]?.value??"":"":"",ne=t=>t!=="exists"&&t!=="notExists";function kt({open:t,mode:i,initialSection:n=null,availableTags:u,availableProperties:x,isTagsLoading:p=!1,isPropertiesLoading:g=!1,onClose:f,onSubmit:V}){const[j,O]=r.useState(ve(n)),[N,l]=r.useState(be(n)),[h,M]=r.useState(fe(n)),[K,Z]=r.useState(ye(n)),[Q,Y]=r.useState(je(n)),[$,C]=r.useState(ge(n)),[y,W]=r.useState(we(n)),[X,B]=r.useState((n?.tagNames.length??0)>0),[U,w]=r.useState(""),_=r.useMemo(()=>new Map(x.map(a=>[a.key,a])),[x]);r.useEffect(()=>{t&&(O(ve(n)),l(be(n)),M(fe(n)),Z(ye(n)),Y(je(n)),C(ge(n)),W(we(n)),B((n?.tagNames.length??0)>0),w(""))},[n,t]);const F=pe([N]),P=X||F.length>0,s=F.length===0&&y.length===0,d=a=>{const m=F.includes(a)?F.filter(z=>z!==a):[...F,a];l(m.join(", ")),w("")},E=()=>{B(!0),w("")},T=()=>{l(""),M("and"),B(!1),w("")},R=()=>{if(x.length===0){w("Create a shared property before adding a filter.");return}W(a=>[...a,{id:Ae(a.length),key:"",operator:"exists",value:""}]),w("")},S=(a,m)=>{W(z=>z.map(o=>{if(o.id!==a)return o;const I={...o,...m},b=_.get(I.key);return Ne(b).includes(I.operator)||(I.operator=ke(b)),"key"in m&&(I.value=Nt(b),I.operator=ke(b)),I})),w("")},ze=a=>{W(m=>m.filter(z=>z.id!==a)),w("")};return e.jsxs(L,{isOpen:t,onClose:f,variant:"form",className:"sm:max-w-[720px]",children:[e.jsx(L.Header,{title:i==="create"?"Create view":"Edit view",onClose:f}),e.jsx(L.Body,{children:e.jsxs("form",{id:"view-section-form",className:"flex flex-col gap-5",onSubmit:a=>{a.preventDefault();const m=pe([N]);if(P&&m.length===0){w("Choose at least one tag, or remove this tag filter.");return}if(y.find(b=>!b.key||!_.has(b.key))){w("Choose a property for every filter.");return}const o=y.map(b=>{const ee=_.get(b.key);return{key:ee?.key??b.key,valueType:ee?.valueType??"text",operator:b.operator,value:ne(b.operator)?b.value:null}});if(o.some(b=>ne(b.operator)&&!b.value?.trim())){w("Fill every filter value, or switch it to is set / is empty.");return}V({title:j,displayType:"list",tagNames:m,mode:h,propertyFilters:o,sortBy:K,sortOrder:Q,limit:Number($)})},children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-title",size:"md",children:"View name"}),e.jsx(ie,{id:"view-section-title",value:j,onChange:a=>O(a.target.value),placeholder:"Doing notes",autoFocus:!0})]}),e.jsxs("section",{className:"flex flex-col gap-3 rounded-[20px] border border-border-subtle bg-subtle/40 p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(A,{size:"md",children:"Filters"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Use properties for structured fields, and tags for loose topics or context."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(k,{type:"button",variant:"subtle",size:"sm",onClick:R,children:"Add property filter"}),!P&&e.jsx(k,{type:"button",variant:"subtle",size:"sm",onClick:E,children:"Add tag filter"})]})]}),y.length===0&&!P?e.jsxs("div",{className:"rounded-[16px] border border-dashed border-border-subtle bg-elevated/60 px-4 py-3",children:[e.jsx(c,{as:"p",variant:"label",tone:"default",children:s?"All notes":"No filters"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Add a property filter, a tag filter, or leave this view open to all notes."})]}):null,y.length>0?e.jsx("div",{className:"flex flex-col gap-2.5",children:y.map(a=>{const m=_.get(a.key),z=Ne(m);return e.jsxs("div",{className:"grid gap-2 rounded-[16px] border border-border-subtle bg-elevated p-3 md:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_auto] md:items-center",children:[e.jsxs(q,{value:a.key||re,onValueChange:o=>{o!==re&&S(a.id,{key:o})},children:[e.jsx(v,{value:re,disabled:!0,children:"Choose property"}),x.map(o=>e.jsx(v,{value:o.key,children:o.name},o.key))]}),e.jsx(q,{value:a.operator,disabled:!m,onValueChange:o=>S(a.id,{operator:o}),children:z.map(o=>e.jsx(v,{value:o,children:at(o)},o))}),ne(a.operator)&&m?m.valueType==="select"?e.jsx(q,{value:a.value,onValueChange:o=>S(a.id,{value:o}),children:m.options.map(o=>e.jsx(v,{value:o.value,children:o.label},o.value))}):m.valueType==="boolean"?e.jsxs(q,{value:a.value||"true",onValueChange:o=>S(a.id,{value:o}),children:[e.jsx(v,{value:"true",children:"True"}),e.jsx(v,{value:"false",children:"False"})]}):e.jsx(ie,{type:m.valueType==="date"?"date":m.valueType==="number"?"number":m.valueType==="url"?"url":"text",value:a.value,onChange:o=>S(a.id,{value:o.target.value}),placeholder:m.valueType==="url"?"https://example.com":m.valueType==="text"?"Value":void 0}):e.jsx(c,{as:"span",variant:"label",tone:"tertiary",children:m?"No value needed":"Choose a property first"}),e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>ze(a.id),children:"Remove"})]},a.id)})}):null,P?e.jsxs("div",{className:"flex flex-col gap-3 rounded-[16px] border border-border-subtle bg-elevated p-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{as:"p",variant:"label",tone:"default",children:"Tag filter"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Match notes by selected tags."})]}),e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:T,children:"Remove"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-tags",size:"sm",children:"Tag names"}),e.jsx(Ie,{id:"view-section-tags",value:N,onChange:a=>{l(a.target.value),w("")},placeholder:"@OceanBrain, @todo",size:"sm"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"You can use tags only, properties only, both together, or no filters."})]}),F.length>1?e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{size:"sm",children:"When multiple tags are selected"}),e.jsxs(qe,{type:"single",value:h,onValueChange:a=>{(a==="and"||a==="or")&&M(a)},variant:"quiet",size:"sm",className:"self-start",children:[e.jsx(oe,{value:"and","aria-label":he("and"),children:"Match all"}),e.jsx(oe,{value:"or","aria-label":he("or"),children:"Match any"})]})]}):null,e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(A,{size:"sm",children:"Existing tags"}),e.jsx(c,{as:"span",variant:"meta",tone:"tertiary",children:p?"Loading...":`${u.length} available`})]}),u.length>0?e.jsx("div",{className:"max-h-44 overflow-y-auto rounded-[16px] border border-border-subtle bg-hover-subtle/60 p-3",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(a=>{const m=F.includes(a.name);return e.jsx("button",{type:"button",className:`inline-flex items-center rounded-full border px-3 py-1.5 text-sm font-medium transition-colors ${m?"border-border-secondary bg-elevated text-fg-default":"border-border-subtle bg-transparent text-fg-secondary hover:border-border-secondary hover:bg-elevated hover:text-fg-default"}`,onClick:()=>d(a.name),children:a.name},a.id)})})}):e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"No tags yet. You can still type tag names manually."})]}):null,e.jsx(c,{as:"p",variant:"meta",tone:U?"default":"tertiary",className:U?"text-fg-error":void 0,children:U||(g||p?"Loading filter options...":`${x.length} properties · ${u.length} tags available`)})]}),e.jsxs("details",{className:"group rounded-[18px] border border-border-subtle bg-elevated px-4 py-3",children:[e.jsx("summary",{className:"cursor-pointer list-none",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(c,{as:"span",variant:"label",tone:"default",children:"Sort and limit"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Defaults to recently updated notes."})]}),e.jsxs(c,{as:"span",variant:"meta",tone:"tertiary",children:[$," notes"]})]})}),e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-sort-by",size:"sm",children:"Sort by"}),e.jsxs(q,{value:K,onValueChange:a=>Z(a),children:[e.jsx(v,{value:"updatedAt",children:"Updated time"}),e.jsx(v,{value:"createdAt",children:"Created time"}),e.jsx(v,{value:"title",children:"Title"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-sort-order",size:"sm",children:"Order"}),e.jsxs(q,{value:Q,onValueChange:a=>Y(a),children:[e.jsx(v,{value:"desc",children:"Descending"}),e.jsx(v,{value:"asc",children:"Ascending"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-section-limit",size:"sm",children:"Max notes"}),e.jsxs(q,{value:$,onValueChange:C,children:[e.jsx(v,{value:"3",children:"3 notes"}),e.jsx(v,{value:"5",children:"5 notes"}),e.jsx(v,{value:"8",children:"8 notes"}),e.jsx(v,{value:"10",children:"10 notes"}),e.jsx(v,{value:"12",children:"12 notes"})]})]})]})]})]})}),e.jsx(L.Footer,{children:e.jsxs(Ce,{children:[e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:f,children:"Cancel"}),e.jsx(k,{type:"submit",size:"sm",form:"view-section-form",children:i==="create"?"Create view":"Save view"})]})})]})}function Tt({open:t,mode:i,initialTitle:n="",onClose:u,onSubmit:x}){const[p,g]=r.useState(n);return r.useEffect(()=>{t&&g(n)},[n,t]),e.jsxs(L,{isOpen:t,onClose:u,variant:"form",className:"sm:max-w-[480px]",children:[e.jsx(L.Header,{title:i==="create"?"Create view tab":"Rename view tab",onClose:u}),e.jsx(L.Body,{children:e.jsxs("form",{id:"view-tab-form",className:"flex flex-col gap-4",onSubmit:f=>{f.preventDefault(),x(p)},children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(A,{htmlFor:"view-tab-title",size:"md",children:"Tab name"}),e.jsx(ie,{id:"view-tab-title",value:p,onChange:f=>g(f.target.value),placeholder:"Now",autoFocus:!0})]}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",children:"Each tab is one saved view inside the Views page."})]})}),e.jsx(L.Footer,{children:e.jsxs(Ce,{children:[e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:u,children:"Cancel"}),e.jsx(k,{type:"submit",size:"sm",form:"view-tab-form",children:i==="create"?"Create tab":"Save tab"})]})})]})}const St="Save reusable note queries with tags, shared properties, and sorting.",Ct="focus-ring-soft inline-flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-default/70 outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default touch-none",Vt="group relative -mb-px flex h-10 min-w-[92px] max-w-[118px] shrink-0 items-center gap-0.5 rounded-t-[12px] border border-b-0 px-1.5 transition-[background-color,border-color,color,box-shadow]",Ft="focus-ring-soft inline-flex min-w-0 flex-1 items-center gap-1 rounded-[9px] px-0.5 py-1.5 text-[13px] font-medium outline-none",Et="focus-ring-soft inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] text-current/55 outline-none transition-[background-color,color,opacity] hover:bg-hover-subtle hover:text-current touch-none",Dt="focus-ring-soft relative mb-0.5 inline-flex h-9 shrink-0 items-center gap-1 rounded-[10px] px-2.5 text-[13px] font-medium text-fg-secondary outline-none transition-colors hover:bg-hover-subtle/85 hover:text-fg-default",At=({tab:t,isActive:i,onSelect:n})=>{const{attributes:u,listeners:x,setNodeRef:p,setActivatorNodeRef:g,transform:f,transition:V,isDragging:j}=Ve({id:t.id});return e.jsxs("div",{ref:p,style:{transform:Ee.Transform.toString(f),transition:V,opacity:j?.6:1},className:J(Vt,i?"z-10 border-border-secondary/75 bg-elevated text-fg-default shadow-[0_10px_18px_-20px_rgba(15,18,24,0.24)]":"border-transparent bg-hover-subtle/45 text-fg-secondary hover:bg-hover-subtle/75 hover:text-fg-default"),children:[e.jsx("button",{type:"button",ref:g,"aria-label":`Reorder view tab ${t.title}`,...u,...x,className:J(Et,j?"cursor-grabbing opacity-100":"cursor-grab opacity-70 group-hover:opacity-100"),children:e.jsx(Fe,{className:"size-4"})}),e.jsxs("button",{type:"button",role:"tab","aria-selected":i,className:J(Ft,i?"text-fg-default":"text-fg-secondary group-hover:text-fg-default"),onClick:n,children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.title}),e.jsx("span",{className:"inline-flex min-w-4 shrink-0 items-center justify-center rounded-full bg-hover-subtle/75 px-1 py-0 text-[10px] leading-4 text-current/70",children:t.sections.length})]})]})},zt=({section:t,onEdit:i,onDelete:n})=>{const{attributes:u,listeners:x,setNodeRef:p,setActivatorNodeRef:g,transform:f,transition:V,isDragging:j}=Ve({id:t.id});return e.jsx("div",{ref:p,style:{transform:Ee.Transform.toString(f),transition:V,opacity:j?.6:1},children:e.jsx(wt,{section:t,onEdit:i,onDelete:n,dragHandle:e.jsx("button",{type:"button",ref:g,"aria-label":`Reorder section ${t.title}`,...u,...x,className:J(Ct,j?"cursor-grabbing":"cursor-grab"),children:e.jsx(Fe,{className:"size-4"})})})})};function _t(){const t=Oe(),i=Je(),n=We(),[u,x]=r.useState(null),[p,g]=r.useState(null),{data:f,isPending:V,isError:j,refetch:O}=G({queryKey:D.views.workspace(),async queryFn(){const s=await rt();if(s.type==="error")throw s;return s.viewWorkspace}}),N=f??it,l=nt(N),{data:h,isPending:M}=G({queryKey:D.tags.list({limit:200}),async queryFn(){const s=await _e({limit:200});if(s.type==="error")throw s;return s.allTags}}),K=Pe(de($e,{activationConstraint:{distance:8}}),de(Ke,{coordinateGetter:He})),Z=h?.tags??[],{data:Q,isPending:Y}=G({queryKey:D.notes.propertyKeys({limit:100}),async queryFn(){const s=await Be({limit:100});if(s.type==="error")throw s;return s.notePropertyKeys}}),$=Q?.keys??[],C=s=>{n.setQueryData(D.views.workspace(),s)},y=async()=>{await n.invalidateQueries({queryKey:D.views.all(),exact:!1})},W=async({active:s,over:d})=>{if(!d||s.id===d.id)return;const E=n.getQueryData(D.views.workspace())??N,T=dt(E,String(s.id),String(d.id));C(T);const R=await ct(T.tabs.map(S=>S.id));if(R.type==="error"){C(E),i(R.errors[0].message);return}await y()},X=async({active:s,over:d})=>{if(!l||!d||s.id===d.id)return;const E=n.getQueryData(D.views.workspace())??N,T=mt(E,l.id,String(s.id),String(d.id));C(T);const R=await ut(l.id,T.tabs.find(S=>S.id===l.id)?.sections.map(S=>S.id)??[]);if(R.type==="error"){C(E),i(R.errors[0].message);return}await y()},B=async s=>{const d=await xt(s);if(d.type==="error"){i(d.errors[0].message);return}await y(),x(null)},U=async s=>{if(!l)return;const d=await pt(l.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),x(null)},w=async()=>{if(!l||!await t("Delete this view tab and all of its sections?"))return;const s=await ht(l.id);if(s.type==="error"){i(s.errors[0].message);return}await y()},_=async s=>{if(!l)return;const d=await gt(l.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),g(null)},F=async s=>{if(!l||!p||p.mode!=="edit")return;const d=await ft(p.section.id,s);if(d.type==="error"){i(d.errors[0].message);return}await y(),g(null)},P=async s=>{if(!l||!await t("Delete this section from the current view tab?"))return;const d=await bt(s);if(d.type==="error"){i(d.errors[0].message);return}await y()};return e.jsxs(e.Fragment,{children:[e.jsx(Ue,{title:"Views",description:St,children:V&&!f?e.jsx(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{height:20,width:180,className:"rounded-full"}),e.jsx(se,{height:16,width:260,className:"rounded-full"}),e.jsx(se,{height:44,width:140,className:"rounded-[12px]"})]})}):j?e.jsxs(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:[e.jsx(c,{as:"p",variant:"body",weight:"semibold",children:"Failed to load saved views"}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:"Retry loading your saved view tabs."}),e.jsx("div",{className:"mt-4",children:e.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:()=>{O()},children:"Retry"})})]}):N.tabs.length===0?e.jsxs(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:[e.jsx(ce,{title:"Create your first view tab",description:"Start with a saved view tab, then add sections that query notes by tags, properties, or both."}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsxs(k,{type:"button",onClick:()=>x({mode:"create"}),children:[e.jsx(ae,{className:"h-4 w-4"}),"Create first tab"]})})]}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"border-b border-border-secondary/75",children:e.jsx(me,{sensors:K,collisionDetection:ue,modifiers:[Ze],onDragEnd:W,children:e.jsxs("div",{className:"flex items-end gap-1 overflow-x-auto overflow-y-hidden pb-px",children:[e.jsx(xe,{items:N.tabs.map(s=>s.id),strategy:Qe,children:e.jsx("div",{role:"tablist","aria-label":"Views tab list",className:"flex min-w-0 items-end gap-1",children:N.tabs.map(s=>e.jsx(At,{tab:s,isActive:s.id===l?.id,onSelect:async()=>{const d=n.getQueryData(D.views.workspace())??N,E=lt(d,s.id);C(E);const T=await ot(s.id);if(T.type==="error"){C(d),i(T.errors[0].message);return}C(T.setActiveViewTab)}},s.id))})}),e.jsxs("button",{type:"button",className:Dt,onClick:()=>x({mode:"create"}),children:[e.jsx(ae,{className:"size-4"}),"Add tab"]})]})})}),l&&e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(H,{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsx(c,{as:"h2",variant:"heading",weight:"bold",tracking:"tight",children:l.title}),e.jsx(c,{as:"p",variant:"meta",tone:"tertiary",className:"mt-1",children:l.sections.length>0?`${l.sections.length} section${l.sections.length===1?"":"s"} in this view`:"Add sections to build this view"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs(k,{type:"button",size:"sm",onClick:()=>g({mode:"create"}),children:[e.jsx(ae,{className:"h-4 w-4"}),"Add section"]}),e.jsx(Te,{button:e.jsx(Se,{label:"View tab actions"}),items:[{name:"Rename",onClick:()=>x({mode:"edit",tab:l})},{type:"separator"},{name:"Delete tab",onClick:()=>{w()}}]})]})]}),l.sections.length===0?e.jsx(H,{className:"px-6 py-8 sm:px-8 sm:py-10",children:e.jsx(ce,{title:"Add the first section to this tab",description:"Sections can pull notes by tags, properties, or both."})}):e.jsx("div",{className:"flex flex-col",children:e.jsx(me,{sensors:K,collisionDetection:ue,modifiers:[Ye],onDragEnd:X,children:e.jsx(xe,{items:l.sections.map(s=>s.id),strategy:Ge,children:e.jsx("div",{className:"flex flex-col gap-4",children:l.sections.map(s=>e.jsx(zt,{section:s,onEdit:()=>g({mode:"edit",section:s}),onDelete:()=>{P(s.id)}},s.id))})})})})]})]})}),e.jsx(Tt,{open:u!==null,mode:u?.mode??"create",initialTitle:u?.mode==="edit"?u.tab.title:"",onClose:()=>x(null),onSubmit:s=>{if(u?.mode==="edit"){U(s);return}B(s)}}),e.jsx(kt,{open:p!==null,mode:p?.mode??"create",initialSection:p?.mode==="edit"?p.section:null,availableTags:Z,availableProperties:$,isTagsLoading:M,isPropertiesLoading:Y,onClose:()=>g(null),onSubmit:s=>{if(p?.mode==="edit"){F(s);return}_(s)}})]})}export{_t as default};
@@ -1,4 +1,4 @@
1
- import{h as t,aR as n}from"./index-DYlYUrjH.js";function o({limit:a=50,offset:e=0}={}){return t(`query FetchImages($pagination: PaginationInput) {
1
+ import{h as t,aR as n}from"./index-nYj7BL3a.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 {
@@ -1 +1 @@
1
- import{j as e}from"./note-vendor-i1M2FSI2.js";import{p as h,a5 as p,P as f,T as t,L as c,aN as u,g as o,aw as v,aO as j,aI as M,aK as N,aP as E,aQ as w}from"./index-DYlYUrjH.js";import{a}from"./graph-vendor-CUxe67Lr.js";import{c as y,n as H}from"./Trash.es-C5x35NKF.js";import{I as b}from"./Image.es-B0LL3pb7.js";import"./note-core-Z6kqulGB.js";const T=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z",opacity:"0.2"}),a.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z"}))]]),F=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),V=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),A=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:T}));A.displayName="MoonIcon";const S=A,g=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:F}));g.displayName="PaletteIcon";const k=g,Z=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:V}));Z.displayName="SunIcon";const C=Z,G=()=>{const{theme:s,toggleTheme:r}=p(x=>x),l="focus-ring-soft surface-base group flex items-start justify-between gap-3.5 px-4 py-3.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",n="inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-[15px] border border-border-subtle bg-muted text-fg-secondary transition-colors group-hover:border-border-secondary/70 group-hover:text-fg-default",m="h-6 w-6",d="text-fg-tertiary",i="min-w-0 flex flex-col gap-0.5 pt-0.5";return e.jsx(f,{title:"Settings",description:"Manage appearance, integrations, and workspace tools",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Appearance"}),e.jsxs("button",{type:"button",className:l,onClick:r,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(k,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Theme"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Switch between light and dark mode."})]})]}),e.jsxs("div",{className:"mt-0.5 flex shrink-0 items-center gap-2 text-fg-tertiary",children:[e.jsx(t,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:s==="dark"?"Dark":"Light"}),s==="dark"?e.jsx(S,{className:"h-4 w-4",weight:"fill"}):e.jsx(C,{className:"h-4 w-4",weight:"fill"})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Integrations"}),e.jsxs(c,{to:u,className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(y,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"MCP"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Manage AI integration access."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]})]}),e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Workspace"}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[e.jsxs(c,{to:v,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(H,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Trash"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Restore deleted notes."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:j,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(b,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Images"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Upload and organize images."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:M,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(N,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Properties"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Define shared fields for notes and future views."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:E,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(w,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Placeholders"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Manage template variables."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]})]})]})]})})};export{G as default};
1
+ import{j as e}from"./note-vendor-uuJO2MTD.js";import{p as h,a5 as p,P as f,T as t,L as c,aN as u,g as o,aw as v,aO as j,aI as M,aK as N,aP as E,aQ as w}from"./index-nYj7BL3a.js";import{a}from"./graph-vendor-CUxe67Lr.js";import{c as y,n as H}from"./Trash.es-ByMVwx0d.js";import{I as b}from"./Image.es-Be7par_j.js";import"./note-core-DMZcZ4yV.js";const T=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z",opacity:"0.2"}),a.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z"}))]]),F=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),V=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),A=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:T}));A.displayName="MoonIcon";const S=A,g=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:F}));g.displayName="PaletteIcon";const k=g,Z=a.forwardRef((s,r)=>a.createElement(h,{ref:r,...s,weights:V}));Z.displayName="SunIcon";const C=Z,G=()=>{const{theme:s,toggleTheme:r}=p(x=>x),l="focus-ring-soft surface-base group flex items-start justify-between gap-3.5 px-4 py-3.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",n="inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-[15px] border border-border-subtle bg-muted text-fg-secondary transition-colors group-hover:border-border-secondary/70 group-hover:text-fg-default",m="h-6 w-6",d="text-fg-tertiary",i="min-w-0 flex flex-col gap-0.5 pt-0.5";return e.jsx(f,{title:"Settings",description:"Manage appearance, integrations, and workspace tools",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Appearance"}),e.jsxs("button",{type:"button",className:l,onClick:r,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(k,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Theme"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Switch between light and dark mode."})]})]}),e.jsxs("div",{className:"mt-0.5 flex shrink-0 items-center gap-2 text-fg-tertiary",children:[e.jsx(t,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:s==="dark"?"Dark":"Light"}),s==="dark"?e.jsx(S,{className:"h-4 w-4",weight:"fill"}):e.jsx(C,{className:"h-4 w-4",weight:"fill"})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Integrations"}),e.jsxs(c,{to:u,className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(y,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"MCP"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Manage AI integration access."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]})]}),e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsx(t,{as:"p",variant:"label",weight:"medium",className:d,children:"Workspace"}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[e.jsxs(c,{to:v,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(H,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Trash"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Restore deleted notes."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:j,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(b,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Images"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Upload and organize images."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:M,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(N,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Properties"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Define shared fields for notes and future views."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]}),e.jsxs(c,{to:E,search:{page:1},className:l,children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:n,children:e.jsx(w,{className:m})}),e.jsxs("div",{className:i,children:[e.jsx(t,{as:"div",variant:"body",weight:"medium",children:"Placeholders"}),e.jsx(t,{as:"div",variant:"meta",tone:"secondary",children:"Manage template variables."})]})]}),e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-hover:translate-x-0.5 group-hover:text-fg-secondary"})]})]})]})]})})};export{G as default};