CI / Typecheck, lint, tests, e2e (push) Failing after 3m51s
- Title screen over a real-time voxel office rendered at low resolution and quantized to a rotating 32-colour palette with Bayer dithering; day part and season re-light the scene and every surface. - 16-bit UI kit: name-plate dialogs, menu cursor, inventory, XP bar, badges, NPC speech, GAME OVER with CONTINUE, hand-placed 12x12 icons, Fusion Pixel font (Latin subset preloaded). - Sections as a game: quest log (onboarding), character select (AI CEO / AI Co-Founder), inventory (features), party roster (providers), live download XP, save point (all v1.5.1 builds), FAQ as NPC dialog, credits. - Downloads and source point to the Gitea release; the download function only redirects to git.zacharyzhang.com. - Tailwind and the old components removed; unit tests for platform/downloads, rewritten e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
991 B
TypeScript
21 lines
991 B
TypeScript
import type { DayPart, Season } from "../../lib/palette";
|
|
|
|
/** Self-contained (no outer references) so the boot script can inline it with Function#toString. */
|
|
export function overrideFrom(search: string): { part: DayPart | null; season: Season | null } {
|
|
const query = new URLSearchParams(search);
|
|
const part = query.get("time");
|
|
const season = query.get("season");
|
|
return {
|
|
part: part === "dawn" || part === "day" || part === "dusk" || part === "night" ? part : null,
|
|
season: season === "spring" || season === "summer" || season === "autumn" || season === "winter" ? season : null,
|
|
};
|
|
}
|
|
|
|
/** Self-contained for the same reason: writes the palette variables and day-part attributes onto <html>. */
|
|
export function applyPalette(vars: Record<string, string>, part: DayPart, season: Season): void {
|
|
const root = document.documentElement;
|
|
for (const name in vars) root.style.setProperty(name, vars[name]!);
|
|
root.dataset.daypart = part;
|
|
root.dataset.season = season;
|
|
}
|