islands-css 0.1.1

Tailwind class merging (cn) and a typed variants! macro for islands.rs, with shadcn-style conflict resolution.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Merge Tailwind class strings using `tailwind_fuse`.
///
/// `tailwind_fuse::merge::tw_merge_slice` returns `String` directly (verified against
/// tailwind_fuse 0.3.2 source). It deduplicates conflicting Tailwind prefixes across
/// the input parts (last wins), matching shadcn's `clsx + tailwind-merge` semantics.
///
/// If `tailwind_fuse`'s coverage is insufficient, replace the body with a
/// `phf::Map<&'static str, &'static str>` conflict-group lookup per project rule
/// `use-hashmap-or-phf.md` — the `cn()` API stays identical.
pub fn merge(parts: &[&str]) -> String {
    tailwind_fuse::merge::tw_merge_slice(parts)
}