feat(foundry): add map camera spiral controls

This commit is contained in:
Codex
2026-07-16 12:47:48 +03:00
parent 5e8c1cc3fc
commit e96401358b
11 changed files with 802 additions and 43 deletions
+7 -4
View File
@@ -4,14 +4,19 @@ import { cn } from "./cn.js";
export interface CheckerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
checked: boolean;
label: string;
description?: string;
/** Helper copy belongs outside the control, immediately before it. */
description?: never;
onChange: (checked: boolean) => void;
}
type IsNever<Value> = [Value] extends [never] ? true : false;
type Assert<Value extends true> = Value;
type _CheckerDescriptionMustStayForbidden = Assert<IsNever<Exclude<CheckerProps["description"], undefined>>>;
export function Checker({
checked,
label,
description,
description: _unsupportedDescription,
onChange,
disabled,
className,
@@ -32,10 +37,8 @@ export function Checker({
>
<span className="nodedc-checker__copy">
<span className="nodedc-checker__label">{label}</span>
{description ? <span className="nodedc-checker__description">{description}</span> : null}
</span>
<span className="nodedc-checker__indicator" aria-hidden="true" />
</button>
);
}