ryuk-cli 0.1.1

The `ryuk` command: scaffold a Ryuk app (axum, SeaORM, Inertia/Svelte), generate controllers, models, jobs and mails, run migrations and the dev server.
// Theme: explicit choice lives in localStorage and on <html data-theme>; with no choice the OS preference wins.
// data-eff mirrors the effective theme so the toggle icon can follow it from CSS.
const KEY = "ryuk-theme";
const root = document.documentElement;
const mq = matchMedia("(prefers-color-scheme: light)");

const stored = () => { try { return localStorage.getItem(KEY); } catch { return null; } };
const effective = () => root.dataset.theme ?? (mq.matches ? "light" : "dark");
const sync = () => { root.dataset.eff = effective(); };

export function initTheme() {
  const t = stored();
  if (t === "light" || t === "dark") root.dataset.theme = t;
  sync();
  mq.addEventListener("change", sync);
}

export function toggleTheme() {
  const next = effective() === "dark" ? "light" : "dark";
  root.dataset.theme = next;
  sync();
  try { localStorage.setItem(KEY, next); } catch { /* storage blocked: choice lasts for this page view */ }
  return next;
}