feat(editor): F4.5b the device sheet for routers and home routers

Measured first: SheetRun now types into FILIUS' router and home router
panels, records five forwarding tables (holeTabelle) and steps in the
panel's table. Java turns a card address that passes the pattern but not
IP.ipCheck (".0.0.1") into null and the router panel throws; an empty
gateway is marked red yet taken; a refused table cell is stored as null;
a home router's DHCP client leaves its DHCP server running. None of the
nulls is adopted. The core's routeTableRows matches all five tables.

- doc: card addresses (the first card mirrored in the device's settings),
  router gateway, RIP, manual routes (a new row once all four cells pass,
  a cell, removal); the sheet reads cards with what their cable joins and
  the whole table
- editor: Java's tabs (general, each card titled by its address, the
  forwarding table greyed out under RIP; general, LAN, WAN on a home
  router); the open card's cable drawn active in Java's green

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 11:51:03 +00:00
co-authored by Claude Opus 5.5
parent 9b7ec2fc72
commit eff9433673
22 changed files with 2201 additions and 119 deletions
+4 -2
View File
@@ -22,16 +22,18 @@ export interface SheetFieldProps {
/** A name for the browser tests and the label's input mode. */
readonly name: string;
readonly inputMode?: 'text' | 'decimal' | 'numeric';
/** A field still to be filled (a new row's cell): empty and untouched, it is not marked. */
readonly unfilled?: boolean;
}
export function SheetField({ label, value, rule, onCommit, disabled = false, readOnly = false, name, inputMode = 'text' }: SheetFieldProps) {
export function SheetField({ label, value, rule, onCommit, disabled = false, readOnly = false, name, inputMode = 'text', unfilled = false }: SheetFieldProps) {
const t = useTranslate();
const id = useId();
// What is typed and not yet taken; null shows the device's value.
const [draft, setDraft] = useState<string | null>(null);
const [refused, setRefused] = useState(false);
const shown = draft ?? value;
const marked = !readOnly && 'invalid' in checkField(rule, shown);
const marked = !readOnly && !(unfilled && draft === null && shown === '') && 'invalid' in checkField(rule, shown);
const commit = () => {
if (draft === null || readOnly) return;