(tweaks: Record<string, string> | undefined)
| 93 | |
| 94 | /** Resolve the active density level from the persisted `[tweaks]` map. */ |
| 95 | export function densityFromTweaks(tweaks: Record<string, string> | undefined): DensityLevel { |
| 96 | const v = tweaks?.density |
| 97 | return v === 'compact' || v === 'comfortable' ? v : 'default' |
| 98 | } |
| 99 | |
| 100 | /** The CSS vars a non-default level sets — derived from DENSITY so the preset |
| 101 | * and the virtualizers can't fall out of sync. */ |
no outgoing calls
no test coverage detected