Restructure shared Astro sources and import aliases (#2737)

This commit is contained in:
Paweł Kuna
2026-07-30 23:58:48 +02:00
committed by GitHub
parent 0f8dcb0a3c
commit ad2ed849dd
492 changed files with 1469 additions and 1714 deletions
+11
View File
@@ -0,0 +1,11 @@
/**
* 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.
*/
export function includeArgCount(props: Record<string, unknown>, keys: readonly string[]): number {
return keys.filter((k) => props[k] !== undefined).length
}