ocean-brain 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +73 -41
- package/dist/mcp.js +587 -26
- package/package.json +6 -1
- package/scripts/postinstall-prisma.mjs +41 -0
- package/server/client/dist/assets/Calendar-DRv2aEl8.js +28 -0
- package/server/client/dist/assets/Callout-B2kPcDrq.js +1 -0
- package/server/client/dist/assets/Graph-DotbTrZR.js +1 -0
- package/server/client/dist/assets/Image-B5R7gF2P.js +1 -0
- package/server/client/dist/assets/Image.es-Dld9r9MJ.js +1 -0
- package/server/client/dist/assets/ModalActionRow-CES9L_Gy.js +1 -0
- package/server/client/dist/assets/Note-SK4hDhEM.css +1 -0
- package/server/client/dist/assets/Note-cIbXJc1v.js +1 -0
- package/server/client/dist/assets/Reminders-4LunlZRb.js +1 -0
- package/server/client/dist/assets/{Search-BANPp2ZV.js → Search-Cp17DGR6.js} +1 -1
- package/server/client/dist/assets/SurfaceCard-yzVU4Qkx.js +1 -0
- package/server/client/dist/assets/Tag-CwmuMPmo.js +1 -0
- package/server/client/dist/assets/TagNotes-gGroWMtT.js +1 -0
- package/server/client/dist/assets/Trash.es-B3KWD8_C.js +1 -0
- package/server/client/dist/assets/color-wpu7wT_s.js +1 -0
- package/server/client/dist/assets/{image.api-rBH0OSWJ.js → image.api-DJgOBt8S.js} +1 -1
- package/server/client/dist/assets/index-40Y2UsVr.js +205 -0
- package/server/client/dist/assets/index-BnxpTwtL.css +1 -0
- package/server/client/dist/assets/index-DYUg2N-6.js +1 -0
- package/server/client/dist/assets/manage-image-ByY1mRZx.js +1 -0
- package/server/client/dist/assets/manage-image-detail-BVaDZHRu.js +1 -0
- package/server/client/dist/assets/mcp-Jj3061aI.js +1 -0
- package/server/client/dist/assets/placeholder-4P_GK7fV.js +34 -0
- package/server/client/dist/assets/trash-CPBwY07S.js +1 -0
- package/server/client/dist/assets/{useReminderMutate-CU-UinGn.js → useReminderMutate-1YVndM2T.js} +1 -1
- package/server/client/dist/index.html +2 -2
- package/server/dist/app.js +97 -9
- package/server/dist/app.js.map +1 -1
- package/server/dist/main.js +16 -2
- package/server/dist/main.js.map +1 -1
- package/server/dist/modules/auth-guard.js +73 -0
- package/server/dist/modules/auth-guard.js.map +1 -0
- package/server/dist/modules/auth-mode.js +51 -0
- package/server/dist/modules/auth-mode.js.map +1 -0
- package/server/dist/modules/auth.js +9 -0
- package/server/dist/modules/auth.js.map +1 -1
- package/server/dist/modules/blocknote.js +7 -1
- package/server/dist/modules/blocknote.js.map +1 -1
- package/server/dist/modules/error-handler.js +41 -0
- package/server/dist/modules/error-handler.js.map +1 -0
- package/server/dist/modules/image-upload.js +114 -0
- package/server/dist/modules/image-upload.js.map +1 -0
- package/server/dist/modules/mcp-admin.js +88 -0
- package/server/dist/modules/mcp-admin.js.map +1 -0
- package/server/dist/modules/mcp-auth.js +71 -0
- package/server/dist/modules/mcp-auth.js.map +1 -0
- package/server/dist/modules/mcp-token.js +28 -0
- package/server/dist/modules/mcp-token.js.map +1 -0
- package/server/dist/modules/note-authoring.js +140 -0
- package/server/dist/modules/note-authoring.js.map +1 -0
- package/server/dist/modules/note-cleanup.js +207 -0
- package/server/dist/modules/note-cleanup.js.map +1 -0
- package/server/dist/modules/note-snapshot.js +223 -0
- package/server/dist/modules/note-snapshot.js.map +1 -0
- package/server/dist/modules/note-trash.js +262 -0
- package/server/dist/modules/note-trash.js.map +1 -0
- package/server/dist/modules/prisma-runtime.js +46 -0
- package/server/dist/modules/prisma-runtime.js.map +1 -0
- package/server/dist/modules/recovery-retention.js +26 -0
- package/server/dist/modules/recovery-retention.js.map +1 -0
- package/server/dist/modules/remote-image.js +176 -0
- package/server/dist/modules/remote-image.js.map +1 -0
- package/server/dist/modules/tag-organization.js +66 -0
- package/server/dist/modules/tag-organization.js.map +1 -0
- package/server/dist/modules/use-async.js +2 -4
- package/server/dist/modules/use-async.js.map +1 -1
- package/server/dist/schema/note/index.js +150 -6
- package/server/dist/schema/note/index.js.map +1 -1
- package/server/dist/start.js +11 -0
- package/server/dist/start.js.map +1 -0
- package/server/dist/types/index.js.map +1 -1
- package/server/dist/urls.js +3 -2
- package/server/dist/urls.js.map +1 -1
- package/server/dist/views/auth.js +305 -0
- package/server/dist/views/auth.js.map +1 -0
- package/server/dist/views/image.js +24 -81
- package/server/dist/views/image.js.map +1 -1
- package/server/dist/views/index.js +4 -0
- package/server/dist/views/index.js.map +1 -1
- package/server/dist/views/mcp-admin.js +42 -0
- package/server/dist/views/mcp-admin.js.map +1 -0
- package/server/dist/views/note.js +124 -0
- package/server/dist/views/note.js.map +1 -0
- package/server/dist/views/tag.js +23 -0
- package/server/dist/views/tag.js.map +1 -0
- package/server/prisma/migrations/20260331183000_0010_note_snapshot/migration.sql +13 -0
- package/server/prisma/migrations/20260331195000_0011_note_trash_entities/migration.sql +35 -0
- package/server/prisma/migrations/20260331213000_0012_image_hash_unique/migration.sql +49 -0
- package/server/prisma/migrations/20260404000000_0013_mcp_admin_control/migration.sql +9 -0
- package/server/prisma/schema.prisma +66 -1
- package/server/client/dist/assets/Calendar-ST5q_8KT.js +0 -48
- package/server/client/dist/assets/Callout-CrWW3bg0.js +0 -1
- package/server/client/dist/assets/Graph-CzJjt6rP.js +0 -1
- package/server/client/dist/assets/Image-Dxg1qqZw.js +0 -1
- package/server/client/dist/assets/Image.es-DZ0H6wH1.js +0 -1
- package/server/client/dist/assets/Note-Bu7fN3B6.js +0 -6
- package/server/client/dist/assets/Note-CCvXqPzv.css +0 -1
- package/server/client/dist/assets/Plus.es-CS3WVMDq.js +0 -1
- package/server/client/dist/assets/PriorityLegend-D61iBwNW.js +0 -1
- package/server/client/dist/assets/Reminders-BjirJMOR.css +0 -1
- package/server/client/dist/assets/Reminders-DjWRombU.js +0 -1
- package/server/client/dist/assets/Tag-DbKSLTj0.js +0 -1
- package/server/client/dist/assets/TagNotes-B6s7jtL7.js +0 -1
- package/server/client/dist/assets/index-BzWwEDoL.js +0 -1
- package/server/client/dist/assets/index-CF5_ZCYN.js +0 -162
- package/server/client/dist/assets/index-DjZk2Gpg.css +0 -1
- package/server/client/dist/assets/manage-image-detail-DOx6QsCl.js +0 -1
- package/server/client/dist/assets/manage-image-g-MC6Fkc.js +0 -1
- package/server/client/dist/assets/placeholder-DV3u6MrA.js +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ocean-brain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
+
"scripts/postinstall-prisma.mjs",
|
|
18
19
|
"server/dist",
|
|
19
20
|
"server/prisma/schema.prisma",
|
|
20
21
|
"server/prisma/migrations",
|
|
@@ -23,9 +24,13 @@
|
|
|
23
24
|
"scripts": {
|
|
24
25
|
"dev": "tsx src/index.ts",
|
|
25
26
|
"build": "tsup",
|
|
27
|
+
"postinstall": "node ./scripts/postinstall-prisma.mjs",
|
|
28
|
+
"test": "tsx --test test/**/*.test.ts",
|
|
29
|
+
"test:ci": "tsx --test test/**/*.test.ts",
|
|
26
30
|
"type-check": "tsc --noEmit"
|
|
27
31
|
},
|
|
28
32
|
"dependencies": {
|
|
33
|
+
"@blocknote/server-util": "^0.46.2",
|
|
29
34
|
"@graphql-tools/schema": "^10.0.31",
|
|
30
35
|
"@graphql-tools/utils": "^11.0.0",
|
|
31
36
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
|
|
7
|
+
export const resolveSchemaPath = (packageRoot, doesExist = existsSync) => {
|
|
8
|
+
const candidates = [
|
|
9
|
+
path.join(packageRoot, 'server', 'prisma', 'schema.prisma'),
|
|
10
|
+
path.resolve(packageRoot, '..', 'server', 'prisma', 'schema.prisma')
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const match = candidates.find((candidate) => doesExist(candidate));
|
|
14
|
+
if (!match) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`Unable to locate Prisma schema for CLI postinstall. Tried: ${candidates.join(', ')}`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return match;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const runPrismaGenerate = () => {
|
|
24
|
+
const packageRoot = process.cwd();
|
|
25
|
+
const schemaPath = resolveSchemaPath(packageRoot);
|
|
26
|
+
const require = createRequire(import.meta.url);
|
|
27
|
+
const prismaCliEntry = require.resolve('prisma/build/index.js');
|
|
28
|
+
|
|
29
|
+
execFileSync(
|
|
30
|
+
process.execPath,
|
|
31
|
+
[prismaCliEntry, 'generate', `--schema=${schemaPath}`],
|
|
32
|
+
{
|
|
33
|
+
stdio: 'inherit',
|
|
34
|
+
env: process.env
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
40
|
+
runPrismaGenerate();
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{j as e}from"./note-vendor-BofYbzmZ.js";import{L as K,N as V,d as p,s as W,M as $,B as E,a as J,b as G,u as _,q as L,g as q,P as X,S as Z,T as ee,c as Y,e as te,C as se}from"./index-40Y2UsVr.js";import{a as y}from"./graph-vendor-CUxe67Lr.js";import{p as I}from"./color-wpu7wT_s.js";import{C as ae}from"./Callout-B2kPcDrq.js";import"./note-core-BCgMq5QA.js";const ne=({day:s,cellClassName:t,dayNumberClassName:a,isCurrentMonth:o,items:i,overflowCount:d,onOpenOverflow:u})=>e.jsxs("div",{className:`min-h-[140px] rounded-[14px] border p-2 ${t}`.trim(),children:[e.jsx("div",{className:"mb-2 flex justify-end",children:e.jsx("span",{className:`flex h-7 w-7 items-center justify-center rounded-[10px] text-sm ${a}`.trim(),children:s})}),o&&i.length>0?e.jsxs("div",{className:"flex flex-col gap-1",children:[i,d>0?e.jsxs("button",{type:"button",onClick:u,className:"rounded-[10px] py-1 text-center text-[10px] font-semibold text-fg-tertiary transition-colors hover:bg-hover-subtle hover:text-fg-muted",children:["+",d," more"]}):null]}):null]}),F=({params:s,toneClassName:t="",header:a,title:o,meta:i,titleClassName:d=""})=>e.jsx(K,{to:V,params:s,className:"group block min-h-[44px]",children:e.jsxs("div",{className:`surface-base flex h-full flex-col justify-center px-2 py-1.5 transition-colors group-hover:bg-hover-subtle ${t}`.trim(),children:[a?e.jsx("div",{className:"mb-0.5 flex items-center gap-1 text-fg-muted",children:a}):null,e.jsx("div",{className:`line-clamp-1 text-xs font-semibold text-fg-default ${d}`.trim(),children:o}),i?e.jsx("div",{className:"text-[10px] font-medium text-fg-secondary",children:i}):null]})}),re=({note:s,type:t})=>e.jsx(F,{params:{id:s.id},title:s.title,meta:p(Number(t==="create"?s.createdAt:s.updatedAt)).format("HH:mm")}),oe=({reminder:s})=>e.jsx(F,{params:{id:String(s.note?.id??s.noteId)},header:e.jsx(W,{size:12}),title:s.content||s.note?.title||"No title",titleClassName:s.completed?"line-through":"",meta:p(Number(s.reminderDate)).format("HH:mm")}),T=3,P=(s,t)=>s.map(a=>a.type==="note"?e.jsx(re,{note:a.item,type:t},`note-${a.item.id}`):e.jsx(oe,{reminder:a.item},`reminder-${a.item.id}`)),ie=({day:s,isCurrentMonth:t,isSunday:a,isToday:o,isPast:i,notes:d,reminders:u,type:c})=>{const[f,D]=y.useState(!1),g=y.useMemo(()=>{const C=d.map(N=>({type:"note",item:N})),v=u.map(N=>({type:"reminder",item:N}));return i?[...C,...v]:[...v,...C]},[i,d,u]),M=g.length>T,w=y.useMemo(()=>P(g.slice(0,T),c),[g,c]),n=y.useMemo(()=>P(g,c),[g,c]),l=y.useCallback(()=>D(!0),[]),m=y.useCallback(()=>D(!1),[]),j=()=>t?o?"border-border-secondary/70 bg-[color:color-mix(in_srgb,var(--surface)_88%,var(--accent-soft-primary)_12%)]":"bg-surface border-border-subtle":"bg-muted/18 border-border-subtle/70",S=()=>o?"bg-cta text-fg-on-filled font-semibold":t?a?"text-fg-weekend font-bold":"text-fg-secondary font-bold":"text-fg-disabled opacity-55";return e.jsxs(e.Fragment,{children:[e.jsx(ne,{day:s,cellClassName:j(),dayNumberClassName:S(),isCurrentMonth:t,items:w,overflowCount:M?g.length-T:0,onOpenOverflow:l}),M&&e.jsxs($,{isOpen:f,onClose:m,children:[e.jsx($.Header,{title:`Day ${s}`,onClose:m}),e.jsxs($.Body,{children:[e.jsxs($.Description,{className:"sr-only",children:["View all notes and reminders scheduled for day ",s,"."]}),e.jsx("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto",children:n})]})]})]})},le=y.memo(ie),de=["January","February","March","April","May","June","July","August","September","October","November","December"],ce=({month:s,year:t,onPrevMonth:a,onNextMonth:o,onToday:i})=>e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:de[s-1]}),e.jsx("span",{className:"text-xl sm:text-2xl text-fg-placeholder",children:t})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{variant:"ghost",size:"sm",onClick:i,children:"Today"}),e.jsx(E,{variant:"ghost",size:"icon-sm",onClick:a,children:e.jsx(J,{width:18,height:18})}),e.jsx(E,{variant:"ghost",size:"icon-sm",onClick:o,children:e.jsx(G,{width:18,height:18})})]})]}),me=[{label:"High",className:I.high},{label:"Medium",className:I.medium},{label:"Low",className:I.low},{label:"Overdue",className:"bg-accent-soft-danger/70 dark:bg-emphasis/70"}],xe=()=>e.jsx("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:me.map(({label:s,className:t})=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:`h-3 w-3 rounded-full border border-border-subtle ${t}`}),e.jsx("span",{className:"text-fg-tertiary font-medium",children:s})]},s))}),ue=`
|
|
2
|
+
query NotesInDateRange($dateRange: DateRangeInput) {
|
|
3
|
+
notesInDateRange(dateRange: $dateRange) {
|
|
4
|
+
id
|
|
5
|
+
title
|
|
6
|
+
createdAt
|
|
7
|
+
updatedAt
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`,he=`
|
|
11
|
+
query RemindersInDateRange($dateRange: DateRangeInput) {
|
|
12
|
+
remindersInDateRange(dateRange: $dateRange) {
|
|
13
|
+
id
|
|
14
|
+
noteId
|
|
15
|
+
reminderDate
|
|
16
|
+
completed
|
|
17
|
+
priority
|
|
18
|
+
content
|
|
19
|
+
note {
|
|
20
|
+
id
|
|
21
|
+
title
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`,pe=async s=>{const t=await q(ue,{dateRange:s});if(t.type==="error")throw t;return t.notesInDateRange},ge=async s=>{const t=await q(he,{dateRange:s});if(t.type==="error")throw t;return t.remindersInDateRange},ye=({year:s,month:t})=>{const a=`${s}-${String(t).padStart(2,"0")}-01`,o=t===12?1:t+1,d=`${t===12?s+1:s}-${String(o).padStart(2,"0")}-01`,u={start:a,end:d},c=_({queryKey:L.calendar.notesInDateRange(s,t),queryFn:()=>pe(u)}),f=_({queryKey:L.reminders.inDateRange(s,t),queryFn:()=>ge(u)});return{notes:c.data??[],reminders:f.data??[],isLoading:c.isLoading||f.isLoading,isError:c.isError||f.isError}},fe=["SUN","MON","TUE","WED","THU","FRI","SAT"],be=[],Ne=[],H=te(se);function $e(){const s=H.useNavigate(),{year:t,month:a,type:o}=H.useSearch(),{notes:i,reminders:d,isLoading:u,isError:c}=ye({year:t,month:a}),f=y.useMemo(()=>{const n=p(),l=`${n.year()}-${n.month()+1}-${n.date()}`,m=new Map;for(const r of i){const h=o==="create"?p(Number(r.createdAt)):p(Number(r.updatedAt)),x=`${h.year()}-${h.month()+1}-${h.date()}`,b=m.get(x)||[];b.push(r),m.set(x,b)}const j=new Map;for(const r of d){const h=p(Number(r.reminderDate)),x=`${h.year()}-${h.month()+1}-${h.date()}`,b=j.get(x)||[];b.push(r),j.set(x,b)}const S=new Date(t,a-1,1),C=new Date(t,a,0),v=S.getDay(),N=C.getDate(),R=[],k=a===1?12:a-1,O=a===1?t-1:t,U=new Date(O,k,0).getDate();for(let r=v-1;r>=0;r--)R.push({day:U-r,isCurrentMonth:!1,year:O,month:k});for(let r=1;r<=N;r++)R.push({day:r,isCurrentMonth:!0,year:t,month:a});const A=(v+N)%7,Q=A===0?0:7-A,z=a===12?1:a+1,B=a===12?t+1:t;for(let r=1;r<=Q;r++)R.push({day:r,isCurrentMonth:!1,year:B,month:z});return R.map((r,h)=>{const x=`${r.year}-${r.month}-${r.day}`,b=p(`${r.year}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`);return{key:x,day:r.day,isCurrentMonth:r.isCurrentMonth,isSunday:h%7===0,isToday:x===l,isPast:b.isBefore(n,"day"),notes:m.get(x)||be,reminders:j.get(x)||Ne}})},[t,a,i,d,o]),D=()=>{const n=a===1?12:a-1,l=a===1?t-1:t;s({search:m=>({...m,month:n,year:l})})},g=()=>{const n=a===12?1:a+1,l=a===12?t+1:t;s({search:m=>({...m,month:n,year:l})})},M=()=>{s({search:n=>({...n,month:p().month()+1,year:p().year()})})},w=n=>{n&&s({search:l=>({...l,type:n})})};return e.jsx(X,{title:"Calendar",variant:"none",children:e.jsxs("div",{className:"w-full px-4 sm:px-6 py-6 sm:py-10 max-w-screen-2xl mx-auto",children:[c?e.jsx(ae,{children:"Failed to load calendar data. Please try again later."}):e.jsxs("div",{className:"surface-base overflow-x-auto p-3 sm:p-4",children:[e.jsx(ce,{month:a,year:t,onPrevMonth:D,onNextMonth:g,onToday:M}),e.jsxs("div",{className:"min-w-[900px]",children:[e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:fe.map((n,l)=>e.jsx("div",{className:`
|
|
26
|
+
py-2 text-center text-xs font-bold tracking-wider
|
|
27
|
+
${l===0?"text-fg-weekend":"text-fg-secondary"}
|
|
28
|
+
`,children:n},n))}),u?e.jsx("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:35}).map((n,l)=>e.jsx(Z,{height:140},l))}):e.jsx("div",{className:"grid grid-cols-7 gap-1",children:f.map(n=>e.jsx(le,{day:n.day,isCurrentMonth:n.isCurrentMonth,isSunday:n.isSunday,isToday:n.isToday,isPast:n.isPast,notes:n.notes,reminders:n.reminders,type:o},n.key))})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mt-6",children:[e.jsx(xe,{}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-fg-tertiary font-bold",children:"Display by:"}),e.jsxs(ee,{type:"single",variant:"pills",size:"sm",value:o,onValueChange:w,children:[e.jsx(Y,{value:"create",children:"Create date"}),e.jsx(Y,{value:"update",children:"Update date"})]})]})]})]})})}export{$e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./note-vendor-BofYbzmZ.js";import{a as e}from"./graph-vendor-CUxe67Lr.js";import{p as n}from"./index-40Y2UsVr.js";const l=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),m=e.forwardRef((a,t)=>e.createElement(n,{ref:t,...a,weights:l}));m.displayName="InfoIcon";const s=m,A=({children:a,className:t=""})=>r.jsxs("div",{className:`flex items-start gap-2.5 rounded-[12px] border border-border-subtle bg-hover-subtle/50 px-4 py-3 ${t}`,children:[r.jsx(s,{className:"mt-0.5 h-4 w-4 shrink-0 text-fg-tertiary"}),r.jsx("div",{className:"text-sm font-medium text-fg-secondary",children:a})]});export{A as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./note-vendor-BofYbzmZ.js";import{a as i,F as Q}from"./graph-vendor-CUxe67Lr.js";import{Q as V,P as C,h as W,S as _,i as U,j as Y,k as J,l as X,q as ee,N as te,E as ne}from"./index-40Y2UsVr.js";import"./note-core-BCgMq5QA.js";const re=s=>{let a=0;for(let n=0;n<s.length;n++)a+=s.charCodeAt(n);return a},oe={background:"#f4f6f8",nodeHub:"#2c2f36",nodeSelected:"#111318",nodeConnected:"#636b76",nodeDefault:["#d6dbe1","#c8ced6","#b7bec7","#a7afb9"],nodeDimmed:["rgba(214,219,225,0.28)","rgba(200,206,214,0.24)","rgba(183,190,199,0.24)","rgba(167,175,185,0.2)"],nodeHubDimmed:"rgba(44,47,54,0.16)",nodeStroke:"#eef1f4",nodeSelectedStroke:"#a6b0bc",labelBackground:"rgba(246,248,250,0.92)",labelText:"#222831",labelFontFamily:"Pretendard Variable, Pretendard, system-ui, sans-serif",linkIdle:"rgba(99, 107, 117, 0.34)",linkConnected:"#68717c",linkDimmed:"rgba(127, 136, 146, 0.12)",legendHub:"#2c2f36"},se={background:"#121316",nodeHub:"#d6dce3",nodeSelected:"#eef1f5",nodeConnected:"#9099a4",nodeDefault:["#343a43","#2d333c","#262c35","#20262f"],nodeDimmed:["rgba(52,58,67,0.28)","rgba(45,51,60,0.24)","rgba(38,44,53,0.22)","rgba(32,38,47,0.2)"],nodeHubDimmed:"rgba(214,220,227,0.16)",nodeStroke:"#171c23",nodeSelectedStroke:"#7f8a97",labelBackground:"rgba(16,18,22,0.9)",labelText:"#eef2f6",labelFontFamily:"Pretendard Variable, Pretendard, system-ui, sans-serif",linkIdle:"rgba(118, 127, 138, 0.42)",linkConnected:"#a2abb6",linkDimmed:"rgba(118, 127, 138, 0.1)",legendHub:"#d6dce3"};function D(s){return s==="dark"?se:oe}function ae(s,a){const n=D(s),{connections:g,colorIndex:y,selectedNodeId:l,nodeId:b,isConnected:c}=a,h=l===b;return l!==null&&!h&&!c?g>3?n.nodeHubDimmed:n.nodeDimmed[y%n.nodeDimmed.length]:h?n.nodeSelected:c?n.nodeConnected:g>3?n.nodeHub:n.nodeDefault[y%n.nodeDefault.length]}function ie(s,a){const n=D(s);return a.selectedNodeId!==null&&!a.isConnected?n.linkDimmed:a.isConnected?n.linkConnected:n.linkIdle}function de(s,a){const n=D(s);return`${a.emphasize?"700":"400"} ${a.fontSize}px ${n.labelFontFamily}`}function F(s){return s<=1?3:s<=3?4:s<=5?5:Math.min(8,5+Math.sqrt(s)*.8)}const le=r.jsx(C,{title:"Knowledge Graph",children:r.jsx("div",{className:"flex items-center justify-center",style:{height:"600px"},children:r.jsx(_,{width:"100%",height:"100%"})})});function ce(){const s=U(),a=i.useRef(null),n=i.useRef(null),[g,y]=i.useState({width:800,height:600}),[l,b]=i.useState(null),{theme:c}=Y(e=>e),h=D(c),I=i.useRef(h);I.current=h;const{data:w}=J({queryKey:ee.notes.graph(),queryFn:async()=>{const e=await X();if(e.type==="error")throw e;return e.noteGraph}}),d=i.useMemo(()=>{if(w.nodes.length===0)return null;const e=w.nodes.filter(o=>o.connections>0);if(e.length===0)return null;const t=new Set(e.map(o=>o.id));return{nodes:e,links:w.links.filter(o=>t.has(o.source)&&t.has(o.target))}},[w]);i.useEffect(()=>{if(!d)return;const e=()=>{if(!a.current)return;const t=a.current.getBoundingClientRect();y({width:t.width,height:Math.max(600,window.innerHeight-150)})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[d]),i.useEffect(()=>{if(!d||!n.current)return;const e=window.setTimeout(()=>{n.current?.zoomToFit(400,50)},500);return()=>window.clearTimeout(e)},[d]);const T=i.useRef(l);T.current=l;const G=i.useCallback(e=>{if(T.current===e.id){s({to:te,params:{id:e.id}});return}b(e.id)},[s]),z=i.useCallback(()=>{b(null)},[]),B=i.useCallback(e=>{a.current&&(a.current.style.cursor=e?"pointer":"default")},[]),S=i.useRef(!1),L=i.useCallback(()=>{S.current||(S.current=!0,n.current?.enableZoomInteraction(!1))},[]),K=i.useCallback(()=>{S.current=!1,n.current?.enableZoomInteraction(!0)},[]),R=i.useRef(new Map),q=i.useMemo(()=>{const e=new Map;if(d)for(const t of d.links)e.has(t.source)||e.set(t.source,new Set),e.has(t.target)||e.set(t.target,new Set),e.get(t.source)?.add(t.target),e.get(t.target)?.add(t.source);return e},[d]);R.current=q;const A=i.useCallback((e,t,o)=>{const u=I.current,f=l,p=R.current,m=F(e.connections),x=e.x||0,v=e.y||0,k=f===e.id,N=f?p.get(f)?.has(e.id)??!1:!1,Z=f!==null&&!k&&!N,$=re(e.id);if(t.beginPath(),t.arc(x,v,m,0,Math.PI*2),t.fillStyle=ae(c,{connections:e.connections,colorIndex:$,selectedNodeId:f,nodeId:e.id,isConnected:N}),t.fill(),!Z&&(t.strokeStyle=u.nodeStroke,t.lineWidth=(k?2:1)/o,t.stroke(),k&&(t.beginPath(),t.arc(x,v,m+2/o,0,Math.PI*2),t.strokeStyle=u.nodeSelectedStroke,t.lineWidth=1.5/o,t.stroke()),k||N||o>2.5)){const E=e.title||"Untitled",P=Math.max(10/o,2.5);t.font=de(c,{fontSize:P,emphasize:k||N}),t.textAlign="center",t.textBaseline="top";const H=t.measureText(E).width,j=2/o,M=v+m+3/o;t.fillStyle=u.labelBackground,t.fillRect(x-H/2-j,M,H+j*2,P+j*2),t.fillStyle=u.labelText,t.fillText(E,x,M+j)}},[l,c]),O=i.useCallback((e,t,o)=>{const u=l,f=e.source,p=e.target,m=u?f.id===u||p.id===u:!1;t.beginPath(),t.moveTo(f.x||0,f.y||0),t.lineTo(p.x||0,p.y||0),t.strokeStyle=ie(c,{selectedNodeId:u,isConnected:m}),t.lineWidth=m?2/o:.5/o,t.stroke()},[l,c]);return d?r.jsxs(C,{title:"Knowledge Graph",description:`${d.nodes.length} linked notes, ${d.links.length} connections`,children:[r.jsxs("div",{ref:a,className:"surface-base relative overflow-hidden",style:{background:h.background},children:[l&&(()=>{const e=d.nodes.find(t=>t.id===l);return e?r.jsxs("div",{className:"surface-floating absolute top-3 left-3 z-10 flex items-center gap-2 px-3 py-2 text-sm",children:[r.jsx("span",{className:"max-w-48 truncate font-semibold text-fg-default",children:e.title}),r.jsxs("span",{className:"text-fg-tertiary",children:[e.connections," links"]}),r.jsx("button",{onClick:()=>b(null),className:"focus-ring-soft ml-1 flex h-7 w-7 cursor-pointer items-center justify-center rounded-[12px] text-fg-tertiary transition-colors hover:bg-hover-subtle hover:text-fg-default","aria-label":"Deselect node",children:"x"})]}):null})(),r.jsx(Q,{ref:n,graphData:d,width:g.width,height:g.height,nodeId:"id",nodeLabel:"",nodeCanvasObject:A,nodePointerAreaPaint:(e,t,o)=>{o.beginPath(),o.arc(e.x||0,e.y||0,Math.max(F(e.connections)+4,10),0,2*Math.PI),o.fillStyle=t,o.fill()},linkCanvasObject:O,linkCanvasObjectMode:()=>"replace",linkDirectionalParticles:0,onNodeClick:G,onNodeHover:B,onBackgroundClick:z,onNodeDrag:L,onNodeDragEnd:K,warmupTicks:30,cooldownTicks:80,d3AlphaDecay:.05,d3VelocityDecay:.3,enableZoomInteraction:!0,enablePanInteraction:!0,minZoom:.3,maxZoom:5})]}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-4 w-4 rounded-full border border-border-subtle",style:{background:h.legendHub}}),r.jsx("span",{className:"text-fg-tertiary font-medium",children:"Hub notes (4+ connections)"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-4 w-4 rounded-full border border-border-subtle",style:{background:h.nodeConnected}}),r.jsx("span",{className:"text-fg-tertiary font-medium",children:"Connected notes"})]})]})]}):r.jsx(C,{title:"Knowledge Graph",children:r.jsx(ne,{title:"No constellations yet",description:"Link your notes together and watch your own starry sky unfold."})})}function me(){return r.jsx(V,{fallback:le,errorTitle:"Failed to load graph",errorDescription:"Retry loading your linked note constellation.",renderError:({error:s,retry:a})=>r.jsx(C,{title:"Knowledge Graph",children:r.jsx(W,{title:"Failed to load graph",description:"Retry loading your linked note constellation.",error:s,onRetry:a})}),children:r.jsx(ce,{})})}export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./note-vendor-BofYbzmZ.js";import{a as f}from"./graph-vendor-CUxe67Lr.js";import{j as m}from"./index-40Y2UsVr.js";function E({src:r,alt:i,loading:s="lazy",className:a}){const A=f.useRef(null),{theme:g}=m(e=>e),o=g==="dark"?"brightness(0.85) saturate(0.9)":void 0;return f.useEffect(()=>{if(!A.current||s!=="lazy"||!r)return;const e=new IntersectionObserver(([c])=>{if(c.isIntersecting){const n=c.target;n.src=n.dataset.src,e.unobserve(n)}});return e.observe(A.current),()=>{e.disconnect()}},[s,r]),t.jsx(t.Fragment,{children:s!=="lazy"?t.jsx("img",{src:r,alt:i,className:a,style:{filter:o}}):t.jsx("img",{ref:A,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2O4evXqfwAIgQN/QHwrfwAAAABJRU5ErkJggg==",alt:i,"data-src":r,className:a,style:{filter:o}})})}export{E as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./graph-vendor-CUxe67Lr.js";import{p as m}from"./index-40Y2UsVr.js";const n=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),e=a.forwardRef((l,t)=>a.createElement(m,{ref:t,...l,weights:n}));e.displayName="ImageIcon";const Z=e;export{Z as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./graph-vendor-CUxe67Lr.js";import{p as n}from"./index-40Y2UsVr.js";import{j as r}from"./note-vendor-BofYbzmZ.js";const m=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),t=e.forwardRef((a,l)=>e.createElement(n,{ref:l,...a,weights:m}));t.displayName="PlusIcon";const s=t;function p({children:a}){return r.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:a})}export{p as M,s as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Reference_6yru9_1{display:inline-flex;align-items:center;font-size:.75rem;font-weight:600;padding:2px 10px;border-radius:9999px;background:color-mix(in srgb,var(--elevated) 72%,var(--hover-subtle));border:1px solid var(--border-subtle);color:var(--fg-secondary);transition:background-color .15s ease,border-color .15s ease,color .15s ease}._Reference_6yru9_1:hover{background:var(--elevated);border-color:var(--border-secondary);color:var(--fg-default)}html.dark ._Reference_6yru9_1{background:color-mix(in srgb,var(--elevated) 82%,var(--hover-subtle))}._Tag_eqfjc_1{display:inline-flex;align-items:center;font-size:.75rem;font-weight:600;padding:2px 10px;border-radius:9999px;background:color-mix(in srgb,var(--hover-subtle) 82%,transparent);border:1px solid var(--border-subtle);color:var(--fg-secondary);transition:background-color .15s ease,border-color .15s ease,color .15s ease}._Tag_eqfjc_1:hover{background:var(--hover-subtle);border-color:var(--border-secondary);color:var(--fg-default)}html.dark ._Tag_eqfjc_1{background:color-mix(in srgb,var(--hover-subtle) 88%,transparent)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,U as J,y as le,v as ce,i as z,k as de,X as me,F as ue}from"./note-vendor-BofYbzmZ.js";import{k as X,y as xe,q as w,M as j,B as R,z as Z,A as fe,u as pe,G as he,H as ge,I as be,d as N,J as ee,L as U,N as q,w as ye,K as P,O as je,t as ve,U as Ne,j as we,V as E,W as Ce,X as Se,T as Re,c as O,b as ke,Y as Te,Z as Me,D as te,m as se,Q as Y,P as B,h as F,e as De,S as T,_ as Ae,$ as $e,a0 as He,a1 as Ee,a2 as Oe,a3 as Q}from"./index-40Y2UsVr.js";import{a as m,g as Le}from"./graph-vendor-CUxe67Lr.js";import{u as Ie}from"./image.api-DJgOBt8S.js";import{V as Pe,a2 as Ye,a3 as Fe,A as ze}from"./note-core-BCgMq5QA.js";import{M as ne,n as Ue}from"./ModalActionRow-CES9L_Gy.js";import{u as qe,R as Be}from"./useReminderMutate-1YVndM2T.js";function _e({title:t,description:a,selected:o=!1,onClick:i,children:r}){return e.jsxs("button",{type:"button","aria-pressed":o,className:`focus-ring-soft flex w-full items-start justify-between gap-3 p-3 text-left transition-colors sm:p-4 ${o?"surface-floating bg-elevated":"rounded-[14px] border border-border-subtle bg-transparent hover:border-border-secondary hover:bg-hover-subtle"}`,onClick:i,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:`text-sm font-semibold sm:text-base ${o?"text-fg-default":"text-fg-secondary"}`,children:t}),e.jsx("div",{className:`mt-1 text-xs font-medium sm:text-sm ${o?"text-fg-tertiary":"text-fg-placeholder"}`,children:a})]}),r?e.jsx("div",{className:"shrink-0",children:r}):null]})}const Qe=t=>{const{data:a}=X({queryKey:w.notes.backReferences(t.noteId),async queryFn(){const o=await xe(t.noteId);if(o.type==="error")throw o;return o.backReferences}});return t.render(a)},Ke=[{value:"narrow",label:"Narrow",description:"Optimized for reading long-form content"},{value:"wide",label:"Wide",description:"Balanced width suitable for most content"},{value:"full",label:"Full Width",description:"Maximize screen space utilization"}];function Ve({isOpen:t,onClose:a,onSave:o,currentLayout:i="wide"}){const[r,n]=m.useState(i);m.useEffect(()=>{t&&n(i)},[t,i]);const s=()=>{o(r),a()};return e.jsxs(j,{isOpen:t,onClose:a,children:[e.jsx(j.Header,{title:"Layout Settings",onClose:a}),e.jsx(j.Body,{children:e.jsx("div",{className:"flex flex-col gap-3 sm:gap-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-fg-secondary",children:"Note Layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:Ke.map(l=>e.jsx(_e,{title:l.label,description:l.description,selected:r===l.value,onClick:()=>n(l.value)},l.value))})]})})}),e.jsx(j.Footer,{children:e.jsxs(ne,{children:[e.jsx(R,{variant:"ghost",size:"sm",onClick:a,children:"Cancel"}),e.jsx(R,{variant:"primary",size:"sm",onClick:s,children:"Apply"})]})})]})}const Ge=(t,a)=>t||(a==="mobile"?"Mobile browser":a==="mcp"?"MCP":"Web browser");function We({isOpen:t,noteId:a,onClose:o,onRestored:i}){const r=Z(),n=fe(),s=pe({queryKey:w.notes.snapshots(a),queryFn:async()=>{const c=await he(a);if(c.type==="error")throw c;return c.noteSnapshots},enabled:t}),l=ge({mutationFn:be,onSuccess:async c=>{if(c.type==="error"){r(c.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:w.notes.detail(a),exact:!0}),n.invalidateQueries({queryKey:w.notes.listAll(),exact:!1}),n.invalidateQueries({queryKey:w.notes.tagListAll(),exact:!1}),n.invalidateQueries({queryKey:w.notes.pinned(),exact:!0}),n.invalidateQueries({queryKey:w.notes.backReferences(a),exact:!0}),n.invalidateQueries({queryKey:w.notes.snapshots(a),exact:!1})]),r("Previous version restored."),i?.(c.restoreNoteSnapshot),o()}});return e.jsxs(j,{isOpen:t,onClose:o,children:[e.jsx(j.Header,{title:"Restore Previous Version",onClose:o}),e.jsx(j.Body,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm text-fg-secondary",children:"Choose a previous snapshot to restore this note back to that state."}),s.isLoading&&e.jsx("div",{className:"text-sm text-fg-secondary",children:"Loading previous versions..."}),!s.isLoading&&s.data?.length===0&&e.jsx("div",{className:"rounded-[14px] border border-border-subtle bg-hover-subtle/50 px-4 py-3 text-sm text-fg-secondary",children:"A recovery snapshot will appear after the first edit in a session and older ones are cleaned up automatically."}),!s.isLoading&&s.data&&s.data.length>0&&e.jsx("div",{className:"flex flex-col gap-2",children:s.data.map(c=>e.jsx("div",{className:"surface-base p-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"text-sm font-semibold",children:["Before ",Ge(c.meta.label,c.meta.entrypoint)," edit"]}),e.jsx("p",{className:"truncate text-sm text-fg-secondary",children:c.title}),e.jsx("p",{className:"text-xs text-fg-placeholder",children:N(c.createdAt).format("YYYY-MM-DD HH:mm:ss")})]}),e.jsx(R,{size:"sm",isLoading:l.isPending,onClick:()=>l.mutate(c.id),children:"Restore"})]})},c.id))})]})})]})}var L={exports:{}};var K;function Je(){return K||(K=1,(function(t){(function(){var a={}.hasOwnProperty;function o(){for(var n="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(n=r(n,i(l)))}return n}function i(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return o.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var s="";for(var l in n)a.call(n,l)&&n[l]&&(s=r(s,l));return s}function r(n,s){return s?n?n+" "+s:n+s:n}t.exports?(o.default=o,t.exports=o):window.classNames=o})()})(L)),L.exports}var Xe=Je();const Ze=Le(Xe),et="_Reference_6yru9_1",tt={Reference:et},st=ee.bind(tt),nt=J({type:"reference",propSchema:{id:{default:""},title:{default:"Unknown"}},content:"none"},{render:t=>e.jsx("span",{className:st("Reference"),children:e.jsx(U,{to:q,params:{id:t.inlineContent.props.id},children:e.jsxs("span",{children:["[",t.inlineContent.props.title,"]"]})})})}),at="_Tag_eqfjc_1",rt={Tag:at},ot=ee.bind(rt),it=J({type:"tag",propSchema:{id:{default:""},tag:{default:"@Unknown"}},content:"none"},{render:t=>e.jsx("span",{className:ot("Tag"),children:e.jsx(U,{to:ye,params:{id:t.inlineContent.props.id},search:{page:1},children:e.jsx("span",{children:t.inlineContent.props.tag})})})}),lt=()=>{const t=ce(),[a,o]=m.useState([]);m.useEffect(()=>{const r=()=>{const s=t.document,l=[],c=C=>{for(const h of C){if(h.type==="heading"){const y=h,v=y.props.level||1,x=y.content?.map(k=>k.text||"").join("")||"";x.trim()&&l.push({id:h.id,level:v,text:x})}h.children&&Array.isArray(h.children)&&c(h.children)}};c(s),o(l)};r();const n=t.onChange?.(r);return()=>{n&&n()}},[t]);const i=r=>{t.setTextCursorPosition(r);const n=document.querySelector(`[data-id="${r}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"center"})};return a.length===0?e.jsx("div",{className:"surface-base w-full p-5",children:e.jsxs("div",{className:"flex items-start gap-3 text-fg-tertiary",children:[e.jsx(P,{className:"mt-0.5 text-xl flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-sm font-semibold text-fg-default",children:"Table of Contents"}),e.jsx("div",{className:"text-sm text-fg-tertiary",children:"Add headings to your document to generate a table of contents"})]})]})}):e.jsxs("div",{className:"surface-base w-full p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2 border-b border-border-subtle pb-3",children:[e.jsx(P,{className:"text-lg text-fg-tertiary"}),e.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.1em] text-fg-tertiary",children:"Table of Contents"})]}),e.jsx("nav",{className:"space-y-1",children:a.map(r=>{const n=(r.level-1)*14,s=r.level===1;return e.jsxs("button",{type:"button",onClick:()=>i(r.id),className:["focus-ring-soft","flex","w-full","items-start","gap-3","rounded-[14px]","px-3","py-2.5","text-left","transition-colors","hover:bg-hover-subtle",s?"text-fg-default":"text-fg-secondary"].join(" "),style:{paddingLeft:`${12+n}px`},children:[e.jsxs("span",{className:"mt-[1px] min-w-[1.75rem] text-[0.625rem] font-semibold uppercase tracking-[0.12em] text-fg-tertiary",children:["H",r.level]}),e.jsx("span",{className:`line-clamp-2 text-sm ${s?"font-semibold":"font-medium"}`,children:r.text})]},r.id)})})]})},ct=le({type:"tableOfContents",propSchema:{},content:"none"},{render:()=>e.jsx(lt,{})})(),dt=Pe.create({inlineContentSpecs:{...Fe,tag:it,reference:nt},blockSpecs:{...Ye,tableOfContents:ct}}),mt=({editor:t})=>e.jsx(z,{triggerCharacter:"/",getItems:async a=>ze([...de(t).filter(o=>o.title!=="Audio"&&o.title!=="Video"&&o.title!=="File"),{title:"Table of Contents",subtext:"Insert a table of contents based on headings",onItemClick:()=>{t.insertBlocks([{type:"tableOfContents"}],t.getTextCursorPosition().block,"after")},aliases:["toc","table of contents","contents","outline","index"],group:"Other",icon:e.jsx(P,{})}],a)}),ut=({onClick:t})=>e.jsx(z,{triggerCharacter:"[",getItems:async a=>{const o=await je({query:a,limit:5});if(o.type==="error")return[];const{notes:i}=o.allNotes;return i.map(r=>({title:r.title,onItemClick:()=>t({type:"reference",props:{id:r.id,title:r.title}})}))}}),xt=({onClick:t})=>e.jsx(z,{triggerCharacter:"@",getItems:async a=>{const o=await ve({query:a,limit:5});if(o.type==="error")return[];const{tags:i}=o.allTags,r=i.some(s=>s.name!==`@${a}`),n=[{title:"Add a new tag",onItemClick:async()=>{const s=await Ne({name:"@"+a});if(s.type==="error")return;const{id:l,name:c}=s.createTag;t({type:"tag",props:{id:l,tag:c}})}}];return i.length===0?n:i.map(s=>({title:s.name,onItemClick:()=>t({type:"tag",props:{id:s.id,tag:s.name}})})).concat(a&&r?n:[])}});async function ft(t){return new Promise((a,o)=>{const i=new FileReader;i.readAsDataURL(t),i.onload=()=>a(i.result),i.onerror=r=>o(r)})}const pt=m.forwardRef(({content:t,editable:a,onChange:o},i)=>{const{theme:r}=we(s=>s),n=me({schema:dt,initialContent:t&&JSON.parse(t)||void 0,uploadFile:async s=>Ie({base64:await ft(s)})},[]);return m.useImperativeHandle(i,()=>({getContent:()=>JSON.stringify(n.document)})),e.jsxs(ue,{slashMenu:!1,theme:r,editor:n,editable:a,onChange:o,children:[e.jsx(mt,{editor:n}),e.jsx(ut,{onClick:s=>{n.insertInlineContent([s," "])}}),e.jsx(xt,{onClick:s=>{n.insertInlineContent([s," "])}})]})}),V={low:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"},medium:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"},high:{active:"border-border-secondary bg-elevated text-fg-default",inactive:"border-transparent bg-transparent text-fg-muted hover:bg-hover-subtle"}};function ht({isOpen:t,onClose:a,onSave:o,reminder:i,mode:r}){const[n,s]=m.useState(new Date),[l,c]=m.useState("medium"),[C,h]=m.useState("");m.useEffect(()=>{t&&r==="edit"&&i?(s(new Date(Number(i.reminderDate))),c(i.priority||"medium"),h(i.content||"")):t&&r==="create"&&(s(new Date),c("medium"),h(""))},[t,r,i]);const y=()=>{o(n,l,C||void 0),a()},v=x=>l===x?V[x].active:V[x].inactive;return e.jsxs(j,{isOpen:t,onClose:a,children:[e.jsx(j.Header,{title:r==="create"?"Create Reminder":"Edit Reminder",onClose:a}),e.jsx(j.Body,{children:e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(E,{children:"Date & Time"}),e.jsx(Ce,{type:"datetime-local",size:"sm",value:N(n).format("YYYY-MM-DDTHH:mm"),onChange:x=>s(new Date(x.target.value))})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(E,{children:"Content"}),e.jsx(Se,{size:"sm",placeholder:"Enter reminder content (optional)",value:C,onChange:x=>h(x.target.value)})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(E,{children:"Priority"}),e.jsxs(Re,{type:"single",value:l,onValueChange:x=>x&&c(x),className:"gap-1.5 border-none rounded-[14px] bg-muted/70 p-1 sm:gap-2",children:[e.jsx(O,{value:"low",className:`flex-1 rounded-[10px] border text-sm font-medium ${v("low")}`,children:"Low"}),e.jsx(O,{value:"medium",className:`flex-1 rounded-[10px] border text-sm font-medium ${v("medium")}`,children:"Medium"}),e.jsx(O,{value:"high",className:`flex-1 rounded-[10px] border text-sm font-medium ${v("high")}`,children:"High"})]})]})]})}),e.jsx(j.Footer,{children:e.jsxs(ne,{children:[e.jsx(R,{variant:"ghost",size:"sm",onClick:a,children:"Cancel"}),e.jsx(R,{variant:"primary",size:"sm",onClick:y,children:r==="create"?"Create":"Save"})]})})]})}function gt({noteId:t}){const[a,o]=m.useState(!1),[i,r]=m.useState(!1),[n,s]=m.useState("create"),[l,c]=m.useState(void 0),{onCreate:C,onUpdate:h,onDelete:y}=qe(),v=()=>{s("create"),c(void 0),r(!0)},x=f=>{s("edit"),c(f),r(!0)},k=(f,p,d)=>{n==="create"?C(t,f,p,()=>{r(!1)},d):n==="edit"&&l&&h(l.id,t,{reminderDate:f,priority:p,content:d},()=>{r(!1)})},A=f=>{h(f.id,t,{completed:!f.completed})},M=f=>{const p=N(Number(f)),d=N();return p.isSame(d,"day")?`Today at ${p.format("HH:mm")}`:p.isSame(d.add(1,"day"),"day")?`Tomorrow at ${p.format("HH:mm")}`:p.format("YYYY-MM-DD HH:mm")},$=f=>{const p=N(Number(f)),d=N(),g=p.diff(d,"hour");return g<=6?"high":g<=24?"medium":"low"},D=f=>{const p=N(Number(f)),d=N(),g=p.diff(d,"hour"),S=p.diff(d,"minute")%60;return g<0||S<0?"Overdue":g===0?`${S}m remaining`:`${g}h ${S}m remaining`};return e.jsxs("div",{className:"surface-base mb-5 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsxs("button",{type:"button",onClick:()=>o(!a),className:"focus-ring-soft flex items-center gap-2 rounded-[10px] px-2 py-1.5 text-fg-default transition-colors hover:bg-hover-subtle",children:[a?e.jsx(ke,{size:14}):e.jsx(Te,{size:14}),e.jsx("p",{className:"text-sm font-medium",children:"Reminders"})]}),!a&&e.jsxs(R,{size:"sm",variant:"ghost",onClick:v,children:[e.jsx(Ue,{className:"w-3 h-3"}),e.jsx("span",{className:"hidden sm:inline text-xs",children:"Add"})]})]}),!a&&e.jsx(Be,{noteId:t,searchParams:{offset:0,limit:9999},render:({reminders:f,totalCount:p})=>e.jsx("div",{className:"flex flex-col gap-2",children:f.length===0?e.jsx("p",{className:"py-3 text-center text-sm text-fg-tertiary",children:p===0?"No reminders yet":"All reminders complete"}):e.jsx("div",{className:"flex flex-col gap-1.5",children:f.map(d=>{const g=d.priority||$(d.reminderDate),S=D(d.reminderDate),H=g==="high"?"High":g==="medium"?"Medium":"Low";return e.jsxs("div",{className:`flex items-start gap-2 rounded-[16px] border border-border-subtle p-3 transition-colors ${d.completed?"bg-muted/60":"bg-surface hover:bg-hover-subtle"}`,children:[e.jsx(Me,{checked:d.completed,onChange:()=>A(d),size:"sm"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[e.jsx("div",{className:`font-semibold text-sm text-fg-secondary ${d.completed?"line-through opacity-50":""}`,children:M(d.reminderDate)}),!d.completed&&e.jsx("span",{className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2 py-0.5 text-[0.625rem] font-medium uppercase tracking-[0.08em] text-fg-tertiary",children:H})]}),d.content&&e.jsx("div",{className:`text-sm text-fg-tertiary ${d.completed?"line-through opacity-50":""} truncate`,children:d.content}),!d.completed&&e.jsx("span",{className:`mt-1 inline-flex text-xs font-medium ${g==="high"?"text-fg-error":"text-fg-placeholder"}`,children:S})]}),e.jsx(te,{button:e.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-tertiary outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(se,{size:14,className:"text-current"}),e.jsx("span",{className:"sr-only",children:"Reminder actions"})]}),items:[{name:"Edit",onClick:()=>x(d)},{name:"Delete",onClick:()=>y(d.id,t)}]})]},d.id)})})})}),e.jsx(ht,{isOpen:i,onClose:()=>r(!1),onSave:k,reminder:l,mode:n})]})}const ae=De(q),G=t=>N(Number(t)).format("YYYY-MM-DD HH:mm:ss"),I=()=>typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,bt={narrow:"max-w-[640px]",wide:"max-w-[896px]",full:"max-w-full px-4"},yt=e.jsx(B,{title:"Loading note",variant:"none",children:e.jsxs("main",{className:"mx-auto max-w-[896px]",children:[e.jsx(T,{className:"mb-8",height:"66px"}),e.jsx(T,{className:"ml-12 mb-8",height:"150px"}),e.jsx(T,{className:"mb-5",height:"80px"}),e.jsx(T,{height:"80px"})]})}),W="text-[0.6875rem] font-medium uppercase tracking-[0.12em] text-fg-tertiary";function jt({id:t}){const a=Z(),o=ae.useNavigate(),i=m.useRef(null),r=m.useRef(null),n=m.useRef(I()),{data:s}=X({queryKey:w.notes.detail(t),queryFn:async()=>{const u=await Ae(t);if(u.type==="error")throw u;return u.note},gcTime:0}),[l,c]=m.useState(s.title),[C,h]=m.useState(()=>G(s.updatedAt)),[y,v]=m.useState(s.pinned),[x,k]=m.useState(s.layout||"wide"),[A,M]=m.useState(!1),[$,D]=m.useState(!1),[f,p]=$e(1e3);m.useEffect(()=>{c(s.title),v(s.pinned),k(s.layout||"wide"),h(G(s.updatedAt))},[s.layout,s.pinned,s.title,s.updatedAt]),m.useEffect(()=>{n.current=I()},[t]);const d=async({title:u="",content:b=""})=>{p(async()=>{const _=await Q({id:t,title:u,content:b,editSessionId:n.current});if(_.type==="error"){a(_.errors[0].message);return}c(u),h(N().format("YYYY-MM-DD HH:mm:ss"))})},g=()=>{d({title:l,content:i.current?.getContent()})},S=u=>{c(u),d({title:u,content:i.current?.getContent()})},H=async u=>{const b=await Q({id:t,layout:u,editSessionId:n.current});if(b.type==="error"){a(b.errors[0].message);return}k(u),a("Layout has been updated.")},{onCreate:re,onDelete:oe,onPinned:ie}=He();return e.jsx(B,{title:l,variant:"none",children:e.jsxs("main",{className:`mx-auto ${bt[x]}`,children:[e.jsxs("div",{style:{zIndex:"1001"},className:"surface-floating sticky top-20 mb-8 px-5 py-4",children:[e.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"mb-1 text-[0.625rem] font-semibold uppercase tracking-[0.16em] text-fg-tertiary",children:"Thought in progress"}),e.jsx("input",{ref:r,placeholder:"Title",className:"w-full bg-transparent text-[1.4rem] font-semibold tracking-[-0.02em] outline-none",type:"text",value:l,onChange:u=>S(u.target.value)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{button:e.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-9 w-9 items-center justify-center rounded-[12px] border border-transparent bg-transparent text-fg-tertiary outline-none transition-colors hover:border-border-subtle hover:bg-hover-subtle hover:text-fg-default",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("span",{className:"sr-only",children:"Note actions"})]}),items:[{name:y?"Unpin":"Pin",onClick:()=>ie(t,y,()=>{v(u=>!u)})},{name:"Change layout",onClick:()=>M(!0)},{type:"separator"},{name:"Clone this note",onClick:()=>re(r.current?.value||"untitled",i.current?.getContent()||"",x)},{name:"Restore previous version",onClick:()=>D(!0)},{type:"separator"},{name:"Delete",onClick:()=>oe(t,()=>{o({to:Ee,search:{page:1}})})}]}),e.jsx(R,{size:"sm",variant:"ghost",isLoading:f,onClick:g,children:"Save"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[y&&e.jsxs("span",{className:`inline-flex items-center gap-1.5 ${W}`,children:[e.jsx(Oe,{className:"h-3 w-3",weight:"fill"}),"Pinned"]}),y&&e.jsx("span",{className:Ze("h-1 w-1 rounded-full bg-border-secondary")}),e.jsxs("span",{className:W,children:["Saved ",C]})]})]}),e.jsx(pt,{ref:i,content:s.content,onChange:g},`${t}:${s.updatedAt}`),e.jsx(Y,{fallback:e.jsx(T,{className:"mb-5",height:"80px"}),errorTitle:"Failed to load reminders",errorDescription:"Retry loading reminder details for this note.",renderError:({error:u,retry:b})=>e.jsx(F,{title:"Failed to load reminders",description:"Retry loading reminder details for this note.",error:u,onRetry:b,showBackAction:!1,showHomeAction:!1}),children:e.jsx(gt,{noteId:t})}),e.jsx(Y,{fallback:e.jsx(T,{height:"80px"}),errorTitle:"Failed to load back references",errorDescription:"Retry loading notes that link back here.",renderError:({error:u,retry:b})=>e.jsx(F,{title:"Failed to load back references",description:"Retry loading notes that link back here.",error:u,onRetry:b,showBackAction:!1,showHomeAction:!1}),children:e.jsx(Qe,{noteId:t,render:u=>u&&u.length>0&&e.jsxs("div",{className:"surface-base p-4",children:[e.jsx("p",{className:"mb-2 text-sm font-semibold",children:"Back References"}),e.jsx("ul",{className:"flex flex-col gap-1 text-sm",children:u.map(b=>e.jsx("li",{children:e.jsxs(U,{to:q,params:{id:b.id},className:"block rounded-[10px] px-2.5 py-1.5 text-fg-secondary transition-colors hover:bg-hover-subtle hover:text-fg-default",children:["- ",b.title]})},b.id))})]})})}),e.jsx(Ve,{isOpen:A,onClose:()=>M(!1),onSave:H,currentLayout:x}),e.jsx(We,{isOpen:$,noteId:t,onClose:()=>D(!1),onRestored:()=>{n.current=I()}})]})})}function Tt(){const{id:t}=ae.useParams();if(!t)throw new Error("Note id is required.");return e.jsx(Y,{fallback:yt,errorTitle:"Failed to load note",errorDescription:"Retry loading the note editor.",resetKeys:[t],renderError:({error:a,retry:o})=>e.jsx(B,{title:"Note",variant:"none",children:e.jsx(F,{title:"Failed to load note",description:"Retry loading the note editor.",error:a,onRetry:o})}),children:e.jsx(jt,{id:t},t)})}export{Tt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./note-vendor-BofYbzmZ.js";import{p as E,D as b,m as N,L as v,N as w,B as R,n as F,d as c,P as D,Q as T,E as $,f as S,S as d,e as k,R as C}from"./index-40Y2UsVr.js";import{a as e}from"./graph-vendor-CUxe67Lr.js";import{u as I,R as O}from"./useReminderMutate-1YVndM2T.js";import{p as L}from"./color-wpu7wT_s.js";import"./note-core-BCgMq5QA.js";const U=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),z=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),e.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),H=e.forwardRef((a,n)=>e.createElement(E,{ref:n,...a,weights:U}));H.displayName="ClockIcon";const P=H,Z=e.forwardRef((a,n)=>e.createElement(E,{ref:n,...a,weights:z}));Z.displayName="FileIcon";const Y=Z;function B({reminder:a,onUpdate:n,onDelete:h}){const u=g=>{const s=c(Number(g)),o=c();return s.isSame(o,"day")?`Today at ${s.format("HH:mm")}`:s.isSame(o.add(1,"day"),"day")?`Tomorrow at ${s.format("HH:mm")}`:s.format("YYYY-MM-DD HH:mm")},r=g=>{const s=c(Number(g)),o=c(),f=s.diff(o,"hour"),x=s.diff(o,"minute")%60;return f<0||x<0?"Overdue":f===0?`${x}m remaining`:`${f}h ${x}m remaining`},m=r(a.reminderDate)==="Overdue",l=a.priority||"low",i=l==="high"?"High":l==="medium"?"Medium":"Low",p=`${L[l]} text-fg-default`,j=a.noteId.toString(),M=m?"text-fg-error":"text-fg-tertiary",V=a.content?.trim()||a.note?.title||"Untitled reminder",y=a.note?.title||"Untitled note";return t.jsxs("div",{className:"surface-base flex flex-col gap-4 p-4",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsx("div",{className:"min-w-0 flex-1",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs font-medium text-fg-tertiary",children:[t.jsx("span",{className:`h-2.5 w-2.5 rounded-full border border-border-subtle ${p}`}),i]}),t.jsx("p",{className:"min-w-0 line-clamp-2 text-base font-semibold leading-6 text-fg-default",children:V})]})}),t.jsx(b,{button:t.jsxs("button",{type:"button",className:"focus-ring-soft inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-[10px] border border-transparent bg-transparent text-fg-tertiary outline-none transition-colors hover:border-border-subtle hover:bg-hover-subtle hover:text-fg-default",children:[t.jsx(N,{className:"h-5 w-5 text-current"}),t.jsx("span",{className:"sr-only",children:"Reminder actions"})]}),items:[{name:"Delete",onClick:()=>h(a.id,j)}]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-secondary",children:[t.jsx(Y,{size:14}),t.jsx(v,{to:w,params:{id:String(a.note?.id??a.noteId)},className:"truncate transition-colors hover:text-fg-default hover:underline",children:y})]}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm text-fg-secondary",children:[t.jsx(P,{size:14}),t.jsx("span",{className:"font-medium",children:u(a.reminderDate)}),t.jsx("span",{className:"h-1 w-1 rounded-full bg-border-secondary"}),t.jsx("span",{className:`text-xs font-medium ${M}`,children:r(a.reminderDate)})]}),t.jsxs(R,{variant:"subtle",size:"sm",onClick:()=>n(a.id,j,{completed:!0}),children:[t.jsx(F,{size:14}),"Complete"]})]})]})}const A=k(C);function W(){const a=A.useNavigate(),{page:n}=A.useSearch(),{onUpdate:h,onDelete:u}=I(),r=25;return t.jsx(D,{title:"Reminders",description:"Manage all your note reminders in one place",children:t.jsx(T,{fallback:t.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[t.jsx(d,{height:"60px"}),t.jsx(d,{height:"60px"}),t.jsx(d,{height:"60px"}),t.jsx(d,{height:"60px"})]}),errorTitle:"Failed to load reminders",errorDescription:"Retry loading the upcoming reminder list.",resetKeys:[n,r],children:t.jsx(O,{searchParams:{offset:(n-1)*r,limit:r},render:({reminders:m,totalCount:l})=>m.length===0?t.jsx($,{title:"No upcoming reminders",description:"Add reminders to your notes to see them here"}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:m.map(i=>t.jsx(B,{reminder:i,onUpdate:h,onDelete:u},i.id))}),l&&r<l&&t.jsx(S,{page:n,last:Math.ceil(l/r),onChange:i=>{a({search:p=>({...p,page:i})})}})]})})})})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./note-vendor-BofYbzmZ.js";import{P as m,Q as g,
|
|
1
|
+
import{j as e}from"./note-vendor-BofYbzmZ.js";import{P as m,Q as g,o as p,F as d,L as j,N as f,E as u,f as N,S as o,e as y,r as R}from"./index-40Y2UsVr.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const x=({children:c,match:a})=>{if(!a)return e.jsx("span",{children:c});const s=new RegExp(`(${a})`,"gi"),r=c.split(s);return e.jsx("span",{children:r.map((i,n)=>s.test(i)?e.jsx("mark",{children:i},n):i)})},h=y(R);function v(){const c=h.useNavigate(),{page:a,query:s}=h.useSearch(),r=10;return e.jsx(m,{title:`Search "${s}"`,variant:"none",children:e.jsx("main",{className:"mx-auto max-w-[896px]",children:e.jsx(g,{fallback:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(o,{height:"64px"}),e.jsx(o,{height:"120px"}),e.jsx(o,{height:"120px"})]}),errorTitle:"Failed to load search results",errorDescription:`Retry loading results for "${s}".`,resetKeys:[s,a],children:e.jsx(p,{searchParams:{query:s,limit:r,offset:(a-1)*r,fields:["content"]},render:({notes:i,totalCount:n})=>e.jsxs(e.Fragment,{children:[e.jsx(d,{fallback:e.jsx(u,{title:"No results found",description:"Try searching for something else."}),children:i.length>0&&i.map(t=>e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"font-semibold text-lg mb-1",children:e.jsx(j,{to:f,params:{id:t.id},children:e.jsx(x,{match:s,children:t.title})})}),e.jsx("div",{className:"bg-muted p-3 rounded-lg",children:JSON.parse(t.content).filter(l=>JSON.stringify(l).includes(s)).map(l=>e.jsx(x,{match:s,children:JSON.stringify(l)}))})]},t.id))}),e.jsx(d,{fallback:null,children:n&&r<n&&e.jsx(N,{page:a,last:Math.ceil(n/r),onChange:t=>{c({search:l=>({...l,page:t})})}})})]})})})})})}export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./note-vendor-BofYbzmZ.js";function t({children:r,className:s=""}){return a.jsx("div",{className:`surface-base ${s}`.trim(),children:r})}export{t as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./note-vendor-BofYbzmZ.js";import{k as x,t as g,q as p,v as m,P as f,Q as u,F as c,L as j,w as y,f as T,E as b,S as t,e as w,x as v}from"./index-40Y2UsVr.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const R=s=>{const{data:r}=x({queryKey:p.tags.list(s.searchParams),async queryFn(){const i=await g({offset:s.searchParams.offset,limit:s.searchParams.limit});if(i.type==="error")throw i;return i.allTags}});return s.render(r)},k=100,P=8,A=12,h=w(v);function S(){const s=h.useNavigate(),{page:r}=h.useSearch(),{containerRef:i,limit:n}=m({minItemWidth:k,gap:P,rows:A});return e.jsx(f,{title:"Tags",description:"Organize and browse notes by tags",children:e.jsx("div",{ref:i,children:e.jsx(u,{fallback:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(t,{width:"90px",height:"36px"}),e.jsx(t,{width:"120px",height:"36px"}),e.jsx(t,{width:"80px",height:"36px"}),e.jsx(t,{width:"100px",height:"36px"}),e.jsx(t,{width:"110px",height:"36px"}),e.jsx(t,{width:"70px",height:"36px"})]}),errorTitle:"Failed to load tags",errorDescription:"Retry loading the tag catalog.",resetKeys:[r,n],children:e.jsx(R,{searchParams:{offset:(r-1)*n,limit:n},render:({tags:l,totalCount:o})=>e.jsx(c,{fallback:e.jsx(b,{title:"There are no tags",description:"Try to tag some notes using <@> key."}),children:l.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(a=>e.jsxs(j,{to:y,params:{id:a.id},search:{page:1},className:"inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-3 py-1.5 text-sm font-medium text-fg-secondary transition-colors hover:border-border-secondary hover:bg-hover hover:text-fg-default",children:[a.name," ",e.jsxs("span",{className:"text-fg-tertiary text-xs",children:["(",a.referenceCount,")"]})]},a.id))}),e.jsx(c,{fallback:null,children:o&&n<o&&e.jsx(T,{page:r,last:Math.ceil(o/n),onChange:a=>{s({search:d=>({...d,page:a})})}})})]})})})})})})}export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./note-vendor-BofYbzmZ.js";import{k as h,a4 as x,q as f,a0 as p,P as y,Q as j,F as d,a5 as P,f as N,E as T,S as l,e as k,w as q}from"./index-40Y2UsVr.js";import"./graph-vendor-CUxe67Lr.js";import"./note-core-BCgMq5QA.js";const v=a=>{const{data:i}=h({queryKey:f.notes.tagList(a.searchParams),async queryFn(){const s=await x({query:a.searchParams.query,offset:a.searchParams.offset,limit:a.searchParams.limit});if(s.type==="error")throw s;return s.tagNotes}});return a.render(i)},o=k(q);function S(){const a=o.useNavigate(),{id:i}=o.useParams(),{page:s}=o.useSearch(),r=25,{onDelete:m,onPinned:g}=p();return e.jsx(y,{title:"Tag",variant:"subtle",children:e.jsx(j,{fallback:e.jsxs("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[e.jsx(l,{height:"112px"}),e.jsx(l,{height:"112px"}),e.jsx(l,{height:"112px"})]}),errorTitle:"Failed to load tagged notes",errorDescription:"Retry loading notes for this tag.",resetKeys:[i,s,r],children:e.jsx(v,{searchParams:{query:i,offset:(s-1)*r,limit:r},render:({notes:c,totalCount:n})=>e.jsx(d,{fallback:e.jsx(T,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:c.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:c.map(t=>e.jsx(P,{...t,onPinned:()=>g(t.id,t.pinned),onDelete:()=>m(t.id)},t.id))}),e.jsx(d,{fallback:null,children:n&&r<n&&e.jsx(N,{page:s,last:Math.ceil(n/r),onChange:t=>{a({search:u=>({...u,page:t})})}})})]})})})})})}export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./graph-vendor-CUxe67Lr.js";import{p as l}from"./index-40Y2UsVr.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s={high:"bg-accent-soft-danger",medium:"bg-accent-soft-primary dark:bg-emphasis/70",low:"bg-accent-soft-success"};export{s as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as t,aa as n}from"./index-40Y2UsVr.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 {
|