codelore-lib 0.27.3

CodeLore — Behavioral Code Analyzer library
Documentation
/* Source CSS for the SPA dashboard.
 *
 * This file is the INPUT to the Tailwind v4 standalone CLI; the
 * compiled artifact `../tailwind.daisyui.min.css` is what
 * `output/spa.rs` inlines into the rendered HTML. Re-generate via:
 *
 *     just spa-css-rebuild
 *
 * (See `README.md` in this directory for the one-time CLI install +
 * the DaisyUI `.mjs` re-download workflow.)
 *
 * Plugin path semantics: the standalone CLI does NOT resolve
 * `@plugin "daisyui"` to an npm package — it expects a relative path
 * to a plugin source file. The two DaisyUI bundles (`daisyui.mjs` +
 * `daisyui-theme.mjs`) sit next to this file; DaisyUI 5 ships its
 * plugin code as `.mjs`. Per the official standalone-CLI install
 * doc: <https://daisyui.com/docs/install/standalone/>.
 */

@import "tailwindcss";

/* Don't treat the plugin source files as content to scan for class
 * names — they contain code, not markup. Without these `@source not`
 * exclusions the CLI extracts class-shaped substrings from DaisyUI's
 * compiled JavaScript, bloating the output with utility classes
 * nothing references. */
@source not "./daisyui.mjs";
@source not "./daisyui-theme.mjs";

/* DaisyUI 5 theme config:
 *   - `light --default`   → applied when no `data-theme` is set AND
 *                            the OS is in light mode (or has no
 *                            `prefers-color-scheme` opinion).
 *   - `dark --prefersdark` → applied via a `@media (prefers-color-scheme: dark)`
 *                            block when no `data-theme` override is present,
 *                            so first-paint matches the OS without any JS.
 *
 * Explicit user toggle still wins: the SPA's theme controller writes
 * `data-theme="light|dark"` on `<html>`, which beats the media query.
 * Persisted preference (Alpine `$persist`) re-applies the attribute
 * on subsequent loads.
 */
@plugin "./daisyui.mjs" {
    themes: light --default, dark --prefersdark;
}
@plugin "./daisyui-theme.mjs";

/* The standalone CLI scans `@source` paths for class usage. Both
 * `template.html` (static markup) and the `js/` widget modules
 * (dynamically rendered chart containers + KPI tiles + drawer body)
 * carry class names the pruner needs to see. Embedded data JSON and
 * ECharts/d3 internals never produce class names of their own. */
@source "../template.html";
@source "../js";

/* CodeLore brand accent palette lives inline in `template.html` as
 * `--accent` / `--accent-warn` / `--accent-danger` CSS variables on
 * `:root`, where the legacy stylesheet + ECharts widgets (via
 * `getCssVar`) both read them. A previous version also mirrored
 * them through `@theme { --color-codelore-accent: ... }` to expose
 * `text-codelore-accent` / `bg-codelore-accent` Tailwind utilities
 * to the markup — but nothing in template/widgets ever consumed
 * those classes (verified via grep), so the declarations were dead
 * tokens. Removed. If a future widget wants Tailwind brand
 * utilities, re-introduce this `@theme` block AND wire the
 * corresponding utility class into the markup at the same time.
 */