Improve palette preview: dual artboard, drop register wiring.

Show landing and app wireframes side by side with palette-driven accents instead of PRODUCT.md register and /context.json, matching v4's per-surface modes. Assisted-by: Cursor AI agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-09-01 10:02:39 +05:00
co-authored by Cursor
parent d64909decf
commit f7751fad0c
6 changed files with 197 additions and 317 deletions
+1 -3
View File
@@ -324,9 +324,7 @@ document.addEventListener('picker:screenchange', (event) => activate(event.detai
try {
const get = (url) => fetch(url).then((response) => response.ok ? response.json() : Promise.reject());
const context = get('/context.json').catch(() => ({ register: 'brand' }));
const [cueData, seedData, contextData] = await Promise.all([get('/cues.json'), get('/palettes.json'), context]);
preview.dataset.register = contextData.register === 'product' ? 'product' : 'brand';
const [cueData, seedData] = await Promise.all([get('/cues.json'), get('/palettes.json')]);
cards = [
...cueData.cues.map((id) => ({ id, type: 'cue', palette: cueData.palette[id] })),
...seedData.seeds.map((seed) => ({ ...seed, type: 'seed' })),