OptionalanchorOptionalannounceAnnounce the message on open and a validation error on confirm through an
a11y.ScreenReader. Default true; the calls are no-ops where there is no DOM.
Optionalannouncerthe reader announcements go to; the shared one by default, a fake in tests
OptionalblockerWhether a click under the prompt is swallowed rather than reaching the game behind it. On by default: a name not yet given is not something a stray click on the world should be able to act past.
Optionaldimsdim the world behind; true for a modal window, which this is
Optionalinitialthe field's starting text; the caret starts after it
OptionalkeyboardRows of keys rendered beneath the field for pointer-only devices, feeding the same
onText/onAction paths a physical key travels. Omit on a keyboard-first platform.
Optionalmaxthe most characters the field will hold; unlimited when omitted
Optionalmessagethe one-line question above the field, announced politely on open
Optionaloncalled on cancel, then the prompt closes; omit to just close
called with the value, then the prompt closes
Optionaltitlethe window title; also announced by Window itself
OptionalvalidateDecides whether the current value may be confirmed: return an error message to
keep the prompt open, or null (or '') when the value is fine. Runs only on
confirm, so typing never nags; the error clears on the next edit.
where the stack puts the prompt