feat(sacred-valley): hybrid free/snap canvas + blank & blackflame cards (2.8.0)

Replace masonry grid with an absolute-positioned 12-col canvas: drag to
move, corner to resize, per-card free/overlap toggle (Alt = no-snap).
Geometry persisted (migration 027: dashboard_layout.geom + extras).
Two new addable decorative cards: blank spacer + animated blackflame
(canvas particle flame). Old layout auto-migrates by flow-placement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-09 22:33:45 +10:00
parent e8f655ed27
commit 600057582e
11 changed files with 552 additions and 144 deletions

View File

@@ -1,14 +1,13 @@
import { el } from '../dom.js';
// Builds the refined-B chrome shell and returns { root, body }. The card module
// fills `body` in its mount(); start()/stop() own its refresh timer.
// fills `body` in its mount(); start()/stop() own its refresh timer. Position +
// size are set by the Sacred Valley canvas (absolute geometry), not here.
// Decorative cards (blank / blackflame) carry no title bar.
export function svCard(def) {
const body = el('div', { class: 'sv-card-body' });
const root = el('div', {
class: 'sv-card', dataset: { cardId: def.id },
style: { gridColumn: 'span ' + (def.span || 6) } // 12-col grid; per-card width
},
el('div', { class: 'sv-card-title' }, def.title),
const root = el('div', { class: 'sv-card', dataset: { cardId: def.id } },
def.title ? el('div', { class: 'sv-card-title' }, def.title) : null,
body
);
return { root, body };