feat(themes): add catppuccin mocha, nord, and dracula themes

Community-standard palettes mapped to nib's 18-token design system.
Theme cycle extended: dark → paper → tinycard → catppuccin → nord → dracula.
This commit is contained in:
2026-05-17 13:28:10 -04:00
parent 824192f581
commit a854f02854
2 changed files with 76 additions and 6 deletions
+10 -6
View File
@@ -17,6 +17,9 @@
const PAGE_SIZE = 50;
const INTENT_HINTS = { grab: 'scan + copy', read: 'expand + study', fill: 'templates only' };
const READ_TYPES = ['note', 'link', 'decision'];
const FILL_TYPES = ['template', 'checklist'];
const GRAB_TYPES = ['snippet'];
const state = {
view: 'stream',
@@ -363,7 +366,7 @@
html += '<div class="rail-lbl">intent</div>';
for (const k of ['grab', 'read', 'fill']) {
const on = state.intent === k ? ' on' : '';
const count = k === 'grab' ? state.entities.length : k === 'read' ? state.entities.filter(e => e.card_data).length : state.entities.filter(e => e.body && /\$\{.+\}/.test(e.body)).length;
const count = k === 'grab' ? state.entities.filter(e => !e.card_type || GRAB_TYPES.includes(e.card_type)).length : k === 'read' ? state.entities.filter(e => READ_TYPES.includes(e.card_type)).length : state.entities.filter(e => FILL_TYPES.includes(e.card_type)).length;
html += `<button class="rail-item${on}" data-intent="${k}">`;
html += `<span class="rail-arrow">${state.intent === k ? '▸' : ''}</span>`;
html += '<span class="rail-dot"></span>';
@@ -1842,9 +1845,10 @@
});
function filterByIntent(entities) {
if (state.view !== 'cards' || state.intent === 'grab') return entities;
if (state.intent === 'read') return entities.filter(e => e.card_data);
if (state.intent === 'fill') return entities.filter(e => e.body && /\$\{.+\}/.test(e.body));
if (state.view !== 'cards') return entities;
if (state.intent === 'grab') return entities.filter(e => !e.card_type || GRAB_TYPES.includes(e.card_type));
if (state.intent === 'read') return entities.filter(e => READ_TYPES.includes(e.card_type));
if (state.intent === 'fill') return entities.filter(e => FILL_TYPES.includes(e.card_type));
return entities;
}
@@ -1888,8 +1892,8 @@
// ========== Theme ==========
const THEMES = ['dark', 'paper', 'tinycard'];
const THEME_ICONS = { dark: '◑', paper: '◐', tinycard: '◈' };
const THEMES = ['dark', 'paper', 'tinycard', 'catppuccin', 'nord', 'dracula'];
const THEME_ICONS = { dark: '◑', paper: '◐', tinycard: '◈', catppuccin: '◕', nord: '◓', dracula: '◒' };
const themeToggle = $('#theme-toggle');
let nibTheme = localStorage.getItem('nib:theme') || 'dark';