islands-css 0.1.2

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
13
14
15
16
17
pub mod merger;
pub mod variants;

// Re-export paste under the hidden name the variants! macro references.
// Callers invoke `islands_css::variants! { ... }` and the expansion uses
// `$crate::__paste!` — this re-export satisfies that path.
#[doc(hidden)]
pub use paste::paste as __paste;

/// Merge Tailwind class strings, with later classes winning on conflicts.
///
/// Backed by `tailwind_fuse` (v4 class-set aware). If v4 coverage proves
/// incomplete during Phase F, swap `merger::merge` for a hand-rolled
/// `phf::Map`-based conflict-group lookup without changing this public API.
pub fn cn(parts: &[&str]) -> String {
    merger::merge(parts)
}