A caller's event handlers fail inside a slot-taking component that has a plain client script. The production case is the maintained DialogPanel: it declares the platform systemSheet value, while the caller provides two confirmation buttons and their functions. With no caller mustache expression in the panel slot, clicking a button throws ReferenceError: cancelDemolition is not defined and leaves the dialog open.
A standalone Chrome regression using the maintained Dialog, DialogPanel, DialogBackdrop and DialogTitle reproduces the failure. The page owns shown, answer, cancel() and confirm(); its panel slot has only static text and event-bound buttons. Opening succeeds, but cancellation fails. Adding unrelated text expressions is not a solution.
The component compiler selects static event extraction from the component's own script alone. That moves caller-authored slot handlers into the component's local script instead of retaining reactive scope lookup. Related game issue: stacksjs/the-settlers-iii-remake#226.
Acceptance:
- Keep caller event handlers on the maintained reactive scope path when a plain-script component receives reactive caller slot events.
- Preserve the component's own client bindings and ordinary static component behavior.
- Retain a real Chrome regression covering both cancellation and confirmation, safe focus and opener restoration.
- Pass relevant compiler/component regressions, lint, types, full source tests and normal patch release gates.
- Verify original published packages and adopt them through Stacks before game acceptance.