feat(webui): adopt the violet palette, and give the outlet the viewport

Takes style.css, lib/theme.ts and index.html's pre-paint script from the
palette work on worktree-groovy-imagining-widget (73e602a7..72034249), leaving
its flat topbar and route table behind. The theme is a data-theme attribute set
before the first paint, so a reload does not flash the wrong palette, and
color-scheme moves with it.

The outlet takes the viewport height below the topbar so an empty state has
somewhere to sit.
This commit is contained in:
sam committed 2026-09-20 18:52:15 +10:00
1 parent 2bddb9f36a
commit 393e30ed1a
7 files changed
+272 -131

No files matched your search

+2 -1
View File
@@ -1 +1,2 @@
@import "https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--radius-xs:.125rem;--radius-md:calc(var(--radius) - 2px);--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", sans-serif;--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100Line truncated
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--radius-xs:.125rem;--radius-md:10px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", sans-serif;--default-mono-font-family:ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color EmoLine truncated
+1 -1
View File
@@ -3,4 +3,4 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
`)&&(bi(e,0)||ui(),e.textContent=t.children)}if(d){if(_||b||!o||f&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in d)if(_&&(a.endsWith(`value`)||a===`indeterminate`)||c(a)&&!te(a)||a[0]===`.`||t&&!te(a)||u&&u.includes(a)){if(_i(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e,`onClick`,null,d.onClick,void 0,n);else if(f&4&&en(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&As(x,n,t),h&&hr(t,null,n,`beforeMount`),((x=d&&d.onVnodeMounted)||h||l)&&ts(()=>{x&&As(x,n,t),l&&g.enter(e),h&&hr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=Ds(d[t]),g=h.type===as;e?(g&&!u&&t+1<p&&Ds(d[t+1]).type===as&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i(``),r):(m||(m=!0,bi(r,1)||ui()),n(null,h,r,null,o,s,pi(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&mi(f)&&f.data===`]`?a(t.anchor=f):(ui(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,c,l)=>{if(Si(e,t)||ui(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,pi(d),c),r&&(r.vnode.el=t.el,mo(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&mi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var gi=new Set([`src`,`srcset`,`href`,`poster`]);function _i(e,t,n){return gi.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var vi=`data-allow-mismatch`,yi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function bi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(vi);)e=e.parentElement;return xi(e&&e.getAttribute(vi),t)}function xi(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(yi[t])}}function Si(e,t){return bi(e.parentElement,1)||Ci(e)||wi(t)}function Ci(e){return e.nodeType===1&&xi(e.getAttribute(vi),1)}function wi({props:e}){let t=e&&e[vi];return typeof t==`string`&&xi(t,1)}var Ti=le().requestIdleCallback||(e=>setTimeout(e,1)),Ei=le().cancelIdleCallback||(e=>clearTimeout(e)),Di=(e=1e4)=>t=>{let n=Ti(t,{timeout:e});return()=>Ei(n)};function Oi(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var ki=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Oi(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Ai=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},ji=(e=[])=>(t,n)=>{b(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Mi(e,t){if(mi(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(mi(r)){if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++}r=r.nextSibling}}else t(e)}var Ni=e=>!!e.type.__asyncLoader;function Pi(e){y(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return H({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Mi(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=Ps;if(ri(e),u)return()=>Fi(u,e);let t=t=>{l=null,Vn(t,e,13,!r)};if(s&&e.suspense||Vs)return p().then(t=>()=>Fi(t,e)).catch(e=>(t(e),()=>r?K(r,{error:e}):null));let a=R(!1),c=R(),d=R(!!i),f,m;return Qi(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Ii(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Fi(u,e);if(c.value&&r)return K(r,{error:c.value});if(n&& Line truncated
`))),e[Hl]=zl(i);let a=r||i.props&&i.props.type===`number`;ol(e,t?`change`:`input`,t=>{t.target.composing||e[Hl](Wl(e.value,n,a))}),(n||a)&&ol(e,`change`,()=>{e.value=Wl(e.value,n,a)}),t||(ol(e,`compositionstart`,Bl),ol(e,`compositionend`,Vl),ol(e,`change`,Vl))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Ul];delete e[Ul],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[Hl](Wl(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Hl]=zl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ce(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Kl={deep:!0,created(e,t,n){e[Hl]=zl(n),ol(e,`change`,()=>{let t=e._modelValue,n=Ql(e),r=e.checked,i=e[Hl];if(m(t)){let e=Te(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(g(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i($l(e,r))})},mounted:ql,beforeUpdate(e,t,n){e[Hl]=zl(n),ql(e,t,n)}};function ql(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(m(t))i=Te(t,r.props.value)>-1;else if(g(t))i=t.has(r.props.value);else{if(t===n)return;i=we(t,$l(e,!0))}e.checked!==i&&(e.checked=i)}var Jl={created(e,{value:t},n){e.checked=we(t,n.props.value),e[Hl]=zl(n),ol(e,`change`,()=>{e[Hl](Ql(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Hl]=zl(r),t!==n&&(e.checked=we(t,r.props.value))}},Yl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,ol(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ce(Ql(e)):Ql(e)),r=e.multiple,i=r?g(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?m(i)?t.slice():t:i];try{e[Hl](i)}finally{Xn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Hl]=zl(r)},mounted(e,{value:t}){Zl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Hl]=zl(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Xl(t,n[1],n[0]))&&Zl(e,t)}};function Xl(e,t,n){if(!n||m(e))return we(e,t);if(g(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Zl(e,t){let n=e.multiple,r=m(t);if(!n||r||g(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Ql(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Te(t,o)>-1}else a.selected=t.has(o)}else if(we(Ql(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ql(e){return`_value`in e?e._value:e.value}function $l(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var eu={created(e,t,n){nu(e,t,n,null,`created`)},mounted(e,t,n){nu(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){nu(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){nu(e,t,n,r,`updated`)}};function tu(e,t){switch(e){case`SELECT`:return Yl;case`TEXTAREA`:return Gl;default:switch(t){case`checkbox`:return Kl;case`radio`:return Jl;default:return Gl}}}function nu(e,t,n,r,i){let a=tu(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function ru(){Gl.getSSRProps=({value:e})=>({value:e}),Jl.getSSRProps=({value:e},t)=>{if(t.props&&we(t.props.value,e))return{checked:!0}},Kl.getSSRProps=({value:e},t)=>{if(m(e)){if(t.props&&Te(e,t.props.value)>-1)return{checked:!0}}else if(g(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},eu.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=tu(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var iu=[`ctrl`,`shift`,`alt`,`meta`],au={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},ou=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=au[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},su={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},cu=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ae(n.key);if(t.some(e=>e===r||su[e]===r))return e(n)}))},lu=u({patchProp:vl},vc),uu,du=!1;function fu(){return uu||=Po(lu)}function pu(){return uu=du?uu:Fo(lu),du=!0,uu}var mu=((...e)=>{fu().render(...e)}),hu=((...e)=>{pu().hydrate(...e)}),gu=((...e)=>{let t=fu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=yu(e);if(!r)return;let i=t._component;!y(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,vu(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),_u=(( Line truncated
`)].join(`
`))}return()=>i.value||r.value||o.value?tc(t.default({present:o.value})[0],{ref:e=>{let t=ep(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),nm=H({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=sp(n.default()),r=e.findIndex(e=>e.type!==os);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?q(t,i.props):t,o=Cs({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),rm=[`area`,`img`,`input`],im=H({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&rm.includes(r)?()=>tc(r,t):r===`template`?()=>tc(nm,t,{default:n.default}):()=>tc(e.as,t,{default:n.default})}});function am(){let e=R();return{primitiveElement:e,currentElement:J(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:ep(e))}}var om=`dismissableLayer.pointerDownOutside`,sm=`dismissableLayer.focusOutside`;function cm(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function lm(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1),a=R(()=>{});return xr(o=>{if(!Bf||!fn(n))return;let s=async n=>{let o=n.target;if(t?.value&&o){if(cm(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Ff(om,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{fn(n)&&(i.value=!0)}}}function um(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1);return xr(a=>{if(!Bf||!fn(n))return;let o=async n=>{if(!t?.value)return;await Xn(),await Xn();let r=n.target;t.value&&r&&!cm(t.value,r)&&n.target&&!i.value&&Ff(sm,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{fn(n)&&(i.value=!0)},onBlurCapture:()=>{fn(n)&&(i.value=!1)}}}var dm=H({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=X(),o=J(()=>a.value?.ownerDocument??globalThis.document),s=J(()=>pp.layersRoot),c=J(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=J(()=>pp.layersWithOutsidePointerEventsDisabled.size>0),u=J(()=>{let e=Array.from(s.value),[t]=[...pp.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=lm(async e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&u.value&&!t&&(r(`pointerDownOutside`,e),r(`interactOutside`,e),await Xn(),e.defaultPrevented||r(`dismiss`))},a,()=>n.present),f=um(e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&!t&&(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return ip(`Escape`,e=>{n.present&&c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),V([a,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{e&&n&&t&&(pp.layersWithOutsidePointerEventsDisabled.size===0&&(pp.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),pp.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{pp.layersWithOutsidePointerEventsDisabled.delete(e),pp.layersWithOutsidePointerEventsDisabled.size===0&&!If(pp.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=pp.originalBodyPointerEvents)}))},{immediate:!0}),V([a,()=>n.present],([e,t],n,r)=>{e&&t&&(s.value.add(e),r(()=>{s.value.delete(e)}))},{immediate:!0}),xr(e=>{e(()=>{a.value&&(s.value.delete(a.value),pp.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(W(),G(z(im),{ref:z(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:P({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:z(f).onFocusCapture,onBlurCapture:z(f).onBlurCapture,onPointerdownCapture:z(d).onPointerDownCapture},{default:B(()=>[U(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),fm=zf(()=>R([]));function pm(){let e=fm();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=mm(e.value,t),e.value.unshift(t)},remove(t){e.value=mm( Line truncated
`))}return()=>i.value||r.value||o.value?tc(t.default({present:o.value})[0],{ref:e=>{let t=ep(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),nm=H({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=sp(n.default()),r=e.findIndex(e=>e.type!==os);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?q(t,i.props):t,o=Cs({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),rm=[`area`,`img`,`input`],im=H({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&rm.includes(r)?()=>tc(r,t):r===`template`?()=>tc(nm,t,{default:n.default}):()=>tc(e.as,t,{default:n.default})}});function am(){let e=R();return{primitiveElement:e,currentElement:J(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:ep(e))}}var om=`dismissableLayer.pointerDownOutside`,sm=`dismissableLayer.focusOutside`;function cm(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function lm(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1),a=R(()=>{});return xr(o=>{if(!Bf||!fn(n))return;let s=async n=>{let o=n.target;if(t?.value&&o){if(cm(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Ff(om,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{fn(n)&&(i.value=!0)}}}function um(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1);return xr(a=>{if(!Bf||!fn(n))return;let o=async n=>{if(!t?.value)return;await Xn(),await Xn();let r=n.target;t.value&&r&&!cm(t.value,r)&&n.target&&!i.value&&Ff(sm,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{fn(n)&&(i.value=!0)},onBlurCapture:()=>{fn(n)&&(i.value=!1)}}}var dm=H({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=X(),o=J(()=>a.value?.ownerDocument??globalThis.document),s=J(()=>pp.layersRoot),c=J(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=J(()=>pp.layersWithOutsidePointerEventsDisabled.size>0),u=J(()=>{let e=Array.from(s.value),[t]=[...pp.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=lm(async e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&u.value&&!t&&(r(`pointerDownOutside`,e),r(`interactOutside`,e),await Xn(),e.defaultPrevented||r(`dismiss`))},a,()=>n.present),f=um(e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&!t&&(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return ip(`Escape`,e=>{n.present&&c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),V([a,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{e&&n&&t&&(pp.layersWithOutsidePointerEventsDisabled.size===0&&(pp.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),pp.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{pp.layersWithOutsidePointerEventsDisabled.delete(e),pp.layersWithOutsidePointerEventsDisabled.size===0&&!If(pp.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=pp.originalBodyPointerEvents)}))},{immediate:!0}),V([a,()=>n.present],([e,t],n,r)=>{e&&t&&(s.value.add(e),r(()=>{s.value.delete(e)}))},{immediate:!0}),xr(e=>{e(()=>{a.value&&(s.value.delete(a.value),pp.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(W(),G(z(im),{ref:z(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:P({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:z(f).onFocusCapture,onBlurCapture:z(f).onBlurCapture,onPointerdownCapture:z(d).onPointerDownCapture},{default:B(()=>[U(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),fm=zf(()=>R([]));function pm(){let e=fm();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=mm(e.value,t),e.value.unshift(t)},remove(t){e.value=mm( Line truncated
+14
View File
@@ -5,6 +5,20 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>archie-ui</title>
<script>
// Set before the first paint so a reload does not flash the wrong
// palette. Kept in sync with src/lib/theme.ts; a blocked localStorage
// falls back to dark, which is the default theme.
(function () {
var theme = "dark";
try {
if (localStorage.getItem("archie.theme") === "light") theme = "light";
} catch (e) {
/* default stands */
}
document.documentElement.dataset.theme = theme;
})();
</script>
<script type="module" crossorigin src="/assets/index.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index.css">
</head>
+14
View File
@@ -5,6 +5,20 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>archie-ui</title>
<script>
// Set before the first paint so a reload does not flash the wrong
// palette. Kept in sync with src/lib/theme.ts; a blocked localStorage
// falls back to dark, which is the default theme.
(function () {
var theme = "dark";
try {
if (localStorage.getItem("archie.theme") === "light") theme = "light";
} catch (e) {
/* default stands */
}
document.documentElement.dataset.theme = theme;
})();
</script>
</head>
<body>
<div id="app"></div>
+1 -1
View File
@@ -13,7 +13,7 @@ onMounted(() => {
<template>
<TooltipProvider :delay-duration="350">
<Topbar :hidden="hidden" />
<main>
<main class="min-h-[calc(100svh-3.5rem)]">
<!--
Keyed on the path and its parameters but not the query: a query-only
change is an entry state, so the page keeps the operator's filters,
+36 -19
View File
@@ -1,33 +1,50 @@
import { ref, watchEffect } from "vue";
import { ref, type Ref } from "vue";
/**
* The theme is an attribute on <html>, not a class, because index.html sets it
* from localStorage before the first paint. Everything downstream reads the CSS
* variables once that attribute is present, so nothing in the app branches on
* the theme itself.
*/
export const THEME_KEY = "archie.theme";
export type Theme = "dark" | "light";
const STORAGE_KEY = "archie.theme";
export function isTheme(value: unknown): value is Theme {
return value === "dark" || value === "light";
}
function stored(): Theme | null {
/** Dark is the default: archied is a daemon you check at odd hours. */
export function storedTheme(): Theme {
try {
const value = localStorage.getItem(STORAGE_KEY);
return value === "dark" || value === "light" ? value : null;
const stored = localStorage.getItem(THEME_KEY);
return isTheme(stored) ? stored : "dark";
} catch {
return null;
// Private windows and blocked site data throw on access. The default is
// correct there, so this is not worth surfacing.
return "dark";
}
}
export const theme = ref<Theme>(stored() ?? "dark");
watchEffect(() => {
const root = document.documentElement;
root.classList.toggle("dark", theme.value === "dark");
// Binds the UA's own painting (form controls, scrollbars, the canvas behind
// an overscroll) to the theme.
root.style.colorScheme = theme.value;
export function applyTheme(theme: Theme): void {
document.documentElement.dataset.theme = theme;
try {
localStorage.setItem(STORAGE_KEY, theme.value);
localStorage.setItem(THEME_KEY, theme);
} catch {
// A blocked store costs persistence, not the toggle.
// The theme still applies for this page view; only persistence is lost.
}
});
}
export function toggleTheme() {
theme.value = theme.value === "dark" ? "light" : "dark";
const current = ref<Theme>(storedTheme());
/** The live theme, shared app-wide. Apply it through `setTheme` or `toggleTheme`. */
export const theme: Ref<Theme> = current;
export function setTheme(next: Theme): void {
current.value = next;
applyTheme(next);
}
export function toggleTheme(): void {
setTheme(current.value === "dark" ? "light" : "dark");
}
+204 -109
View File
@@ -1,129 +1,224 @@
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');
@import "@fontsource-variable/geist";
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn-vue/tailwind.css";
@custom-variant dark (&:is(.dark *));
/* The theme is an attribute on <html>, not a class, so the inline script in
index.html can set it before the first paint and a reload does not flash the
wrong palette. */
@custom-variant dark (&:is([data-theme="dark"] *));
/*
* Design tokens. Dark is the default because archied is a daemon you check at
* odd hours; light is a toggle, not an afterthought, so both themes define the
* same variable set and nothing else in the app references a raw colour.
*
* Semantic names only. Never `--violet`; always `--primary` or `--ok`, so a
* palette change is one file rather than a grep.
*
* Names on the left are shadcn-vue's contract, so its components pick the
* palette up with no per-component overrides. Names on the right that shadcn
* does not define (status colours, the subtle foreground, the glass surfaces)
* are ours.
*
* The dark theme is a saturated violet on a near-black canvas with a violet
* cast; the light theme is the ink and cream set inverted. Every foreground is
* checked against every surface it lands on, hover states included, at AA
* (4.5:1), and the ratios in the comments are the measured ones.
*/
@theme inline {
--font-sans: 'Geist Variable', sans-serif;
--font-heading: var(--font-sans);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-foreground: var(--foreground);
--font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
--color-background: var(--background);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-primary-soft: var(--primary-soft);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-destructive-soft: var(--destructive-soft);
--color-border: var(--border);
--color-border-strong: var(--border-strong);
--color-input: var(--input);
--color-ring: var(--ring);
--color-hairline: var(--hairline);
/* Foreground ramp. --muted-foreground is shadcn's; --fg-subtle is the
quieter third step the dashboard's secondary text uses. */
--color-fg-muted: var(--fg-muted);
--color-fg-subtle: var(--fg-subtle);
/* Status. Task state, gate results and trend direction all draw from here,
so the same colour always means the same thing wherever it appears. */
--color-ok: var(--ok);
--color-ok-soft: var(--ok-soft);
--color-warn: var(--warn);
--color-warn-soft: var(--warn-soft);
--color-danger: var(--danger);
--color-danger-soft: var(--danger-soft);
--color-info: var(--info);
--color-info-soft: var(--info-soft);
--color-idle: var(--idle);
--color-idle-soft: var(--idle-soft);
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--radius-xl: 20px;
}
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
/* ── Dark (default) ─────────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
color-scheme: dark;
/* Near-black carrying a violet cast, so the accent reads as light coming
out of the canvas rather than a swatch laid on top of grey. */
--background: #0F0A16;
--card: #191026;
--card-foreground: #F0EAF7;
--popover: #1F1430;
--popover-foreground: #F0EAF7;
--foreground: #F0EAF7;
/* Ink on the violet is 5.64:1; white on it is 4.02:1 and fails, so the
button label is the canvas colour in both directions, never white. */
--primary: #A76BF5;
--primary-foreground: #0F0A16;
--primary-soft: rgba(167, 107, 245, 0.16);
/* shadcn's `accent` is the hover surface, not the brand colour. */
--secondary: #271838;
--secondary-foreground: #F0EAF7;
--muted: #271838;
--muted-foreground: #B9AECB;
--accent: #271838;
--accent-foreground: #F0EAF7;
--destructive: #F87A88;
--destructive-foreground: #0F0A16;
--destructive-soft: rgba(248, 122, 136, 0.16);
--border: #3A2A52;
--border-strong: #503A6B;
--input: #3A2A52;
--ring: #A76BF5;
--fg-muted: #B9AECB;
--fg-subtle: #A99DBD;
--ok: #4FD08C;
--ok-soft: rgba(79, 208, 140, 0.16);
--warn: #F0B65C;
--warn-soft: rgba(240, 182, 92, 0.16);
--danger: #F87A88;
--danger-soft: rgba(248, 122, 136, 0.16);
--info: #A76BF5;
--info-soft: rgba(167, 107, 245, 0.16);
--idle: #A79BB8;
--idle-soft: rgba(167, 155, 184, 0.16);
/* The brand's second hue: the magenta the petals turn at their tips, so the
canvas wash runs violet into magenta instead of one flat colour. */
--brand-alt: #C061E8;
--bg-blur: rgba(15, 10, 22, 0.6);
/* Panels are translucent so the canvas wash shows through and the whole
workspace reads as one lit surface rather than opaque cards on a picture. */
--surface-glass: rgba(25, 16, 38, 0.62);
--surface-glass-strong: rgba(15, 10, 22, 0.8);
--workspace: rgba(12, 8, 18, 0.55);
--hairline: rgba(240, 234, 247, 0.07);
--wash-a: rgba(167, 107, 245, 0.14);
--wash-b: rgba(192, 97, 232, 0.12);
--wash-c: rgba(246, 239, 234, 0.04);
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
--shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
--shadow-workspace: 0 24px 70px rgba(0, 0, 0, 0.6);
--transition: 140ms cubic-bezier(0.4, 0, 0.2, 1);
--radius-pill: 999px;
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
/* ── Light ──────────────────────────────────────────────────────────────── */
[data-theme="light"] {
color-scheme: light;
--background: #F6EFEA;
--card: #FFFFFF;
--card-foreground: #2E2A35;
--popover: #FFFFFF;
--popover-foreground: #2E2A35;
--foreground: #2E2A35;
--primary: #8B5FBF;
--primary-foreground: #FFFFFF;
--primary-soft: rgba(139, 95, 191, 0.12);
--secondary: #E9D7F7;
--secondary-foreground: #2E2A35;
--muted: #E9D7F7;
--muted-foreground: #635B6B;
--accent: #E9D7F7;
--accent-foreground: #2E2A35;
--destructive: #BE2C43;
--destructive-foreground: #FFFFFF;
--destructive-soft: rgba(190, 44, 67, 0.10);
--border: #DDCFC2;
--border-strong: #C4B3A4;
--input: #DDCFC2;
--ring: #8B5FBF;
--fg-muted: #635B6B;
--fg-subtle: #6E6577;
--ok: #0C7548;
--ok-soft: rgba(12, 117, 72, 0.10);
--warn: #8A5A12;
--warn-soft: rgba(138, 90, 18, 0.10);
--danger: #BE2C43;
--danger-soft: rgba(190, 44, 67, 0.10);
--info: #8B5FBF;
--info-soft: rgba(139, 95, 191, 0.12);
--idle: #5A6270;
--idle-soft: rgba(90, 98, 112, 0.10);
--brand-alt: #C9A3E6;
--bg-blur: rgba(246, 239, 234, 0.6);
--surface-glass: rgba(255, 255, 255, 0.72);
--surface-glass-strong: rgba(255, 255, 255, 0.88);
--workspace: rgba(255, 255, 255, 0.55);
--hairline: rgba(46, 42, 53, 0.06);
--wash-a: rgba(139, 95, 191, 0.10);
--wash-b: rgba(201, 163, 230, 0.16);
--wash-c: rgba(12, 117, 72, 0.05);
--shadow-sm: 0 1px 2px rgba(46, 42, 53, 0.06);
--shadow-md: 0 8px 28px rgba(46, 42, 53, 0.10);
--shadow-workspace: 0 24px 70px rgba(46, 42, 53, 0.14);
}
@layer base {
* {
@apply border-border outline-ring/50;
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
@apply font-sans;
body {
@apply bg-background text-foreground;
@apply font-sans;
}
}
}