Render Modal as real markup; drain scripts via CaptureScript (#2742)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Paweł Kuna
2026-08-03 00:55:32 +02:00
committed by GitHub
co-authored by StarDev
parent 66dc336726
commit 575d68572f
200 changed files with 10670 additions and 10096 deletions
+3 -6
View File
@@ -1,10 +1,7 @@
/**
* Reproduces the LiquidJS `include['x']` meta-property bug: when a param isn't
* explicitly passed, referencing it as a bare property (rather than a lookup)
* falls back to the include's argument COUNT instead of undefined. Some ported
* components (ui/spinner.html, ui/nav-segmented.html) rely on this to emit
* "junk" classes like `spinner-border-2` / `nav-2` that the DOM parity diff
* does not strip, so they must be reproduced verbatim.
* Returns how many of the given prop keys are explicitly set (not undefined).
* Some components use this count as a class suffix when `size` (or similar) is
* omitted, e.g. `spinner-border-2` or `nav-2`.
*/
export function includeArgCount(props: Record<string, unknown>, keys: readonly string[]): number {
return keys.filter((k) => props[k] !== undefined).length