Revert the implicit-any typing of src/

Reverts 2428f44. The .d.ts files beside the JS modules and the
annotations threaded through src/ to satisfy noImplicitAny go;
tsconfig turns noImplicitAny off instead. The JS modules become
TypeScript in the next commit, so their types come from inference.

Kept from that commit, since they're runtime fixes rather than types:
- OrganizationDetail's website and email pills get an href and label
  (they arrive as bare strings, not link objects).
- The chapter map falls back to FALLBACK_COLOR for a region with no
  colour instead of painting its tiles black.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-26 15:32:28 -05:00
parent 4618ad8e67
commit 5cedc68fd7
38 changed files with 340 additions and 1302 deletions

View file

@ -18,18 +18,17 @@
record) wants to be a separate component that fails on its own.
═══════════════════════════════════════════════════════════════ */
import type { ReactNode } from "react";
import { Link } from "react-router-dom";
import { useAuth } from "../../lib/auth.tsx";
import { SITE_VERSION } from "../../lib/version.ts";
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
import { CMS_NAV, FORMS_NAV, PANEL_NAV, target, type AdminNavItem } from "./adminNav.js";
import { CMS_NAV, FORMS_NAV, PANEL_NAV, target } from "./adminNav.js";
/* One card. The title link is stretched over the whole card with
`after:absolute`, which makes the card clickable without nesting
an anchor inside an anchor; the sub-links sit above it on z-10 so
they stay separately clickable. */
function NavCard({ item }: { item: AdminNavItem }) {
function NavCard({ item }) {
const to = target(item);
// Drop the child that just repeats the card's own destination —
@ -76,15 +75,7 @@ function NavCard({ item }: { item: AdminNavItem }) {
);
}
function CardBlock({
title,
blurb,
children,
}: {
title: string;
blurb?: string;
children: ReactNode;
}) {
function CardBlock({ title, blurb, children }) {
return (
<div className="mt-10">
<div className="flex items-baseline gap-3">
@ -96,7 +87,7 @@ function CardBlock({
);
}
function PanelSection({ title, children }: { title: string; children: ReactNode }) {
function PanelSection({ title, children }) {
return (
<section className="border-b border-[#138ba0]/10 px-5 py-4 last:border-b-0">
<h2 className="text-xs font-semibold uppercase tracking-wider text-[#4a6b72]/70">
@ -116,7 +107,7 @@ const QUICK_ADD = [
export default function AdminHome() {
const { user } = useAuth();
const role = user ? (ROLE_LABELS[user.role] ?? user.role) : undefined;
const role = ROLE_LABELS[user?.role] ?? user?.role;
return (
<div className="grid gap-8 lg:grid-cols-[1fr_17rem] lg:items-start">