MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / densityFromTweaks

Function densityFromTweaks

packages/shared-domain/src/overrides.ts:95–98  ·  view source on GitHub ↗
(tweaks: Record<string, string> | undefined)

Source from the content-addressed store, hash-verified

93
94/** Resolve the active density level from the persisted `[tweaks]` map. */
95export 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. */

Callers 3

overrides.test.tsFile · 0.90
NoteListFunction · 0.90
WindowedLeafEntriesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected