mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-27 09:46:22 +02:00
All sidebar links, mobile nav links, command palette navigation, logo link, and the graph page "Explore Connections" link now correctly use SvelteKit's base path. Also fixes favicon.svg and manifest.json paths in app.html. Fixes: https://github.com/samvallad33/vestige/issues/17 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 lines
8.1 KiB
JavaScript
3 lines
8.1 KiB
JavaScript
import"../chunks/Bzak7iHL.js";import{o as Me}from"../chunks/DUC-ssvh.js";import{p as Ke,d as o,f as Le,t as L,a as Te,h as d,g as t,e as s,r as a,s as R,u as H,G as qe}from"../chunks/BBD-8XME.js";import{d as Fe,a as g,s as v}from"../chunks/DNn3Nckx.js";import{i as de}from"../chunks/RaRNNC-y.js";import{e as V,i as W}from"../chunks/C5a--lgk.js";import{a as _,f as y}from"../chunks/CKcqngaU.js";import{s as Se}from"../chunks/DZuEJlJ5.js";import{s as O,r as Ae}from"../chunks/BVZqxpRe.js";import{s as Q}from"../chunks/CBWLjDtu.js";import{b as Ne}from"../chunks/BxfT1SOA.js";import{b as De}from"../chunks/DtXypsxD.js";import{s as Ge,a as T}from"../chunks/BexJutgU.js";import{s as Ie,g as ce}from"../chunks/cIQD_rb4.js";import{b as u}from"../chunks/BeSd-T80.js";import{w as pe,a as je,i as ze,m as Re}from"../chunks/CruZBLYW.js";const He=()=>{const x=Ie;return{page:{subscribe:x.page.subscribe},navigating:{subscribe:x.navigating.subscribe},updated:x.updated}},Ve={subscribe(x){return He().page.subscribe(x)}};var We=y('<a><span class="text-base w-5 text-center"> </span> <span class="hidden lg:block"> </span> <span class="hidden lg:block ml-auto text-[10px] text-muted/50 font-mono"> </span></a>'),Oe=y('<a><span class="text-lg"> </span> <span class="text-[9px]"> </span></a>'),Qe=y('<button class="w-full flex items-center gap-3 px-4 py-2.5 text-sm text-dim hover:text-text hover:bg-white/[0.04] transition"><span class="text-base w-5 text-center"> </span> <span> </span> <span class="ml-auto text-[10px] text-muted/50 font-mono hidden md:block"> </span></button>'),Be=y('<div class="px-4 py-6 text-center text-sm text-muted">No matches</div>'),Je=y('<div class="fixed inset-0 z-50 flex items-start justify-center pt-[10vh] md:pt-[15vh] px-4 bg-void/60 backdrop-blur-sm"><div class="w-full max-w-lg glass-panel rounded-xl shadow-2xl shadow-synapse/10 overflow-hidden"><div class="flex items-center gap-3 px-4 py-3 border-b border-synapse/10"><span class="text-synapse text-sm">◎</span> <input type="text" placeholder="Navigate to..." class="flex-1 bg-transparent text-text text-sm placeholder:text-muted focus:outline-none"/> <span class="text-[10px] text-muted font-mono bg-white/[0.04] px-1.5 py-0.5 rounded">esc</span></div> <div class="max-h-72 overflow-y-auto py-1"><!> <!></div></div></div>'),Ue=y('<div class="ambient-orb ambient-orb-1" aria-hidden="true"></div> <div class="ambient-orb ambient-orb-2" aria-hidden="true"></div> <div class="ambient-orb ambient-orb-3" aria-hidden="true"></div> <div class="flex flex-col md:flex-row h-screen overflow-hidden bg-void relative z-[1]"><nav class="hidden md:flex w-16 lg:w-56 flex-shrink-0 glass-sidebar flex-col"><a class="flex items-center gap-3 px-4 py-5 border-b border-synapse/10"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-dream to-synapse flex items-center justify-center text-bright text-sm font-bold shadow-lg shadow-synapse/20">V</div> <span class="hidden lg:block text-sm font-semibold text-bright tracking-wide">VESTIGE</span></a> <div class="flex-1 py-3 flex flex-col gap-1 px-2"></div> <div class="px-2 pb-2"><button class="w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-muted hover:text-dim hover:bg-white/[0.03] transition border border-subtle/15"><span class="text-[10px] font-mono bg-white/[0.04] px-1.5 py-0.5 rounded">⌘K</span> <span class="hidden lg:block">Command</span></button></div> <div class="px-3 py-4 border-t border-synapse/10 space-y-2"><div class="flex items-center gap-2 text-xs"><div></div> <span class="hidden lg:block text-dim"> </span></div> <div class="hidden lg:block text-xs text-muted"><div> </div> <div> </div></div></div></nav> <main class="flex-1 flex flex-col min-h-0 pb-16 md:pb-0"><div class="animate-page-in flex-1 min-h-0 overflow-y-auto svelte-12qhfyh"><!></div></main> <nav class="md:hidden fixed bottom-0 inset-x-0 glass border-t border-synapse/10 z-40 safe-bottom svelte-12qhfyh"><div class="flex items-center justify-around px-2 py-1"><!> <button class="flex flex-col items-center gap-0.5 px-3 py-2 rounded-lg text-muted min-w-[3.5rem]"><span class="text-lg">⋯</span> <span class="text-[9px]">More</span></button></div></nav></div> <!>',1);function vt(x,q){Ke(q,!0);const B=()=>T(Ve,"$page",$),J=()=>T(ze,"$isConnected",$),ve=()=>T(Re,"$memoryCount",$),me=()=>T(je,"$avgRetention",$),[$,fe]=Ge();let c=R(!1),f=R(""),w=R(void 0);Me(()=>{pe.connect();function r(e){if((e.metaKey||e.ctrlKey)&&e.key==="k"){e.preventDefault(),d(c,!t(c)),d(f,""),t(c)&&requestAnimationFrame(()=>{var n;return(n=t(w))==null?void 0:n.focus()});return}if(e.key==="Escape"&&t(c)){d(c,!1);return}if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;if(e.key==="/"){e.preventDefault();const n=document.querySelector('input[type="text"]');n==null||n.focus();return}const i={g:"/graph",m:"/memories",t:"/timeline",f:"/feed",e:"/explore",i:"/intentions",s:"/stats"}[e.key.toLowerCase()];i&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&(e.preventDefault(),ce(`${u}${i}`))}return window.addEventListener("keydown",r),()=>{pe.disconnect(),window.removeEventListener("keydown",r)}});const C=[{href:"/graph",label:"Graph",icon:"◎",shortcut:"G"},{href:"/memories",label:"Memories",icon:"◈",shortcut:"M"},{href:"/timeline",label:"Timeline",icon:"◷",shortcut:"T"},{href:"/feed",label:"Feed",icon:"◉",shortcut:"F"},{href:"/explore",label:"Explore",icon:"◬",shortcut:"E"},{href:"/intentions",label:"Intentions",icon:"◇",shortcut:"I"},{href:"/stats",label:"Stats",icon:"◫",shortcut:"S"},{href:"/settings",label:"Settings",icon:"⚙",shortcut:","}],xe=C.slice(0,5);function U(r,e){const p=e.startsWith(u)?e.slice(u.length)||"/":e;return r==="/graph"?p==="/"||p==="/graph":p.startsWith(r)}let E=H(()=>t(f)?C.filter(r=>r.label.toLowerCase().includes(t(f).toLowerCase())):C);function X(r){d(c,!1),d(f,""),ce(`${u}${r}`)}var Y=Ue(),F=o(Le(Y),6),S=s(F),Z=s(S),A=o(Z,2);V(A,21,()=>C,W,(r,e)=>{const p=H(()=>U(t(e).href,B().url.pathname));var i=We(),n=s(i),b=s(n,!0);a(n);var m=o(n,2),k=s(m,!0);a(m);var M=o(m,2),l=s(M,!0);a(M),a(i),L(()=>{O(i,"href",`${u??""}${t(e).href??""}`),Q(i,1,`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 text-sm
|
|
${t(p)?"bg-synapse/15 text-synapse-glow border border-synapse/30 shadow-[0_0_12px_rgba(99,102,241,0.15)] nav-active-border":"text-dim hover:text-text hover:bg-white/[0.03] border border-transparent"}`),v(b,t(e).icon),v(k,t(e).label),v(l,t(e).shortcut)}),_(r,i)}),a(A);var N=o(A,2),ue=s(N);a(N);var P=o(N,2),D=s(P),ee=s(D),te=o(ee,2),be=s(te,!0);a(te),a(D);var ae=o(D,2),G=s(ae),he=s(G);a(G);var se=o(G,2),ge=s(se);a(se),a(ae),a(P),a(S);var I=o(S,2),re=s(I),_e=s(re);Se(_e,()=>q.children),a(re),a(I);var ne=o(I,2),oe=s(ne),ie=s(oe);V(ie,17,()=>xe,W,(r,e)=>{const p=H(()=>U(t(e).href,B().url.pathname));var i=Oe(),n=s(i),b=s(n,!0);a(n);var m=o(n,2),k=s(m,!0);a(m),a(i),L(()=>{O(i,"href",`${u??""}${t(e).href??""}`),Q(i,1,`flex flex-col items-center gap-0.5 px-3 py-2 rounded-lg transition-all min-w-[3.5rem]
|
|
${t(p)?"text-synapse-glow":"text-muted"}`),v(b,t(e).icon),v(k,t(e).label)}),_(r,i)});var ye=o(ie,2);a(oe),a(ne),a(F);var we=o(F,2);{var ke=r=>{var e=Je(),p=s(e),i=s(p),n=o(s(i),2);Ae(n),De(n,l=>d(w,l),()=>t(w)),qe(2),a(i);var b=o(i,2),m=s(b);V(m,17,()=>t(E),W,(l,h)=>{var K=Qe(),j=s(K),$e=s(j,!0);a(j);var z=o(j,2),Ce=s(z,!0);a(z);var le=o(z,2),Ee=s(le,!0);a(le),a(K),L(()=>{v($e,t(h).icon),v(Ce,t(h).label),v(Ee,t(h).shortcut)}),g("click",K,()=>X(t(h).href)),_(l,K)});var k=o(m,2);{var M=l=>{var h=Be();_(l,h)};de(k,l=>{t(E).length===0&&l(M)})}a(b),a(p),a(e),g("keydown",e,l=>{l.key==="Escape"&&d(c,!1)}),g("click",e,l=>{l.target===l.currentTarget&&d(c,!1)}),g("keydown",n,l=>{l.key==="Enter"&&t(E).length>0&&X(t(E)[0].href)}),Ne(n,()=>t(f),l=>d(f,l)),_(r,e)};de(we,r=>{t(c)&&r(ke)})}L(r=>{O(Z,"href",`${u??""}/graph`),Q(ee,1,`w-2 h-2 rounded-full ${J()?"bg-recall animate-pulse-glow":"bg-decay"}`),v(be,J()?"Connected":"Offline"),v(he,`${ve()??""} memories`),v(ge,`${r??""}% retention`)},[()=>(me()*100).toFixed(0)]),g("click",ue,()=>{d(c,!0),d(f,""),requestAnimationFrame(()=>{var r;return(r=t(w))==null?void 0:r.focus()})}),g("click",ye,()=>{d(c,!0),d(f,""),requestAnimationFrame(()=>{var r;return(r=t(w))==null?void 0:r.focus()})}),_(x,Y),Te(),fe()}Fe(["click","keydown"]);export{vt as component};
|