{(store.vault?.name?.[0] || 'N').toUpperCase()}
{store.vault?.name}
{#if store.pinned.length}
Favorites
{#each store.pinned as p (p.id)}
store.openPage(p.id)} onkeydown={(e) => e.key === 'Enter' && store.openPage(p.id)} oncontextmenu={(e) => { e.preventDefault(); e.stopPropagation(); store.menu = { x: e.clientX, y: e.clientY, id: p.id }; }} > {p.title}
{/each}
{/if} {#if store.searches.length}
Saved searches
{#each store.searches as s (s.q)}
store.runSearch(s.q)} onkeydown={(e) => e.key === 'Enter' && store.runSearch(s.q)}> {s.q}
{/each}
{/if}
Pages
{ e.preventDefault(); store.menu = { x: e.clientX, y: e.clientY, id: null }; }}> {#if store.filterTag}
Tagged #{store.filterTag}
{#each tagged as p, i (p.id)}
store.openPage(p.id)} onkeydown={(e) => e.key === 'Enter' && store.openPage(p.id)} oncontextmenu={(e) => { e.preventDefault(); e.stopPropagation(); store.menu = { x: e.clientX, y: e.clientY, id: p.id }; }} > {p.title}
{/each} {:else} {#each roots as p (p.id)} {:else}

No pages yet.

{/each} {/if}
{#if store.tagCounts.length}{/if} {#if store.filterTag && !store.tagsOpen} {/if}
{#if store.tagCounts.length > TAG_FIND_AT}
{ if (e.key === 'Escape') { tagQ = ''; e.currentTarget.blur(); } }} /> {#if tagQ}{/if}
{/if}
{#each shownTags as [tag, n] (tag)} {:else} {store.tagCounts.length ? 'No tag matches' : 'No tags yet'} {/each}
{store.pages.filter((p) => p.exists).length} notes