@blossom-carousel/svelte
Version:
A native-scroll-first carousel component for Svelte.
12 lines (11 loc) • 474 B
TypeScript
/**
* Counts elements carrying the `data-blossom-slide` attribute in an HTML
* string (the server-rendered output of a carousel's children snippet).
*
* A small tag-aware scanner rather than a bare regex, so that:
* - text content that happens to contain the literal attribute name is not
* counted,
* - a `>` inside a quoted attribute value does not truncate the tag,
* - comments are skipped.
*/
export declare function countSlideMarkers(html: string): number;