mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-29 19:35:15 +02:00
87 lines
26 KiB
JavaScript
87 lines
26 KiB
JavaScript
|
|
import"../chunks/Bzak7iHL.js";import{o as tt}from"../chunks/CNjeV5xa.js";import{f as de,d as o,e as s,r as t,t as I,p as Oe,a as Pe,n as W,g as e,s as ce,c as ut,h as C,u as B}from"../chunks/CvjSAYrz.js";import{s as y,d as Ye,a as Q,e as Ee}from"../chunks/FzvEaXMa.js";import{i as V}from"../chunks/ciN1mm2W.js";import{e as _e,i as Fe}from"../chunks/DTnG8poT.js";import{c as mt,a as h,f as x}from"../chunks/BsvCUYx-.js";import{s as ft}from"../chunks/ckF4CxmX.js";import{s as te,r as ht}from"../chunks/CNfQDikv.js";import{s as R}from"../chunks/DPl3NjBv.js";import{b as gt}from"../chunks/CVpUe0w3.js";import{b as bt}from"../chunks/D3XWCg9-.js";import{a as j,s as ye}from"../chunks/D81f-o_I.js";import{s as xt,g as Qe}from"../chunks/S0ILvWpb.js";import{b as U}from"../chunks/DJWRm1Ki.js";import{s as at,m as st,e as kt,a as rt,w as Xe,u as _t,i as yt,f as wt}from"../chunks/CtkE7HV2.js";import{i as $t}from"../chunks/Bz1l2A_1.js";import{s as nt}from"../chunks/Bhad70Ss.js";import{t as ee}from"../chunks/Casl2yrL.js";import{a as Ze}from"../chunks/DNjM5a-l.js";import{d as Mt,w as it,g as ot}from"../chunks/DfQhL-hC.js";const Ct=()=>{const a=xt;return{page:{subscribe:a.page.subscribe},navigating:{subscribe:a.navigating.subscribe},updated:a.updated}},At={subscribe(a){return Ct().page.subscribe(a)}};var Dt=x('<div class="flex items-center gap-2 rounded-full border border-[#A33FFF]/40 bg-[#A33FFF]/10 px-3 py-1.5 text-xs shadow-[0_0_12px_rgba(163,63,255,0.15)]" title="Memories currently under top-down suppression (Anderson 2025 SIF)"><div class="relative flex h-2 w-2 items-center justify-center"><span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-[#A33FFF] opacity-75"></span> <span class="relative inline-flex h-2 w-2 rounded-full bg-[#A33FFF]"></span></div> <span class="font-medium text-[#E4C8FF]"> </span></div>');function Tt(a){const r=()=>j(at,"$suppressedCount",l),[l,u]=ye();var g=mt(),$=de(g);{var w=A=>{var _=Dt(),b=o(s(_),2),m=s(b);t(b),t(_),I(()=>y(m,`Actively forgetting ${r()??""} ${r()===1?"memory":"memories"}`)),h(A,_)};V($,A=>{r()>0&&A(w)})}h(a,g),u()}var Et=x('<button type="button" class="toast-item svelte-pry2ep"><div class="toast-accent svelte-pry2ep" aria-hidden="true"></div> <div class="toast-body svelte-pry2ep"><div class="toast-head svelte-pry2ep"><span class="toast-icon svelte-pry2ep" aria-hidden="true"> </span> <span class="toast-title svelte-pry2ep"> </span></div> <div class="toast-sub svelte-pry2ep"> </div></div> <div class="toast-progress svelte-pry2ep" aria-hidden="true"><div class="toast-progress-fill svelte-pry2ep"></div></div></button>'),Ft=x('<div class="toast-layer svelte-pry2ep" aria-live="polite" aria-atomic="false"></div>');function St(a,r){Oe(r,!1);const l=()=>j(ee,"$toasts",u),[u,g]=ye(),$={DreamCompleted:"✦",ConsolidationCompleted:"◉",ConnectionDiscovered:"⟷",MemoryPromoted:"↑",MemoryDemoted:"↓",MemorySuppressed:"◬",MemoryUnsuppressed:"◉",Rac1CascadeSwept:"✺",MemoryDeleted:"✕"};function w(m){return $[m]??"◆"}function A(m){ee.dismiss(m.id)}function _(m,d){(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),ee.dismiss(d.id))}$t();var b=Ft();_e(b,5,l,m=>m.id,(m,d)=>{var k=Et(),D=o(s(k),2),S=s(D),G=s(S),L=s(G,!0);t(G);var N=o(G,2),Z=s(N,!0);t(N),t(S);var H=o(S,2),q=s(H,!0);t(H),t(D),W(2),t(k),I(z=>{te(k,"aria-label",`${e(d).title??""}: ${e(d).body??""}. Click to dismiss.`),nt(k,`--toast-color: ${e(d).color??""}; --toast-dwell: ${e(d).dwellMs??""}ms;`),y(L,z),y(Z,e(d).title),y(q,e(d).body)},[()=>w(e(d).type)]),Q("click",k,()=>A(e(d))),Q("keydown",k,z=>_(z,e(d))),Ee("mouseenter",k,()=>ee.pauseDwell(e(d).id,e(d).dwellMs)),Ee("mouseleave",k,()=>ee.resumeDwell(e(d).id)),Ee("focus",k,()=>ee.pauseDwell(e(d).id,e(d).dwellMs)),Ee("blur",k,()=>ee.resumeDwell(e(d).id)),h(m,k)}),t(b),h(a,b),Pe(),g()}Ye(["click","keydown"]);function ve(a){const r=a.data;if(!r||typeof r!="object")return null;const l=r.timestamp??r.at??r.occurred_at;if(l==null)return null;if(typeof l=="number")return Number.isFinite(l)?l>1e12?l:l*1e3:null;if(typeof l!="string")return null;const u=Date.parse(l);return Numb
|
||
|
|
/* Vestige light-mode overrides — injected by theme.ts.
|
||
|
|
* Activated by [data-theme='light'] on <html>.
|
||
|
|
* Tokens mirror the real names used in app.css so the cascade stays clean. */
|
||
|
|
[data-theme='light'] {
|
||
|
|
/* Core surface palette (slate scale) */
|
||
|
|
--color-void: #f8fafc; /* slate-50 — page background */
|
||
|
|
--color-abyss: #f1f5f9; /* slate-100 */
|
||
|
|
--color-deep: #e2e8f0; /* slate-200 */
|
||
|
|
--color-surface: #f1f5f9; /* slate-100 */
|
||
|
|
--color-elevated: #e2e8f0; /* slate-200 */
|
||
|
|
--color-subtle: #cbd5e1; /* slate-300 */
|
||
|
|
--color-muted: #94a3b8; /* slate-400 */
|
||
|
|
--color-dim: #475569; /* slate-600 */
|
||
|
|
--color-text: #0f172a; /* slate-900 */
|
||
|
|
--color-bright: #020617; /* slate-950 */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Baseline body/html wiring — app.css sets these against the dark
|
||
|
|
* tokens; we just let the variables do the work. Reassert for clarity. */
|
||
|
|
[data-theme='light'] html,
|
||
|
|
html[data-theme='light'] {
|
||
|
|
background: var(--color-void);
|
||
|
|
color: var(--color-text);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Glass surfaces — recompose on a light canvas. The original alphas
|
||
|
|
* are tuned for dark; invert-and-tint for light so panels still read
|
||
|
|
* as elevated instead of vanishing. */
|
||
|
|
[data-theme='light'] .glass {
|
||
|
|
background: rgba(255, 255, 255, 0.65);
|
||
|
|
border: 1px solid rgba(99, 102, 241, 0.12);
|
||
|
|
box-shadow:
|
||
|
|
inset 0 1px 0 0 rgba(255, 255, 255, 0.6),
|
||
|
|
0 4px 24px rgba(15, 23, 42, 0.08);
|
||
|
|
}
|
||
|
|
[data-theme='light'] .glass-subtle {
|
||
|
|
background: rgba(255, 255, 255, 0.55);
|
||
|
|
border: 1px solid rgba(99, 102, 241, 0.1);
|
||
|
|
box-shadow:
|
||
|
|
inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
|
||
|
|
0 2px 12px rgba(15, 23, 42, 0.06);
|
||
|
|
}
|
||
|
|
[data-theme='light'] .glass-sidebar {
|
||
|
|
background: rgba(248, 250, 252, 0.82);
|
||
|
|
border-right: 1px solid rgba(99, 102, 241, 0.14);
|
||
|
|
box-shadow:
|
||
|
|
inset -1px 0 0 0 rgba(255, 255, 255, 0.4),
|
||
|
|
4px 0 24px rgba(15, 23, 42, 0.08);
|
||
|
|
}
|
||
|
|
[data-theme='light'] .glass-panel {
|
||
|
|
background: rgba(255, 255, 255, 0.75);
|
||
|
|
border: 1px solid rgba(99, 102, 241, 0.14);
|
||
|
|
box-shadow:
|
||
|
|
inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
|
||
|
|
0 8px 32px rgba(15, 23, 42, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Halve glow intensity — neon accents stay recognizable without
|
||
|
|
* washing out on slate-50. */
|
||
|
|
[data-theme='light'] .glow-synapse {
|
||
|
|
box-shadow: 0 0 10px rgba(99, 102, 241, 0.15), 0 0 30px rgba(99, 102, 241, 0.05);
|
||
|
|
}
|
||
|
|
[data-theme='light'] .glow-dream {
|
||
|
|
box-shadow: 0 0 10px rgba(168, 85, 247, 0.15), 0 0 30px rgba(168, 85, 247, 0.05);
|
||
|
|
}
|
||
|
|
[data-theme='light'] .glow-memory {
|
||
|
|
box-shadow: 0 0 10px rgba(59, 130, 246, 0.15), 0 0 30px rgba(59, 130, 246, 0.05);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Ambient orbs are gorgeous on black and blinding on white. Tame them. */
|
||
|
|
[data-theme='light'] .ambient-orb {
|
||
|
|
opacity: 0.18;
|
||
|
|
filter: blur(100px);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Scrollbar recolor for the lighter surface. */
|
||
|
|
[data-theme='light'] ::-webkit-scrollbar-thumb {
|
||
|
|
background: #cbd5e1;
|
||
|
|
}
|
||
|
|
[data-theme='light'] ::-webkit-scrollbar-thumb:hover {
|
||
|
|
background: #94a3b8;
|
||
|
|
}
|
||
|
|
`,document.head.appendChild(a)}function et(a){document.documentElement.dataset.theme=a}let O=null,X=null,P=null,Y=null;function aa(){O&&X&&O.removeEventListener("change",X),Y==null||Y(),P==null||P(),O=null,X=null,Y=null,P=null,ta();let a="dark";try{const r=localStorage.getItem(dt);(r==="dark"||r==="light"||r==="auto")&&(a=r)}catch{}return pe.set(a),O=window.matchMedia("(prefers-color-scheme: dark)"),ze.set(O.matches),X=r=>ze.set(r.matches),O.addEventListener("change",X),et(ot(Ue)),Y=Ue.subscribe(et),P=pe.subscribe(()=>{}),()=>{O&&X&&O.removeEventListener("change",X),O=null,X=null,Y==null||Y(),P==null||P(),Y=null,P=null}}var sa=x('<button type="button" class="theme-toggle svelte-1cmi4dh"><span class="icon-wrap svelte-1cmi4dh"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"></path></svg> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="8"></circle><path d="M12 4 A8 8 0 0 0 12 20 Z" fill="currentColor" stroke="none"></path><path d="M12 2v1.5M12 20.5V22M3.5 12H2M22 12h-1.5"></path></svg></span></button>');function ra(a){const r=()=>j(pe,"$theme",l),[l,u]=ye(),g={dark:"Dark",light:"Light",auto:"Auto (system)"},$={dark:"light",light:"auto",auto:"dark"};let w=B(r),A=B(()=>$[e(w)]),_=B(()=>`Toggle theme: ${g[e(w)]} (click for ${g[e(A)]})`);var b=sa(),m=s(b),d=s(m);let k;var D=o(d,2);let S;var G=o(D,2);let L;t(m),t(b),I(()=>{te(b,"aria-label",e(_)),te(b,"title",e(_)),te(b,"data-mode",e(w)),k=R(d,0,"icon svelte-1cmi4dh",null,k,{active:e(w)==="dark"}),S=R(D,0,"icon svelte-1cmi4dh",null,S,{active:e(w)==="light"}),L=R(G,0,"icon svelte-1cmi4dh",null,L,{active:e(w)==="auto"})}),Q("click",b,function(...N){He==null||He.apply(this,N)}),h(a,b),u()}Ye(["click"]);var na=x('<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>'),ia=x('<div title="MCP server uptime"> </div>'),oa=x('<div class="hidden lg:block pt-1"><!></div>'),la=x('<a><span class="text-lg"> </span> <span class="text-[9px]"> </span></a>'),da=x('<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>'),ca=x('<div class="px-4 py-6 text-center text-sm text-muted">No matches</div>'),va=x('<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>'),pa=x('<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-syn
|
||
|
|
${e(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"}`),y(F,e(c).icon),y(ke,e(c).label),y(E,e(c).shortcut)}),h(i,f)}),t(ae);var ue=o(ae,2),we=s(ue);t(ue);var se=o(ue,2),me=s(se),re=s(me),ne=o(re,2),Se=s(ne,!0);t(ne);var ie=o(ne,2),Ie=s(ie);ra(Ie),t(ie),t(me);var fe=o(me,2),he=s(fe),Le=s(he);t(he);var J=o(he,2),Ne=s(J);t(J);var Re=o(J,2);{var je=i=>{var c=ia(),p=s(c);t(c),I(f=>y(p,`up ${f??""}`),[()=>wt(w())]),h(i,c)};V(Re,i=>{w()>0&&i(je)})}t(fe);var ge=o(fe,2);{var Ke=i=>{var c=oa(),p=s(c);Tt(p),t(c),h(i,c)};V(ge,i=>{A()>0&&i(Ke)})}t(se),t(q);var be=o(q,2),$e=s(be);Jt($e,{});var oe=o($e,2),Me=s(oe);ft(Me,()=>r.children),t(oe),t(be);var xe=o(be,2),Ce=s(xe),Ae=s(Ce);_e(Ae,17,()=>S,Fe,(i,c)=>{const p=B(()=>G(e(c).href,l().url.pathname));var f=la(),T=s(f),F=s(T,!0);t(T);var K=o(T,2),ke=s(K,!0);t(K),t(f),I(()=>{te(f,"href",`${U??""}${e(c).href??""}`),R(f,1,`flex flex-col items-center gap-0.5 px-3 py-2 rounded-lg transition-all min-w-[3.5rem]
|
||
|
|
${e(p)?"text-synapse-glow":"text-muted"}`),y(F,e(c).icon),y(ke,e(c).label)}),h(i,f)});var Ve=o(Ae,2);t(Ce),t(xe),t(H);var n=o(H,2);St(n,{});var v=o(n,2);{var M=i=>{var c=va(),p=s(c),f=s(p),T=o(s(f),2);ht(T),bt(T,E=>C(k,E),()=>e(k)),W(2),t(f);var F=o(f,2),K=s(F);_e(K,17,()=>e(L),Fe,(E,le)=>{var Te=da(),Be=s(Te),ct=s(Be,!0);t(Be);var Ge=o(Be,2),vt=s(Ge,!0);t(Ge);var We=o(Ge,2),pt=s(We,!0);t(We),t(Te),I(()=>{y(ct,e(le).icon),y(vt,e(le).label),y(pt,e(le).shortcut)}),Q("click",Te,()=>N(e(le).href)),h(E,Te)});var ke=o(K,2);{var De=E=>{var le=ca();h(E,le)};V(ke,E=>{e(L).length===0&&E(De)})}t(F),t(p),t(c),Q("keydown",c,E=>{E.key==="Escape"&&C(m,!1)}),Q("click",c,E=>{E.target===E.currentTarget&&C(m,!1)}),Q("keydown",T,E=>{E.key==="Enter"&&e(L).length>0&&N(e(L)[0].href)}),gt(T,()=>e(d),E=>C(d,E)),h(i,c)};V(v,i=>{e(m)&&i(M)})}I(i=>{te(z,"href",`${U??""}/graph`),R(re,1,`w-2 h-2 rounded-full ${u()?"bg-recall animate-pulse-glow":"bg-decay"}`),y(Se,u()?"Connected":"Offline"),y(Le,`${g()??""} memories`),y(Ne,`${i??""}% retention`)},[()=>($()*100).toFixed(0)]),Q("click",we,()=>{C(m,!0),C(d,""),requestAnimationFrame(()=>{var i;return(i=e(k))==null?void 0:i.focus()})}),Q("click",Ve,()=>{C(m,!0),C(d,""),requestAnimationFrame(()=>{var i;return(i=e(k))==null?void 0:i.focus()})}),h(a,Z),Pe(),b()}Ye(["click","keydown"]);export{La as component};
|