README: a hero that shows the app

This commit is contained in:
CRTkafa 2026-10-03 15:27:40 +07:00
parent 6f6721d32d
commit 7530fb1de7
32 changed files with 933 additions and 71 deletions

View file

@ -1,4 +1,4 @@
<p align="center"><img src="assets/readme/hero.webp" width="880" alt="wayBetter for X: Windows 98 on the left pane, Night Ink on the right, two accounts in one window"></p> <p align="center"><img src="assets/readme/hero.webp" width="880" alt="wayBetter for X: three accounts side by side in one window (the deck)"></p>
<h1 align="center">wayBetter for X</h1> <h1 align="center">wayBetter for X</h1>

View file

@ -13,6 +13,7 @@
"test": "node --test tests/*.test.ts", "test": "node --test tests/*.test.ts",
"test:e2e": "node scripts/observer-e2e.mjs", "test:e2e": "node scripts/observer-e2e.mjs",
"test:themes": "node scripts/theme-matrix.mjs", "test:themes": "node scripts/theme-matrix.mjs",
"test:invariants": "node scripts/theme-invariants.mjs",
"test:ui-kit": "node scripts/build-inject.mjs && node scripts/ui-kit-verify.mjs", "test:ui-kit": "node scripts/build-inject.mjs && node scripts/ui-kit-verify.mjs",
"observer:build": "node scripts/build-observer.mjs && node scripts/build-inject.mjs", "observer:build": "node scripts/build-observer.mjs && node scripts/build-inject.mjs",
"tauri": "tauri", "tauri": "tauri",

View file

@ -0,0 +1,162 @@
// Theme engine v3 invariant suite over the static x.com fixtures (plan 6): every built-in theme x cell x
// width, rendered in Chromium with the real theme runtime, measured by waybetter's themeInvariants
// (I1-I8, I10) and I9 (forced :hover over CDP). Numbers first; crops only for failures.
//
// node scripts/theme-invariants.mjs [--themes=a,b] [--cells=home,account-menu] [--widths=1280,1920]
// [--json] [--baseline] [--strict] [--out=dir]
//
// --json prints per-theme, per-invariant failure counts and the delta against the committed baseline
// --baseline writes verification/theme-v3/baseline.json from this run (all themes, cells, widths only)
// --strict exit 1 when any non-exempt count is above 0 (report-only otherwise, plan step 2)
// Output: <out>/report.json, <out>/REPORT.md (under 8 KB), <out>/crops/ (at most 3 per invariant per theme).
// The fixtures approximate x.com: passing here is not a live X test (the live runner is verification/theme-qa).
import { build } from 'esbuild';
import { mkdir, writeFile, readFile, rm } from 'node:fs/promises';
import { existsSync } from 'node:fs';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { join } from 'node:path';
import { chromium } from 'playwright';
import { CELLS, CELL_WIDTHS, fixtureHtml } from './theme-matrix/fixtures.mjs';
const root = fileURLToPath(new URL('../', import.meta.url));
const args = Object.fromEntries(process.argv.slice(2).map(arg => { const [k, v] = arg.replace(/^--/, '').split('='); return [k, v ?? true]; }));
const list = value => (typeof value === 'string' ? value.split(',').filter(Boolean) : null);
const v3 = join(root, '../../verification/theme-v3');
const out = args.out ?? v3;
const IDS = ['I1', 'I1b', 'I2', 'I3', 'I4', 'I5', 'I6', 'I7', 'I8', 'I9', 'I10'];
const WIDTHS = [600, 1000, 1280, 1440, 1920, 2560];
const bundle = async (contents, globalName) => (await build({ stdin: { contents, resolveDir: root, loader: 'ts' }, bundle: true, format: 'iife', globalName, write: false, target: 'chrome120', minify: true })).outputFiles[0].text;
const themeJs = await bundle("import './src/inject/xSite.ts'; export { installTheme } from './src/inject/theme.ts';", 'BT');
const invJs = await bundle("export { runInvariants } from '../../waybetter/packages/runtime/src/themeInvariants.ts';", 'WBInv');
const { BUILTIN_THEMES } = await import(pathToFileURL(join(root, 'src/inject/themeSpec.ts')).href);
const SPEC = Object.fromEntries(BUILTIN_THEMES.map(t => [t.id, t]));
const themes = list(args.themes) ?? BUILTIN_THEMES.map(t => t.id);
const cells = list(args.cells) ?? Object.keys(CELLS).filter(c => !c.startsWith('chat-') || c === 'chat-group');
const widthsFor = cell => (list(args.widths)?.map(Number) ?? (CELL_WIDTHS[cell] ? CELL_WIDTHS[cell].filter(w => w >= 600) : WIDTHS));
const optsFor = id => ({ exemptLeak: id === 'x', pack: !!SPEC[id]?.icons?.pack, access: SPEC[id]?.decor?.focusRing === 'bold' ? 'high' : 'standard' });
/** I9: rows under forced :hover. The hover fill must not be an accent-hue tint of a theme without its own hover colour. */
async function hoverCheck(page, cdp, theme) {
if (theme === 'x') return { count: 0, findings: [] };
const { root: doc } = await cdp.send('DOM.getDocument', { depth: 0 });
const findings = [];
const sels = ['article[data-testid="tweet"]', '[data-testid="cellInnerDiv"] > div', '[role="menuitem"]', 'nav[role="navigation"] > a'];
for (const s of sels) {
const { nodeIds } = await cdp.send('DOM.querySelectorAll', { nodeId: doc.nodeId, selector: s });
for (const nodeId of nodeIds.slice(0, 3)) {
const before = await page.evaluate(([sel, i]) => { const e = document.querySelectorAll(sel)[i]; return e && getComputedStyle(e).backgroundColor; }, [s, nodeIds.indexOf(nodeId)]);
await cdp.send('CSS.forcePseudoState', { nodeId, forcedPseudoClasses: ['hover'] });
const r = await page.evaluate(([sel, i]) => {
const e = document.querySelectorAll(sel)[i]; if (!e) return null;
const accent = getComputedStyle(document.documentElement).getPropertyValue('--wb-accent').trim() || getComputedStyle(document.documentElement).getPropertyValue('--bt-accent').trim();
return { bg: getComputedStyle(e).backgroundColor, accent, rect: (r => [r.left, r.top, r.width, r.height].map(Math.round))(e.getBoundingClientRect()) };
}, [s, nodeIds.indexOf(nodeId)]);
await cdp.send('CSS.forcePseudoState', { nodeId, forcedPseudoClasses: [] });
if (!r || r.bg === before) continue;
const m = /rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?/.exec(r.bg); if (!m) continue;
const [rr, gg, bb] = [+m[1], +m[2], +m[3]]; const max = Math.max(rr, gg, bb), min = Math.min(rr, gg, bb);
const sat = max ? (max - min) / max : 0;
// A tinted hover: saturated and translucent (X's accent-alpha wash), on a theme that did not choose a hover colour.
if (sat > 0.25 && m[4] !== undefined && +m[4] < 0.3 && !SPEC[theme]?.colors?.hover) findings.push({ id: 'I9', sel: s, rect: r.rect, detail: `hover ${r.bg} is an accent-hue tint` });
}
}
return { count: findings.length, findings };
}
await rm(join(out, 'crops'), { recursive: true, force: true });
await mkdir(join(out, 'crops'), { recursive: true });
await mkdir(join(out, 'fixtures'), { recursive: true });
const totals = Object.fromEntries(themes.map(t => [t, Object.fromEntries(IDS.map(id => [id, 0]))]));
const byWidth = {}; const failures = []; const crops = {}; const errors = [];
const browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE || undefined });
try {
const page = await browser.newPage({ viewport: { width: 1280, height: 900 } });
const cdp = await page.context().newCDPSession(page);
await cdp.send('DOM.enable'); await cdp.send('CSS.enable');
await page.emulateMedia({ reducedMotion: 'reduce' });
page.on('pageerror', e => errors.push(e.message));
for (const cell of cells) {
// One X mode per theme: the owner's (Lights out); X default is measured in it too, as a baseline.
const file = join(out, 'fixtures', `${cell}.dark.html`);
await writeFile(file, fixtureHtml(cell, 'dark'));
for (const width of widthsFor(cell)) {
await page.setViewportSize({ width, height: 900 });
await page.goto(pathToFileURL(file).href);
await page.addScriptTag({ content: `${themeJs}\n${invJs}\nwindow.__bt = BT.installTheme(window);` });
await page.waitForTimeout(1700);
await page.addStyleTag({ content: ':root:root:root *,:root:root:root *::before,:root:root:root *::after{transition:none !important;animation-duration:0s !important}' });
for (const theme of themes) {
await page.evaluate(preset => window.__bt.apply({ preset }), theme);
await page.evaluate(() => new Promise(r => requestAnimationFrame(() => setTimeout(r, 150))));
const rep = await page.evaluate(o => WBInv.runInvariants(document, o), { ...optsFor(theme), keep: 3 });
const hover = await hoverCheck(page, cdp, theme);
rep.counts.I9 = hover.count; rep.findings.push(...hover.findings);
const row = (byWidth[`${theme}@${width}`] ??= Object.fromEntries(IDS.map(id => [id, 0])));
for (const id of IDS) { totals[theme][id] += rep.counts[id] ?? 0; row[id] += rep.counts[id] ?? 0; }
for (const f of rep.findings) {
const key = `${theme}:${f.id}`;
failures.push({ theme, width, cell, ...f });
if ((crops[key] ?? 0) >= 3 || f.rect[2] <= 0 || f.rect[3] <= 0) continue;
crops[key] = (crops[key] ?? 0) + 1;
const [x, y, w, h] = f.rect; const pad = 24;
const clip = { x: Math.max(0, x - pad), y: Math.max(0, y - pad), width: Math.min(700, w + 2 * pad), height: Math.min(400, h + 2 * pad) };
clip.width = Math.min(clip.width, width - clip.x); clip.height = Math.min(clip.height, 900 - clip.y);
if (clip.width > 4 && clip.height > 4) {
const name = `${theme}-${f.id}-${crops[key]}.png`;
await page.screenshot({ path: join(out, 'crops', name), clip }).catch(() => {});
failures.at(-1).crop = `crops/${name}`;
}
}
}
}
}
} finally { await browser.close(); }
// I11 theme purity (static): theme documents carry no css or selector-shaped strings; the engine (runtime,
// X inject, shell) never branches on a theme id. Counted per theme for documents, under "engine" for code.
import { readdirSync, readFileSync, statSync } from 'node:fs';
const purity = { engine: [] };
const SELECTORY = /[.#\[][\w-]+.*[{:>]|\{[^}]*:[^}]*\}/;
const walkStrings = (v, path, hit) => { if (typeof v === 'string') { if (SELECTORY.test(v) && !/^https?:/.test(v)) hit(path); } else if (v && typeof v === 'object') for (const [k, x] of Object.entries(v)) { if (k === 'css' && x) hit(`${path}.css`); else walkStrings(x, `${path}.${k}`, hit); } };
const storeDir = join(root, '../web/public/store/themes');
for (const t of themes) {
const hits = []; walkStrings(SPEC[t] ?? {}, t, p => hits.push(p));
const f = join(storeDir, `${t}.json`); if (existsSync(f)) walkStrings(JSON.parse(readFileSync(f, 'utf8')), `store:${t}`, p => hits.push(p));
purity[t] = hits; totals[t].I11 = hits.length;
}
const ids = BUILTIN_THEMES.map(t => t.id).filter(id => id !== 'x');
const idCompare = new RegExp(`(\\.id|preset|theme)\\s*[!=]==?\\s*['"](${ids.join('|')})['"]|['"](${ids.join('|')})['"]\\s*[!=]==?`);
const walk = d => readdirSync(d).flatMap(n => { const q = join(d, n); return statSync(q).isDirectory() ? (n === 'node_modules' || n === 'dist' ? [] : walk(q)) : /\.(ts|tsx)$/.test(n) && !/\.test\./.test(n) ? [q] : []; });
for (const dir of [join(root, '../../waybetter/packages/runtime/src'), join(root, 'src/inject'), join(root, '../../waybetter/packages/shell/src')]) {
for (const file of walk(dir)) readFileSync(file, 'utf8').split('\n').forEach((line, i) => { if (idCompare.test(line)) purity.engine.push(`${file.slice(file.indexOf('src'))}:${i + 1}`); });
}
IDS.push('I11'); for (const t of themes) totals[t].I11 ??= 0;
// Report
const sum = t => IDS.reduce((n, id) => n + (t === 'x' && id === 'I2' ? 0 : totals[t][id]), 0);
const basePath = join(v3, 'baseline.json');
const baseline = existsSync(basePath) ? JSON.parse(await readFile(basePath, 'utf8')) : null;
const delta = t => baseline?.totals?.[t] ? Object.fromEntries(IDS.map(id => [id, totals[t][id] - (baseline.totals[t][id] ?? 0)])) : null;
const meta = { generated: new Date().toISOString(), cells: cells.length, widths: [...new Set(cells.flatMap(widthsFor))], themes: themes.length, note: 'Static x.com fixtures (Lights out), not live X. X default is a baseline (I2 exempt).' };
await writeFile(join(out, 'report.json'), JSON.stringify({ ...meta, totals, purity, byWidth, failures, errors }, null, 1));
let md = `# Theme invariants (fixtures)\n\n${meta.generated.slice(0, 16)}Z. ${meta.themes} themes, ${meta.cells} cells, widths ${meta.widths.join(', ')}. ${meta.note}\n\n| theme | ${IDS.join(' | ')} | total |\n|---|${IDS.map(() => '---|').join('')}---|\n`;
for (const t of themes) md += `| ${t} | ${IDS.map(id => totals[t][id]).join(' | ')} | ${sum(t)} |\n`;
md += '\n## Worst findings\n\n';
const seen = new Set();
for (const f of failures.sort((a, b) => (a.value ?? 99) - (b.value ?? 99))) {
const k = `${f.theme}:${f.id}:${f.sel}`; if (seen.has(k)) continue; seen.add(k);
const line = `- ${f.theme} ${f.width} ${f.cell} ${f.id}: ${f.detail.slice(0, 90)} \`${f.sel.slice(-70)}\`${f.crop ? ` [crop](${f.crop})` : ''}\n`;
if (md.length + line.length > 7800) { md += '- (more in report.json)\n'; break; }
md += line;
}
await writeFile(join(out, 'REPORT.md'), md);
if (args.baseline) {
if (list(args.themes) || list(args.cells) || list(args.widths)) throw new Error('--baseline needs the full matrix (no --themes/--cells/--widths)');
await writeFile(basePath, JSON.stringify({ generated: meta.generated, cells, widths: meta.widths, totals }, null, 1));
}
if (args.json) console.log(JSON.stringify(Object.fromEntries(themes.map(t => [t, { counts: totals[t], total: sum(t), delta: delta(t) }])), null, 1));
else { console.log(md.split('\n## ')[0]); if (errors.length) console.log(`page errors: ${errors.length} (${errors[0]})`); }
if (args.strict && themes.some(t => t !== 'x' && sum(t) > 0)) process.exitCode = 1;

View file

@ -36,6 +36,8 @@ const bundle = (await build({
bundle: true, format: 'iife', globalName: 'BT', write: false, target: 'chrome120', minify: true, bundle: true, format: 'iife', globalName: 'BT', write: false, target: 'chrome120', minify: true,
})).outputFiles[0].text; })).outputFiles[0].text;
const { BUILTIN_THEMES } = await import(pathToFileURL(join(root, 'src/inject/themeSpec.ts')).href); const { BUILTIN_THEMES } = await import(pathToFileURL(join(root, 'src/inject/themeSpec.ts')).href);
// Themes whose pack must cover the whole rail (the line packs sit close to X's own icons, so they may fall back).
const THEME_PACK = new Set(BUILTIN_THEMES.filter(t => t.icons?.pack === 'retro-98').map(t => t.id));
const themes = list(args.themes) ?? BUILTIN_THEMES.map(t => t.id); const themes = list(args.themes) ?? BUILTIN_THEMES.map(t => t.id);
const cells = list(args.cells) ?? Object.keys(CELLS); const cells = list(args.cells) ?? Object.keys(CELLS);
@ -181,8 +183,12 @@ function inspect() {
const icon = item.querySelector('svg'); const b = icon?.getBoundingClientRect(); const icon = item.querySelector('svg'); const b = icon?.getBoundingClientRect();
return !b || b.width < 8 || b.height < 8 || getComputedStyle(icon).visibility === 'hidden'; return !b || b.width < 8 || b.height < 8 || getComputedStyle(icon).visibility === 'hidden';
}).map(item => item.getAttribute('data-testid') || item.getAttribute('aria-label')); }).map(item => item.getAttribute('data-testid') || item.getAttribute('aria-label'));
// Rail items whose icon is X's own line drawing although the theme draws a pack: the pack paints the
// svg's background or mask, so an svg with neither kept X's icon (owner, 1.0.3: one set everywhere).
const painted = svg => { const cs = getComputedStyle(svg); return cs.backgroundImage !== 'none' || (cs.maskImage && cs.maskImage !== 'none') || (cs.webkitMaskImage && cs.webkitMaskImage !== 'none'); };
const navLineIcon = [...document.querySelectorAll('header[role="banner"] nav[role="navigation"] > :is(a,button) svg')].filter(svg => svg.getBoundingClientRect().width > 2 && !painted(svg)).map(svg => svg.closest('a,button').getAttribute('aria-label'));
return { return {
navMiss, navNoIcon, chat, short: texts.filter(t => t.need && t.ratio < t.need).slice(0, 4), navMiss, navNoIcon, navLineIcon, chat, short: texts.filter(t => t.need && t.ratio < t.need).slice(0, 4),
iconCount: icons.length, faintIcons: icons.filter(i => i.ratio < 3).length, worstIcon: icons[0] ?? null, iconCount: icons.length, faintIcons: icons.filter(i => i.ratio < 3).length, worstIcon: icons[0] ?? null,
layers, layers,
texts: texts.slice(0, 6), low: texts.filter(t => t.ratio < 4.5).length, lowLinks: texts.filter(t => t.tag === 'A' && t.ratio < 4.5).length, fail: texts.filter(t => t.ratio < 3).length, textCount: texts.length, texts: texts.slice(0, 6), low: texts.filter(t => t.ratio < 4.5).length, lowLinks: texts.filter(t => t.tag === 'A' && t.ratio < 4.5).length, fail: texts.filter(t => t.ratio < 3).length, textCount: texts.length,
@ -260,6 +266,7 @@ try {
if (baseline && check.contentWidth < Math.min(baseline.contentWidth * 0.85, baseline.contentWidth - 90)) problems.push(`content squeezed to ${check.contentWidth}px (X: ${baseline.contentWidth}px)`); if (baseline && check.contentWidth < Math.min(baseline.contentWidth * 0.85, baseline.contentWidth - 90)) problems.push(`content squeezed to ${check.contentWidth}px (X: ${baseline.contentWidth}px)`);
if (check.overflow > 1) problems.push(`page overflows the pane by ${check.overflow}px`); if (check.overflow > 1) problems.push(`page overflows the pane by ${check.overflow}px`);
if (check.restyle !== undefined && check.restyle > RESTYLE_BUDGET) problems.push(`each DOM insertion restyles ${check.restyle} elements (budget ${RESTYLE_BUDGET}; X: ${baseline?.restyle ?? '?'}): a page-wide selector such as :has() over the page`); if (check.restyle !== undefined && check.restyle > RESTYLE_BUDGET) problems.push(`each DOM insertion restyles ${check.restyle} elements (budget ${RESTYLE_BUDGET}; X: ${baseline?.restyle ?? '?'}): a page-wide selector such as :has() over the page`);
if (THEME_PACK.has(theme) && check.navLineIcon?.length) problems.push(`${check.navLineIcon.length} rail icon(s) left as X's line drawing (${check.navLineIcon.slice(0, 4).join(', ')})`);
if (check.navNoIcon?.length) problems.push(`${check.navNoIcon.length} rail item(s) without a visible icon (${check.navNoIcon.slice(0, 3).join(', ')})`); if (check.navNoIcon?.length) problems.push(`${check.navNoIcon.length} rail item(s) without a visible icon (${check.navNoIcon.slice(0, 3).join(', ')})`);
if (check.navMiss.length) problems.push(`${check.navMiss.length} rail item(s) not clickable (${check.navMiss.slice(0, 3).map(m => m.name + ' under ' + m.over).join(', ')})`); if (check.navMiss.length) problems.push(`${check.navMiss.length} rail item(s) not clickable (${check.navMiss.slice(0, 3).map(m => m.name + ' under ' + m.over).join(', ')})`);
if (check.chat) { if (check.chat) {

View file

@ -172,7 +172,7 @@ function nav(m) {
const items = [['AppTabBar_Home_Link', '/home', 'Home'], ['AppTabBar_Explore_Link', '/explore', 'Explore'], ['AppTabBar_Notifications_Link', '/notifications', 'Notifications'], const items = [['AppTabBar_Home_Link', '/home', 'Home'], ['AppTabBar_Explore_Link', '/explore', 'Explore'], ['AppTabBar_Notifications_Link', '/notifications', 'Notifications'],
['AppTabBar_DirectMessage_Link', '/i/chat', 'Chat'], ['', '/i/grok', 'Grok'], ['premium-hub-tab', '/i/premium_sign_up', 'Premium'], ['', '/i/bookmarks', 'Bookmarks'], ['AppTabBar_DirectMessage_Link', '/i/chat', 'Chat'], ['', '/i/grok', 'Grok'], ['premium-hub-tab', '/i/premium_sign_up', 'Premium'], ['', '/i/bookmarks', 'Bookmarks'],
// Read live 2026-10-02: X shows up to 12 rail items (History, Creator Studio, Articles join the usual ones). // Read live 2026-10-02: X shows up to 12 rail items (History, Creator Studio, Articles join the usual ones).
['', '/i/history', 'History'], ['', '/i/creator-studio', 'Creator Studio'], ['', '/i/articles', 'Articles'], ['', '/i/history', 'History'], ['', '/i/jf/creators/studio', 'Creator Studio'], ['', '/compose/articles', 'Articles'],
['AppTabBar_Profile_Link', '/placeholder', 'Profile'], ['AppTabBar_More_Menu', '', 'More']]; ['AppTabBar_Profile_Link', '/placeholder', 'Profile'], ['AppTabBar_More_Menu', '', 'More']];
const glyph = `<svg viewBox="0 0 24 24" aria-hidden="true" width="26" height="26" class="r-yyyyoo" style="color: ${m.text};"><g><path d="M12 3l9 8h-3v9H6v-9H3z"></path></g></svg>`; const glyph = `<svg viewBox="0 0 24 24" aria-hidden="true" width="26" height="26" class="r-yyyyoo" style="color: ${m.text};"><g><path d="M12 3l9 8h-3v9H6v-9H3z"></path></g></svg>`;
const item = ([testid, href, label]) => { const item = ([testid, href, label]) => {
@ -190,10 +190,10 @@ function nav(m) {
</div></div></div></header>`; </div></div></div></header>`;
} }
function sidebar(m) { function sidebar(m, extra = '') {
return `<div data-testid="sidebarColumn" class="css-175oi2r r-1hycxz r-10f7w94 fx-sidebar"> return `<div data-testid="sidebarColumn" class="css-175oi2r r-1hycxz r-10f7w94 fx-sidebar">
<div class="css-175oi2r" style="gap: 16px; padding-top: 8px;"> <div class="css-175oi2r" style="gap: 16px; padding-top: 8px;">
<form role="search" class="css-175oi2r"><div class="css-175oi2r"><div class="css-175oi2r r-search r-sdzlij" style="padding: 10px 16px;">${T(m.muted, 'Search')}</div></div></form> ${extra}<form role="search" class="css-175oi2r"><div class="css-175oi2r"><div class="css-175oi2r r-search r-sdzlij" style="padding: 10px 16px;">${T(m.muted, 'Search')}</div></div></form>
<div class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid;"><div class="css-175oi2r"><aside role="complementary" class="css-175oi2r" style="padding: 12px 16px; gap: 10px;"> <div class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid;"><div class="css-175oi2r"><aside role="complementary" class="css-175oi2r" style="padding: 12px 16px; gap: 10px;">
<span class="css-1jxf684 r-chirp r-adyw6z r-b88u0q" style="color: ${m.text};">You might like</span> <span class="css-1jxf684 r-chirp r-adyw6z r-b88u0q" style="color: ${m.text};">You might like</span>
${['Avery Stone', 'Kai Morgan', 'Remy Hart'].map(n => `<div class="css-175oi2r r-18u37iz" style="align-items: center; gap: 10px;"><div class="fx-avatar"></div><div class="css-175oi2r r-16y2uox">${T(m.text, n, ' r-b88u0q')}${T(m.muted, '@' + n.split(' ')[0].toLowerCase())}</div><button data-testid="1-follow" class="css-175oi2r r-sdzlij" style="background-color: ${m.fill}; padding: 6px 14px; border: 0;"><span class="css-1jxf684 r-chirp r-b88u0q" style="color: ${m.onFill};">Follow</span></button></div>`).join('')} ${['Avery Stone', 'Kai Morgan', 'Remy Hart'].map(n => `<div class="css-175oi2r r-18u37iz" style="align-items: center; gap: 10px;"><div class="fx-avatar"></div><div class="css-175oi2r r-16y2uox">${T(m.text, n, ' r-b88u0q')}${T(m.muted, '@' + n.split(' ')[0].toLowerCase())}</div><button data-testid="1-follow" class="css-175oi2r r-sdzlij" style="background-color: ${m.fill}; padding: 6px 14px; border: 0;"><span class="css-1jxf684 r-chirp r-b88u0q" style="color: ${m.onFill};">Follow</span></button></div>`).join('')}
@ -224,11 +224,11 @@ function newPostsPill() {
} }
/** X's usual shell: nav + main row (primary column + sidebar). */ /** X's usual shell: nav + main row (primary column + sidebar). */
function standardShell(m, primary, { sidebarShown = true } = {}) { function standardShell(m, primary, { sidebarShown = true, sidebarExtra = '' } = {}) {
return `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh"> return `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh">
<div class="css-175oi2r r-16y2uox r-1wbh5a2 fx-row r-113js5t" style="min-width: 0;"><div class="css-175oi2r r-16y2uox r-1wbh5a2"><div class="css-175oi2r r-18u37iz r-16y2uox" style="justify-content: space-between;"> <div class="css-175oi2r r-16y2uox r-1wbh5a2 fx-row r-113js5t" style="min-width: 0;"><div class="css-175oi2r r-16y2uox r-1wbh5a2"><div class="css-175oi2r r-18u37iz r-16y2uox" style="justify-content: space-between;">
<div data-testid="primaryColumn" class="css-175oi2r r-16y2uox r-13qz1uu r-1ye8kvj r-kemksi r-lrvibr r-thb0q2 r-1kqtdi0" style="border-style: solid; margin: 0 auto; min-height: 100vh;">${primary}</div> <div data-testid="primaryColumn" class="css-175oi2r r-16y2uox r-13qz1uu r-1ye8kvj r-kemksi r-lrvibr r-thb0q2 r-1kqtdi0" style="border-style: solid; margin: 0 auto; min-height: 100vh;">${primary}</div>
${sidebarShown ? sidebar(m) : ''} ${sidebarShown ? sidebar(m, sidebarExtra) : ''}
</div></div></div></main>`; </div></div></div></main>`;
} }
@ -261,6 +261,13 @@ const ROUTES = {
'chat-embed': m => chatRoute(m, 'direct', false, true), 'chat-embed': m => chatRoute(m, 'direct', false, true),
// Articles: X's row with content that has no intrinsic width (absolutely positioned editor). // Articles: X's row with content that has no intrinsic width (absolutely positioned editor).
articles: m => `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh"><div class="css-175oi2r r-16y2uox r-1wbh5a2 r-113js5t fx-row fx-articles" style="min-width: 0; min-height: 100vh;"><div class="css-175oi2r r-16y2uox r-kemksi r-lrvibr r-1kqtdi0" style="border-style: solid;"><div data-testid="articles-editor" style="position: absolute; inset: 0; display: flex;"><div class="r-1kqtdi0" style="width: 38%; border-right-width: 1px; border-right-style: solid; padding: 16px; box-sizing: border-box;">${T(m.text, 'Articles', ' r-b88u0q r-adyw6z')}<div style="height: 12px;"></div>${T(m.muted, 'Drafts')}<div style="height: 8px;"></div>${T(m.text, 'Why opaque layers matter')}</div><div style="flex: 1; padding: 32px; box-sizing: border-box;">${T(m.text, 'Write a title', ' r-b88u0q r-adyw6z')}<div style="height: 12px;"></div>${T(m.muted, 'Start writing your article…')}</div></div></div></div></main>`, articles: m => `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh"><div class="css-175oi2r r-16y2uox r-1wbh5a2 r-113js5t fx-row fx-articles" style="min-width: 0; min-height: 100vh;"><div class="css-175oi2r r-16y2uox r-kemksi r-lrvibr r-1kqtdi0" style="border-style: solid;"><div data-testid="articles-editor" style="position: absolute; inset: 0; display: flex;"><div class="r-1kqtdi0" style="width: 38%; border-right-width: 1px; border-right-style: solid; padding: 16px; box-sizing: border-box;">${T(m.text, 'Articles', ' r-b88u0q r-adyw6z')}<div style="height: 12px;"></div>${T(m.muted, 'Drafts')}<div style="height: 8px;"></div>${T(m.text, 'Why opaque layers matter')}</div><div style="flex: 1; padding: 32px; box-sizing: border-box;">${T(m.text, 'Write a title', ' r-b88u0q r-adyw6z')}<div style="height: 12px;"></div>${T(m.muted, 'Start writing your article…')}</div></div></div></div></main>`,
// Theme v3 fixture cells (live failures, 2026-10-02). Creator Studio /i/monetization: jetfuel's "New" pill on its
// indigo fill rgb(30,27,75), the label coloured through --jf-text-color (1.19:1 live under Windows 98).
monetization: m => standardShell(m, `${columnHeader(m, 'Monetization')}<div class="jetfuel-style-root"><div class="jf-surface jf-text" style="padding: 16px; gap: 12px; display: flex; flex-direction: column;">${['Subscriptions', 'Creator Revenue Sharing'].map((t, i) => `<div class="jf-element flex" style="display: flex; align-items: center; gap: 8px;"><p class="jf-element" style="margin: 0; color: var(--jf-text-color); font: 600 15px TwitterChirp, sans-serif;">${t}</p>${i === 0 ? '<div class="jf-element" style="background-color: rgb(30, 27, 75); border-radius: 9999px; padding: 2px 8px;"><p class="jf-element jf-truncate" style="margin: 0; color: var(--jf-text-color); font: 700 12px TwitterChirp, sans-serif;">New</p></div>' : ''}</div>`).join('')}</div></div>`),
// The empty sidebar module (trends hidden: X keeps the framed section with nothing in it) and the nested
// wrapper of 1.0.2 (div > div > section, which a :has() framed as a whole).
'sidebar-empty': m => standardShell(m, `${columnHeader(m, 'Home', ['For you', 'Following'])}${timeline(m, 2)}`, { sidebarExtra: `<div class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid; background-color: ${m.module};"><section role="region" aria-labelledby="accessible-list-x" class="css-175oi2r" style="min-height: 240px;"><h1 id="accessible-list-x" style="position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);"></h1></section></div>` }),
'sidebar-nested': m => standardShell(m, `${columnHeader(m, 'Home', ['For you', 'Following'])}${timeline(m, 2)}`, { sidebarExtra: `<div class="css-175oi2r"><div class="css-175oi2r"><section role="region" class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid; padding: 12px 16px;">${T(m.text, 'What’s happening', ' r-b88u0q')}<div class="css-175oi2r" style="padding-top: 8px;">${T(m.muted, 'Placeholder trend')}</div></section></div></div>` }),
// Settings: two panes inside X's row, no primaryColumn testid on x.com. // Settings: two panes inside X's row, no primaryColumn testid on x.com.
settings: m => `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh"><div class="css-175oi2r r-16y2uox r-1wbh5a2 r-113js5t fx-row" style="min-width: 0;"><div class="css-175oi2r r-18u37iz r-16y2uox" style="min-height: 100vh;"><section class="css-175oi2r r-kemksi r-lrvibr r-thb0q2 r-1kqtdi0" style="width: 400px; border-style: solid;">${columnHeader(m, 'Settings')}${['Your account', 'Security and account access', 'Privacy and safety', 'Notifications', 'Accessibility, display, and languages'].map((t, i) => `<a href="#" role="tab" class="css-175oi2r r-18u37iz${i === 0 ? ' r-hover' : ''}" style="padding: 14px 16px; text-decoration: none; justify-content: space-between;">${T(m.text, t)}${T(m.muted, '›')}</a>`).join('')}</section><section class="css-175oi2r r-16y2uox r-1wbh5a2 r-kemksi r-thb0q2 r-1kqtdi0" style="border-style: solid;">${columnHeader(m, 'Your account')}<div class="css-175oi2r" style="padding: 12px 16px; gap: 14px;">${T(m.muted, 'See information about your account, download an archive of your data, or learn about your account deactivation options.')}${['Account information', 'Change your password', 'Download an archive of your data'].map(t => `<div class="css-175oi2r">${T(m.text, t)}${T(m.muted, 'Placeholder description')}</div>`).join('')}</div></section></div></div></main>`, settings: m => `<main role="main" class="css-175oi2r r-16y2uox r-1wbh5a2 r-1habvwh"><div class="css-175oi2r r-16y2uox r-1wbh5a2 r-113js5t fx-row" style="min-width: 0;"><div class="css-175oi2r r-18u37iz r-16y2uox" style="min-height: 100vh;"><section class="css-175oi2r r-kemksi r-lrvibr r-thb0q2 r-1kqtdi0" style="width: 400px; border-style: solid;">${columnHeader(m, 'Settings')}${['Your account', 'Security and account access', 'Privacy and safety', 'Notifications', 'Accessibility, display, and languages'].map((t, i) => `<a href="#" role="tab" class="css-175oi2r r-18u37iz${i === 0 ? ' r-hover' : ''}" style="padding: 14px 16px; text-decoration: none; justify-content: space-between;">${T(m.text, t)}${T(m.muted, '›')}</a>`).join('')}</section><section class="css-175oi2r r-16y2uox r-1wbh5a2 r-kemksi r-thb0q2 r-1kqtdi0" style="border-style: solid;">${columnHeader(m, 'Your account')}<div class="css-175oi2r" style="padding: 12px 16px; gap: 14px;">${T(m.muted, 'See information about your account, download an archive of your data, or learn about your account deactivation options.')}${['Account information', 'Change your password', 'Download an archive of your data'].map(t => `<div class="css-175oi2r">${T(m.text, t)}${T(m.muted, 'Placeholder description')}</div>`).join('')}</div></section></div></div></main>`,
}; };
@ -271,6 +278,13 @@ const LAYERS = {
'hover-card': m => `<div data-testid="hoverCardParent" class="css-175oi2r" style="position: fixed; left: 360px; top: 190px; z-index: 10;"><div data-testid="HoverCard" class="css-175oi2r r-cl2sl0 r-1jyoszn r-card16" style="width: 300px; padding: 16px; gap: 8px;"><div class="css-175oi2r r-18u37iz" style="justify-content: space-between; align-items: flex-start;"><div class="fx-avatar" style="width: 64px; height: 64px; flex-basis: 64px;"></div><button data-testid="1-follow" class="css-175oi2r r-sdzlij" style="background-color: ${m.fill}; padding: 8px 16px; border: 0;"><span class="css-1jxf684 r-chirp r-b88u0q" style="color: ${m.onFill};">Follow</span></button></div>${T(m.text, 'Fishies', ' r-b88u0q')}${T(m.muted, '@playfishies')}${T(m.text, 'The social aquarium that lives while you’re away.')}<div class="css-175oi2r r-18u37iz" style="gap: 12px;">${T(m.text, '<b>30</b>')}${T(m.muted, 'Following')}${T(m.text, '<b>21</b>')}${T(m.muted, 'Followers')}</div></div></div>`, 'hover-card': m => `<div data-testid="hoverCardParent" class="css-175oi2r" style="position: fixed; left: 360px; top: 190px; z-index: 10;"><div data-testid="HoverCard" class="css-175oi2r r-cl2sl0 r-1jyoszn r-card16" style="width: 300px; padding: 16px; gap: 8px;"><div class="css-175oi2r r-18u37iz" style="justify-content: space-between; align-items: flex-start;"><div class="fx-avatar" style="width: 64px; height: 64px; flex-basis: 64px;"></div><button data-testid="1-follow" class="css-175oi2r r-sdzlij" style="background-color: ${m.fill}; padding: 8px 16px; border: 0;"><span class="css-1jxf684 r-chirp r-b88u0q" style="color: ${m.onFill};">Follow</span></button></div>${T(m.text, 'Fishies', ' r-b88u0q')}${T(m.muted, '@playfishies')}${T(m.text, 'The social aquarium that lives while you’re away.')}<div class="css-175oi2r r-18u37iz" style="gap: 12px;">${T(m.text, '<b>30</b>')}${T(m.muted, 'Following')}${T(m.text, '<b>21</b>')}${T(m.muted, 'Followers')}</div></div></div>`,
'edit-profile': m => modal(m, 'Edit profile', `<div class="fx-media" style="margin: 0; border-radius: 0; height: 150px;"></div><div class="css-175oi2r" style="padding: 16px; gap: 16px;">${['Name', 'Bio', 'Location', 'Website'].map(label => `<label class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid; padding: 8px 12px;">${T(m.muted, label)}<input class="r-chirp r-a023e6" style="border: 0; outline: 0; background: transparent; color: ${m.text}; padding: 4px 0;" value="${label === 'Name' ? 'Placeholder User' : ''}"></label>`).join('')}</div>`, 'Save'), 'edit-profile': m => modal(m, 'Edit profile', `<div class="fx-media" style="margin: 0; border-radius: 0; height: 150px;"></div><div class="css-175oi2r" style="padding: 16px; gap: 16px;">${['Name', 'Bio', 'Location', 'Website'].map(label => `<label class="css-175oi2r r-1kqtdi0 r-card16" style="border-width: 1px; border-style: solid; padding: 8px 12px;">${T(m.muted, label)}<input class="r-chirp r-a023e6" style="border: 0; outline: 0; background: transparent; color: ${m.text}; padding: 4px 0;" value="${label === 'Name' ? 'Placeholder User' : ''}"></label>`).join('')}</div>`, 'Save'),
compose: m => modal(m, '', composer(m, { inline: false })), compose: m => modal(m, '', composer(m, { inline: false })),
// X's tooltip under a post's caret ("More"): X's grey tooltip fill with the label in X's text colour.
'hover-label': m => `<div class="css-175oi2r" style="position: fixed; left: 640px; top: 120px; z-index: 10;"><div data-testid="HoverLabel" class="css-175oi2r" style="background-color: rgba(91, 112, 131, 0.8); padding: 2px 6px; border-radius: 4px;"><span class="css-1jxf684 r-chirp" style="color: rgb(255, 255, 255); font-size: 11px;">More</span></div></div>`,
// The account menu as X places it: from the account button's rect (above it, left-aligned), wherever a theme puts
// the button (the right end of a top or bottom bar pushed it 52px past the edge live).
'account-menu': m => `<div data-testid="hoverCardParent" data-fx-anchor="SideNav_AccountSwitcher_Button" data-fx-place="above" class="css-175oi2r" style="position: fixed; z-index: 10;"><div role="menu" class="css-175oi2r r-cl2sl0 r-1jyoszn r-card16" style="width: 300px; box-shadow: ${m.shadow};">${['Add an existing account', 'Log out @placeholder'].map(t => `<a role="menuitem" class="css-175oi2r" style="padding: 12px 16px;">${T(m.text, t, ' r-b88u0q')}</a>`).join('')}</div></div>`,
// A hover card anchored near the bottom edge (X opens it below the anchor: cut off live).
'hovercard-bottom': m => `<div data-testid="hoverCardParent" data-fx-place="bottom" class="css-175oi2r" style="position: fixed; left: 360px; z-index: 10;"><div data-testid="HoverCard" class="css-175oi2r r-cl2sl0 r-1jyoszn r-card16" style="width: 300px; padding: 16px; gap: 8px; box-shadow: ${m.shadow};"><div class="fx-avatar"></div>${T(m.text, 'Placeholder User', ' r-b88u0q')}${T(m.muted, '@placeholder')}${T(m.text, 'Building small tools for the timeline. Theme engines, mostly.')}<div class="css-175oi2r r-18u37iz" style="gap: 12px;">${T(m.text, '120', ' r-b88u0q')}${T(m.muted, 'Following')}${T(m.text, '4,500', ' r-b88u0q')}${T(m.muted, 'Followers')}</div></div></div>`,
}; };
function modal(m, title, body, action = '') { function modal(m, title, body, action = '') {
@ -291,6 +305,9 @@ export const CELLS = {
'compose-modal': ['home', 'compose'], 'edit-profile-modal': ['profile', 'edit-profile'], 'more-menu': ['profile', 'more-menu'], 'hover-card': ['notifications', 'hover-card'], 'compose-modal': ['home', 'compose'], 'edit-profile-modal': ['profile', 'edit-profile'], 'more-menu': ['profile', 'more-menu'], 'hover-card': ['notifications', 'hover-card'],
'signed-out-landing': ['signed-out-landing'], 'signed-out-login': ['signed-out-login'], 'signed-out-landing': ['signed-out-landing'], 'signed-out-login': ['signed-out-login'],
'chat-group': ['chat-group'], 'chat-direct': ['chat-direct'], 'chat-menu': ['chat-direct-menu'], 'chat-embed': ['chat-embed'], 'chat-group': ['chat-group'], 'chat-direct': ['chat-direct'], 'chat-menu': ['chat-direct-menu'], 'chat-embed': ['chat-embed'],
// Theme v3 cells: each one a live failure on 2026-10-02.
monetization: ['monetization'], 'sidebar-empty': ['sidebar-empty'], 'sidebar-nested': ['sidebar-nested'],
'hover-label': ['status', 'hover-label'], 'account-menu': ['home', 'account-menu'], 'hovercard-bottom': ['notifications', 'hovercard-bottom'],
}; };
/** Cells with widths of their own: the chat is checked at split-pane widths (one panel, one panel with the nav, both panels). */ /** Cells with widths of their own: the chat is checked at split-pane widths (one panel, one panel with the nav, both panels). */
@ -397,6 +414,18 @@ ${nav(m)}${ROUTES[route](m)}
} }
} }
layout(); window.addEventListener('resize', layout); layout(); window.addEventListener('resize', layout);
// Layers placed the way X places them: from the anchor's rect after the theme moved it (account menu), or
// at the bottom edge (hover card). Re-run on resize and while a theme settles.
function place() {
document.querySelectorAll('[data-fx-place]').forEach(function (layer) {
var h = layer.getBoundingClientRect().height;
if (layer.dataset.fxPlace === 'bottom') { layer.style.top = (window.innerHeight - 140) + 'px'; return; }
var a = document.querySelector('[data-testid="' + layer.dataset.fxAnchor + '"]'); if (!a) return;
var r = a.getBoundingClientRect();
layer.style.left = r.left + 'px'; layer.style.top = Math.max(0, r.top - h - 8) + 'px';
});
}
place(); window.addEventListener('resize', place); setInterval(place, 100);
})(); })();
${EMBED_SCRIPT} ${EMBED_SCRIPT}
${CHAT_SCRIPT}</script></body></html>`; ${CHAT_SCRIPT}</script></body></html>`;

View file

@ -7,6 +7,7 @@
// Packs are standalone documents (framework themeIcons.ts); `packDocument(id)` is the JSON a pack // Packs are standalone documents (framework themeIcons.ts); `packDocument(id)` is the JSON a pack
// is exported and published as. // is exported and published as.
import { RETRO_PACKS } from './retro.ts';
import { sanitizeIconPack, type IconGlyph, type IconName, type IconPack } from '../../../../../waybetter/packages/runtime/src/themeIcons.ts'; import { sanitizeIconPack, type IconGlyph, type IconName, type IconPack } from '../../../../../waybetter/packages/runtime/src/themeIcons.ts';
const line = (d: string): IconGlyph => ({ d, stroke: true }); const line = (d: string): IconGlyph => ({ d, stroke: true });
@ -165,12 +166,12 @@ const documents = [
{ id: 'wb-pixel', name: 'Pixel 98', description: 'Sixteen-pixel icons in the manner of a 1998 desktop. Our own drawings.', ...OWN, style: { stroke: 1.75, cap: 'square', join: 'miter', scale: 1 }, glyphs: PIXEL }, { id: 'wb-pixel', name: 'Pixel 98', description: 'Sixteen-pixel icons in the manner of a 1998 desktop. Our own drawings.', ...OWN, style: { stroke: 1.75, cap: 'square', join: 'miter', scale: 1 }, glyphs: PIXEL },
]; ];
/** The built-in packs, validated like any imported pack. */ /** The built-in packs, validated like any imported pack; retro-98 is bundled too, as the Windows 98 theme's own pack (it stays in the Store). */
export const BUILTIN_PACKS: IconPack[] = documents.map(doc => { export const BUILTIN_PACKS: IconPack[] = documents.map(doc => {
const pack = sanitizeIconPack(doc); const pack = sanitizeIconPack(doc);
if (!pack) throw new Error(`built-in icon pack ${doc.id} is not valid`); if (!pack) throw new Error(`built-in icon pack ${doc.id} is not valid`);
return pack; return pack;
}); }).concat(RETRO_PACKS.filter(pack => pack.id === 'retro-98'));
/** A built-in pack as the JSON document it is published as (`<id>.icons.json`). */ /** A built-in pack as the JSON document it is published as (`<id>.icons.json`). */
export const packDocument = (id: string) => { export const packDocument = (id: string) => {

View file

@ -4,7 +4,8 @@
// copyright, and the plan bans them). The look is the idea of the era, drawn from scratch. // copyright, and the plan bans them). The look is the idea of the era, drawn from scratch.
// retro-98 16 by 16 pixel art on the 98 desktop palette: black outline, silver, navy, teal. // retro-98 16 by 16 pixel art on the 98 desktop palette: black outline, silver, navy, teal.
// retro-xp vector glyphs in the manner of 2001: gel fills, a dark edge, a lit top. // retro-xp vector glyphs in the manner of 2001: gel fills, a dark edge, a lit top.
// Both draw every name X's left rail uses (home .. compose, and the .active forms) and the action bar. // Both draw every name X's left rail uses (home .. compose, and the .active forms) and the action bar;
// retro-98 also History, Creator Studio and Articles, and ships bundled as the Windows 98 theme's pack.
// Generated into store/x/icons/<id>/ by scripts/build-store-icons.mjs. // Generated into store/x/icons/<id>/ by scripts/build-store-icons.mjs.
import { sanitizeIconPack, type IconGlyph, type IconName, type IconPack } from '../../../../../waybetter/packages/runtime/src/themeIcons.ts'; import { sanitizeIconPack, type IconGlyph, type IconName, type IconPack } from '../../../../../waybetter/packages/runtime/src/themeIcons.ts';
@ -152,6 +153,18 @@ const ART98: Record<string, readonly string[]> = {
'................', '.....kkkkkk.....', '...kkyyyyyykk...', '..kyyyyyyyyyyk..', '..kyykkyykkyyk..', '.kyyykkyykkyyyk.', '.kyyyyyyyyyyyyk.', '.kykyyyyyyyykyk.', '................', '.....kkkkkk.....', '...kkyyyyyykk...', '..kyyyyyyyyyyk..', '..kyykkyykkyyk..', '.kyyykkyykkyyyk.', '.kyyyyyyyyyyyyk.', '.kykyyyyyyyykyk.',
'.kyykyyyyyykyyk.', '..kyykkkkkkyyk..', '..kyyyyyyyyyyk..', '...kkyyyyyykk...', '.....kkkkkk.....', '................', '................', '................', '.kyykyyyyyykyyk.', '..kyykkkkkkyyk..', '..kyyyyyyyyyyk..', '...kkyyyyyykk...', '.....kkkkkk.....', '................', '................', '................',
], ],
hourglass: [
'................', '...kkkkkkkkkk...', '...kssssssssk...', '....kwwwwwwk....', '....kwyyyyyk....', '.....kwyyyk.....', '......kyyk......', '.......kk.......',
'......kwyk......', '.....kwwyyk.....', '....kwwyyyyk....', '....kyyyyyyk....', '...kssssssssk...', '...kkkkkkkkkk...', '................', '................',
],
clapper: [
'................', '.kkkkkkkkkkkkkk.', '.kwkkwwkkwwkkwk.', '.kkkkkkkkkkkkkk.', '.kggggggggggggk.', '.kgwwwwwwwwwwgk.', '.kgwnnrnnnnnwgk.', '.kgwnnrrnnnnwgk.',
'.kgwnnrrrnnnwgk.', '.kgwnnrrnnnnwgk.', '.kgwnnrnnnnnwgk.', '.kgwwwwwwwwwwgk.', '.kggggggggggggk.', '.kkkkkkkkkkkkkk.', '................', '................',
],
page: [
'................', '..kkkkkkkkk.....', '..kwwwwwwwkk....', '..kwnnnnwwkgk...', '..kwwwwwwwkkkk..', '..kwnnnnnnwwwk..', '..kwwwwwwwwwwk..', '..kwnnnnnnnnwk..',
'..kwwwwwwwwwwk..', '..kwnnnnnnnnwk..', '..kwwwwwwwwwwk..', '..kwnnnnnwwwwk..', '..kwwwwwwwwwwk..', '..kkkkkkkkkkkk..', '................', '................',
],
clock: [ clock: [
'................', '.....kkkkkk.....', '...kkwwwwwwkk...', '..kwwwwkwwwwwk..', '..kwwwwkwwwwwk..', '.kwwwwwkwwwwwwk.', '.kwwwwwkwwwwwwk.', '.kwwwwwkkkkwwwk.', '................', '.....kkkkkk.....', '...kkwwwwwwkk...', '..kwwwwkwwwwwk..', '..kwwwwkwwwwwk..', '.kwwwwwkwwwwwwk.', '.kwwwwwkwwwwwwk.', '.kwwwwwkkkkwwwk.',
'.kwwwwwwwwwwwwk.', '.kwwwwwwwwwwwwk.', '..kwwwwwwwwwwk..', '..kwwwwwwwwwwk..', '...kkwwwwwwkk...', '.....kkkkkk.....', '................', '................', '.kwwwwwwwwwwwwk.', '.kwwwwwwwwwwwwk.', '..kwwwwwwwwwwk..', '..kwwwwwwwwwwk..', '...kkwwwwwwkk...', '.....kkkkkk.....', '................', '................',
@ -362,6 +375,7 @@ const G98: Names = {
reply: px('balloon'), repost: px('arrows'), 'repost.on': px('arrowsOn'), like: px('heart'), 'like.on': px('heartOn'), views: px('bars'), reply: px('balloon'), repost: px('arrows'), 'repost.on': px('arrowsOn'), like: px('heart'), 'like.on': px('heartOn'), views: px('bars'),
bookmark: px('bookmark'), 'bookmark.on': px('bookmarkOn'), share: px('share'), verified: px('check'), back: px('back'), close: px('close'), search: px('search'), settings: px('gear'), bookmark: px('bookmark'), 'bookmark.on': px('bookmarkOn'), share: px('share'), verified: px('check'), back: px('back'), close: px('close'), search: px('search'), settings: px('gear'),
media: px('picture'), gif: px('gif'), poll: px('poll'), emoji: px('smile'), schedule: px('clock'), location: px('pin'), lock: px('lock'), media: px('picture'), gif: px('gif'), poll: px('poll'), emoji: px('smile'), schedule: px('clock'), location: px('pin'), lock: px('lock'),
history: px('hourglass'), studio: px('clapper'), articles: px('page'),
}; };
const GXP: Names = { const GXP: Names = {
home: XP.home!, 'home.active': XP.home!, explore: XP.explore!, 'explore.active': XP.explore!, notifications: XP.bell!, 'notifications.active': XP.bell!, home: XP.home!, 'home.active': XP.home!, explore: XP.explore!, 'explore.active': XP.explore!, notifications: XP.bell!, 'notifications.active': XP.bell!,
@ -370,6 +384,7 @@ const GXP: Names = {
reply: XP.reply!, repost: XP.repost!, 'repost.on': XP.repostOn!, like: XP.heart!, 'like.on': XP.heartOn!, views: XP.views!, reply: XP.reply!, repost: XP.repost!, 'repost.on': XP.repostOn!, like: XP.heart!, 'like.on': XP.heartOn!, views: XP.views!,
bookmark: XP.bookmark!, 'bookmark.on': XP.bookmarkOn!, share: XP.share!, verified: XP.verified!, back: XP.back!, close: XP.close!, search: XP.explore!, settings: XP.gear!, bookmark: XP.bookmark!, 'bookmark.on': XP.bookmarkOn!, share: XP.share!, verified: XP.verified!, back: XP.back!, close: XP.close!, search: XP.explore!, settings: XP.gear!,
media: XP.media!, gif: XP.gif!, poll: XP.poll!, emoji: XP.smile!, schedule: XP.clock!, location: XP.pin!, lock: XP.lock!, media: XP.media!, gif: XP.gif!, poll: XP.poll!, emoji: XP.smile!, schedule: XP.clock!, location: XP.pin!, lock: XP.lock!,
history: XP.clock!, studio: XP.media!, articles: XP.lists!,
}; };
const OWN = { author: 'wayBetter for X', license: 'own', source: 'drawn for wayBetter for X; no asset is taken from Windows or from any icon archive', credits: 'wayBetter for X contributors' }; const OWN = { author: 'wayBetter for X', license: 'own', source: 'drawn for wayBetter for X; no asset is taken from Windows or from any icon archive', credits: 'wayBetter for X contributors' };

View file

@ -17,10 +17,14 @@ import {
} from './themeSpec.ts'; } from './themeSpec.ts';
import { axisPosition, buildColorModel, projectColor, type ColorModel, type Usage } from './themeTokens.ts'; import { axisPosition, buildColorModel, projectColor, type ColorModel, type Usage } from './themeTokens.ts';
import { X_PRIMITIVE_VARS, accentLabel, chatSurfaceCss, fadedAlpha, hexToHslTriple, xTokenOverrides } from './themeChat.ts'; import { X_PRIMITIVE_VARS, accentLabel, chatSurfaceCss, fadedAlpha, hexToHslTriple, xTokenOverrides } from './themeChat.ts';
import { buildStructureCss as buildThemeStructureCss, installIconGate, normalizeIconChoice, type StructureEnv } from './themeStructure.ts'; import { buildStructureCss as buildThemeStructureCss, installIconGate, normalizeIconChoice, X_FRAMED, X_LAYER_TARGETS, type StructureEnv } from './themeStructure.ts';
import type { IconChoice } from '../../../../waybetter/packages/runtime/src/themeIcons.ts'; import type { IconChoice } from '../../../../waybetter/packages/runtime/src/themeIcons.ts';
import { contrastRatio, hexToRgb, mix, normalizeResolved, readableOn, relativeLuminance, type ResolvedFonts, type ResolvedTheme } from '../../../../waybetter/packages/runtime/src/themeApi.ts'; import { contrastRatio, hexToRgb, mix, normalizeResolved, readableOn, relativeLuminance, type ResolvedFonts, type ResolvedTheme } from '../../../../waybetter/packages/runtime/src/themeApi.ts';
import { createThemeCatalog, type ThemeChoice } from '../../../../waybetter/packages/runtime/src/themeChoice.ts'; import { createThemeCatalog, type ThemeChoice } from '../../../../waybetter/packages/runtime/src/themeChoice.ts';
import { deriveSurfaces, surfacesInputFromV2, type Surface, type SurfaceSet } from '../../../../waybetter/packages/runtime/src/themeDerive.ts';
import { hexToOklch } from '../../../../waybetter/packages/runtime/src/themeInk.ts';
import { installFrameMarker, installLayerGuard } from '../../../../waybetter/packages/runtime/src/themeGuards.ts';
import { installBarMeasurer } from '../../../../waybetter/packages/runtime/src/themeBar.ts';
import { installThemeRuntime, resolvedFonts, type ThemeHandle as RuntimeHandle, type ThemeRuntimeOptions } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts'; import { installThemeRuntime, resolvedFonts, type ThemeHandle as RuntimeHandle, type ThemeRuntimeOptions } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts';
export type { Palette, Role, ButtonRole, RuleLike } from './themeSpec.ts'; export type { Palette, Role, ButtonRole, RuleLike } from './themeSpec.ts';
@ -356,6 +360,82 @@ function fullPalette(palette: Partial<Palette>): Palette | null {
return bg && surface && elevated && border && text && muted && accent ? { ...palette, bg, surface, elevated, border, text, muted, accent } : null; return bg && surface && elevated && border && text && muted && accent ? { ...palette, bg, surface, elevated, border, text, muted, accent } : null;
} }
/**
* Colours X uses for a meaning, kept in hue under every theme (theme engine v3 3.6): like pink, repost
* green, destructive red, and the swatches of X's own accent picker (purple, yellow, orange), which
* show the colour they choose. Not fill classes: a fill in one of these stays X's.
*/
export const X_MEANING_KEYS = ['249,24,128', '0,186,124', '244,33,46', '120,86,255', '255,212,0', '255,122,0'];
/**
* Opaque fills X paints inline that are no palette colour, read live (a class scan cannot see inline
* values): Creator Studio's indigo "New" pill (Tailwind indigo-950, /i/monetization, 2026-10-02).
*/
export const X_FOREIGN_INLINE_FILLS = ['30,27,75'];
/** Every X colour key the remap knows (invariant I2 counts a computed colour equal to one of these as a leak). */
export const X_COLOUR_KEYS: string[] = [...new Set([X_PALETTES.light, X_PALETTES.dim, X_PALETTES.dark, JETFUEL.light, JETFUEL.dark]
.flatMap(source => Object.values(source).flat()))];
/** The surface set a full palette derives (theme engine v3, step 5). */
export function paletteSurfaces(palette: Partial<Palette> & { page?: string }): SurfaceSet | null {
const full = fullPalette(palette);
return full ? deriveSurfaces(surfacesInputFromV2({ ...full, page: palette.page ?? null })) : null;
}
/** OKLab distance between an `r,g,b` key and a hex colour. */
function oklabDistance(key: string, hex: string): number {
const asHex = `#${key.split(',').map(v => Number(v).toString(16).padStart(2, '0')).join('')}`;
const a = hexToOklch(asHex), b = hexToOklch(hex);
return Math.hypot(a.l - b.l, a.c * Math.cos(a.h) - b.c * Math.cos(b.h), a.c * Math.sin(a.h) - b.c * Math.sin(b.h));
}
/**
* R1 (theme engine v3 3.4): the surface an opaque X fill that is no palette colour behaves like
* (Creator Studio's indigo "New" pill, promotional fills): the theme surface nearest to it, by where
* X's colour sits between X's own page and text, so a dark X badge stays a strong fill in a light theme.
*/
export function foreignFillSurface(key: string, source: Source, surfaces: SurfaceSet): Surface {
const toHex = (k: string) => `#${k.split(',').map(v => Number(v).toString(16).padStart(2, '0')).join('')}`;
const xBg = toHex(source.bg[0] ?? '255,255,255'), xText = toHex(source.text[0] ?? '15,20,25');
// Closer to X's text than to X's page: an emphasised fill (strong or the accent fill); else a quiet surface.
const emphasised = oklabDistance(key, xText) < oklabDistance(key, xBg);
const candidates: Surface[] = emphasised ? [surfaces.strong, surfaces.accentFill] : [surfaces.card, surfaces.raised, surfaces.chrome];
const hue = hexToOklch(toHex(key));
// Chromatic X fills keep to the accent fill when it is the nearer hue; neutral ones to the strong fill.
if (emphasised && hue.c > 0.04) {
const accent = hexToOklch(surfaces.accentFill.fill), strong = hexToOklch(surfaces.strong.fill);
const dh = (a: number, b: number) => Math.abs(Math.atan2(Math.sin(a - b), Math.cos(a - b)));
return dh(hue.h, accent.h) <= dh(hue.h, strong.h) || strong.c < 0.02 ? surfaces.accentFill : surfaces.strong;
}
return candidates.reduce((best, s) => oklabDistance(key, s.fill) < oklabDistance(key, best.fill) ? s : best);
}
/** X's accent at alpha under 0.2 as a state: up to 0.1 a hover, above it a selection (content surface). */
export function accentWash(value: string, source: Source, surfaces: SurfaceSet): string | null {
const parsed = parseColor(value);
if (!parsed || typeof parsed.alpha !== 'number' || parsed.alpha <= 0 || parsed.alpha >= 0.2 || !source.accent.includes(parsed.key)) return null;
return parsed.alpha <= 0.1 ? surfaces.content.hover : surfaces.content.selected;
}
/** R2: everything inside a fill reads in that fill's ink, through X's text tokens too. */
export function inkUnderFill(selectors: string[], s: Surface): string {
if (!selectors.length) return '';
const fills = `:is(${selectors.join(',')})`;
return `${fills}{background-color:${s.fill} !important;background-image:none !important;--jf-text-color:${s.ink} !important;--x-fg-on-color:${s.ink} !important;color:${s.ink} !important}
`
+ `${fills} :not(svg *):not(img){color:${s.ink} !important;--jf-text-color:${s.ink} !important}`;
}
/**
* X's tooltip (`HoverLabel`): the tooltip surface, its label in the tooltip ink. X paints the label and
* its fill through separate classes, which a property-by-property remap paired at 2.7:1 (live 1.0.2).
*/
export function tooltipCss(s: Surface): string {
return `[data-testid="HoverLabel"]{background-color:${s.fill} !important;border-color:${s.line} !important}
[data-testid="HoverLabel"],[data-testid="HoverLabel"] *{color:${s.ink} !important}`;
}
/** Page states the theme's CSS keys on (`html[data-wb-app]`, `html[data-wb-chat]`), kept by the engine. */ /** Page states the theme's CSS keys on (`html[data-wb-app]`, `html[data-wb-chat]`), kept by the engine. */
export const THEME_FLAGS = { export const THEME_FLAGS = {
/** X's app shell (signed in). */ /** X's app shell (signed in). */
@ -402,6 +482,10 @@ export function buildThemeCss(rules: Iterable<RuleLike>, source: Source, palette
const whiteLabels: string[] = []; const whiteLabels: string[] = [];
// Translucent white labels (XChat's time stamp inside a sent bubble: `var(--x-white-60)`). // Translucent white labels (XChat's time stamp inside a sent bubble: `var(--x-white-60)`).
const fadedLabels: string[] = []; const fadedLabels: string[] = [];
// R1: opaque class fills in no palette colour, grouped by the surface they behave like.
const surfaces = paletteSurfaces(palette);
const knownKeys = new Set([...Object.values(source).flat(), ...X_MEANING_KEYS]);
const foreign = new Map<Surface, string[]>();
const opaque = (value: string, keys: string[]) => { const parsed = value ? parseColor(value) : null; return !!parsed && parsed.alpha === null && keys.includes(parsed.key); }; const opaque = (value: string, keys: string[]) => { const parsed = value ? parseColor(value) : null; return !!parsed && parsed.alpha === null && keys.includes(parsed.key); };
const faded = (value: string) => { const parsed = value ? parseColor(value) : null; return !!parsed && parsed.key === '255,255,255' && typeof parsed.alpha === 'number' && parsed.alpha > 0; }; const faded = (value: string) => { const parsed = value ? parseColor(value) : null; return !!parsed && parsed.key === '255,255,255' && typeof parsed.alpha === 'number' && parsed.alpha > 0; };
for (const rule of rules) { for (const rule of rules) {
@ -416,6 +500,17 @@ export function buildThemeCss(rules: Iterable<RuleLike>, source: Source, palette
if (opaque(color, ['255,255,255'])) whiteLabels.push(selector); if (opaque(color, ['255,255,255'])) whiteLabels.push(selector);
else if (faded(color)) fadedLabels.push(selector); else if (faded(color)) fadedLabels.push(selector);
} }
// R1: an opaque fill in no palette colour, under any selector (live: Creator Studio's "New" pill is
// `[data-theme="dark"] .jetfuel-style-root .j-j6ij7u11{background-color:rgba(30, 27, 75, var(--jbgo))}`;
// a variable alpha is jetfuel's opacity switch, 1 when painted).
if (surfaces && !selector.includes('::') && selector.length < 600) {
const background = resolve(rule.style.getPropertyValue('background-color'));
const parsed = background ? parseColor(background) : null;
if (parsed && (parsed.alpha === null || typeof parsed.alpha === 'string') && !knownKeys.has(parsed.key) && parsed.key !== '0,0,0' && parsed.key !== '255,255,255') {
const surface = foreignFillSurface(parsed.key, source, surfaces);
foreign.set(surface, [...(foreign.get(surface) ?? []), selector]);
}
}
// react-native-web's base classes (`.css-146c3p1{color:rgb(0,0,0)}` on every Text) declare a // react-native-web's base classes (`.css-146c3p1{color:rgb(0,0,0)}` on every Text) declare a
// framework default, not a palette color. Re-declared with !important it beats every inline // framework default, not a palette color. Re-declared with !important it beats every inline
// Text color: the liked heart and its count (inline `color: rgb(249, 24, 128)`) turned the page // Text color: the liked heart and its count (inline `color: rgb(249, 24, 128)`) turned the page
@ -427,7 +522,10 @@ export function buildThemeCss(rules: Iterable<RuleLike>, source: Source, palette
const value = rule.style.getPropertyValue(property); const value = rule.style.getPropertyValue(property);
if (!value) continue; if (!value) continue;
const resolved = resolve(value); const resolved = resolve(value);
const mapped = mapColor(property, resolved, source, palette); // X's blue at a low alpha is a hover or selected wash (theme engine v3 R1): the surface's derived
// states, never the accent family at that alpha (Windows 98's lavender rows, 1.0.2).
const wash = surfaces && property === 'background-color' ? accentWash(resolved, source, surfaces) : null;
const mapped = wash ?? mapColor(property, resolved, source, palette);
if (!mapped) continue; if (!mapped) continue;
declarations.push(`${property}:${mapped} !important`); declarations.push(`${property}:${mapped} !important`);
if ((property === 'color' || property === 'fill') && mapColor(property, resolved, source, palette, ['accent'])) keep.push(`${property}:${resolved} !important`); if ((property === 'color' || property === 'fill') && mapColor(property, resolved, source, palette, ['accent'])) keep.push(`${property}:${resolved} !important`);
@ -444,7 +542,7 @@ export function buildThemeCss(rules: Iterable<RuleLike>, source: Source, palette
// White labels on accent fills follow the accent: white, or the theme's background when the // White labels on accent fills follow the accent: white, or the theme's background when the
// accent is light (High Contrast yellow, Terminal green). After the inline rules, so it wins. // accent is light (High Contrast yellow, Terminal green). After the inline rules, so it wins.
if (palette.accent) { if (palette.accent) {
const label = accentLabel(palette.accent, palette.bg); const label = surfaces?.accentFill.ink ?? accentLabel(palette.accent, palette.bg);
// Class or inline fill, class or inline label (the "See new posts" pill is a class fill with an inline label). // Class or inline fill, class or inline label (the "See new posts" pill is a class fill with an inline label).
const fills = [...accentFills, ...source.accent.map(key => inlineSelector('background-color', key))].join(','); const fills = [...accentFills, ...source.accent.map(key => inlineSelector('background-color', key))].join(',');
const labels = [...whiteLabels, inlineSelector('color', '255,255,255')].join(','); const labels = [...whiteLabels, inlineSelector('color', '255,255,255')].join(',');
@ -457,6 +555,15 @@ export function buildThemeCss(rules: Iterable<RuleLike>, source: Source, palette
} }
} }
if (full) out.push(chatSurfaceCss(full)); if (full) out.push(chatSurfaceCss(full));
// R2 after the general remap and the inline rules, so a fill's own ink wins inside it.
if (surfaces) {
for (const key of X_FOREIGN_INLINE_FILLS) {
const surface = foreignFillSurface(key, source, surfaces);
foreign.set(surface, [...(foreign.get(surface) ?? []), inlineSelector('background-color', key)]);
}
for (const [surface, selectors] of foreign) out.push(inkUnderFill(selectors, surface));
out.push(tooltipCss(surfaces.tooltip));
}
out.push(...badges); out.push(...badges);
// Signed-out pages only: their rules carry :has() (X's sign-in buttons), and any :has() over the page // Signed-out pages only: their rules carry :has() (X's sign-in buttons), and any :has() over the page
// costs every insertion a full restyle, so a signed-in page (engine flag `app`) never gets them. // costs every insertion a full restyle, so a signed-in page (engine flag `app`) never gets them.
@ -547,6 +654,10 @@ export function installTheme(win: Window, options: ThemeRuntimeOptions = {}): Th
staticCss: (choice, mode) => buildThemeStructureCss(resolveTheme(choice), resolvedTheme(choice, mode), { ...env, icons: choice.icons ?? env.icons, packs: choice.packs }), staticCss: (choice, mode) => buildThemeStructureCss(resolveTheme(choice), resolvedTheme(choice, mode), { ...env, icons: choice.icons ?? env.icons, packs: choice.packs }),
}, options); }, options);
try { installIconGate(win); } catch (error) { console.error('[wayBetter for X] icon gate failed', error); } try { installIconGate(win); } catch (error) { console.error('[wayBetter for X] icon gate failed', error); }
try { installFrameMarker(win, X_FRAMED); } catch (error) { console.error('[wayBetter for X] frame marker failed', error); }
try { installLayerGuard(win, { root: '#layers', targets: X_LAYER_TARGETS }); } catch (error) { console.error('[wayBetter for X] layer guard failed', error); }
// The bar's label mode (theme engine v3 4.1): measured on X's nav while a bar layout is on.
try { installBarMeasurer(win, { nav: 'header[role="banner"] nav[role="navigation"]', item: ':is(a,button)', icon: ':scope > div > div:first-child', label: ':scope > div > div:last-child:not(:first-child)' }); } catch (error) { console.error('[wayBetter for X] bar measurer failed', error); }
return { return {
...handle, ...handle,
palette: () => paletteFor(handle.current()), palette: () => paletteFor(handle.current()),

View file

@ -9,16 +9,22 @@ import type { IconTable } from '../../../../waybetter/packages/runtime/src/theme
const NAV = 'header[role="banner"] nav[role="navigation"]'; const NAV = 'header[role="banner"] nav[role="navigation"]';
const ACT = 'article[data-testid="tweet"] [role="group"]'; const ACT = 'article[data-testid="tweet"] [role="group"]';
const TOOLS = '[data-testid="toolBar"] nav'; const TOOLS = '[data-testid="toolBar"] nav';
// X's More menu repeats rail destinations that do not fit the rail (Lists, Communities, Creator Studio).
const MENU = '#layers [role="menu"]';
export const X_ICONS: IconTable = { export const X_ICONS: IconTable = {
home: { ctx: `${NAV} [data-testid="AppTabBar_Home_Link"] svg`, group: 'nav', core: true }, home: { ctx: `${NAV} [data-testid="AppTabBar_Home_Link"] svg`, group: 'nav', core: true },
explore: { ctx: `${NAV} [data-testid="AppTabBar_Explore_Link"] svg`, group: 'nav', core: true }, explore: { ctx: `${NAV} [data-testid="AppTabBar_Explore_Link"] svg`, group: 'nav', core: true },
notifications: { ctx: `${NAV} [data-testid="AppTabBar_Notifications_Link"] svg`, group: 'nav', core: true }, notifications: { ctx: `${NAV} [data-testid="AppTabBar_Notifications_Link"] svg`, group: 'nav', core: true },
messages: { ctx: `${NAV} [data-testid="AppTabBar_DirectMessage_Link"] svg`, group: 'nav' }, // The floating Chat and Grok buttons at the bottom right are the same destinations (read live 2026-10-02).
grok: { ctx: `${NAV} a[href="/i/grok"] svg`, group: 'nav' }, messages: { ctx: `${NAV} [data-testid="AppTabBar_DirectMessage_Link"] svg,[data-testid="chat-drawer-main"] svg`, group: 'nav' },
grok: { ctx: `${NAV} a[href="/i/grok"] svg,[data-testid="GrokDrawerHeader"] svg`, group: 'nav' },
history: { ctx: `${NAV} a[href="/i/history"] svg`, group: 'nav' },
studio: { ctx: `${NAV} a[href*="/creators/studio"] svg,${MENU} a[href*="/creators/studio"] svg`, group: 'nav' },
articles: { ctx: `${NAV} a[href$="/articles"] svg`, group: 'nav' },
bookmarks: { ctx: `${NAV} a[href="/i/bookmarks"] svg`, group: 'nav' }, bookmarks: { ctx: `${NAV} a[href="/i/bookmarks"] svg`, group: 'nav' },
lists: { ctx: `${NAV} a[href$="/lists"] svg`, group: 'nav' }, lists: { ctx: `${NAV} a[href$="/lists"] svg,${MENU} a[href$="/lists"] svg`, group: 'nav' },
communities: { ctx: `${NAV} a[href$="/communities"] svg`, group: 'nav' }, communities: { ctx: `${NAV} a[href$="/communities"] svg,${MENU} a[href$="/communities"] svg`, group: 'nav' },
premium: { ctx: `${NAV} a[href^="/i/premium"] svg,${NAV} a[href^="/i/verified"] svg`, group: 'nav' }, premium: { ctx: `${NAV} a[href^="/i/premium"] svg,${NAV} a[href^="/i/verified"] svg`, group: 'nav' },
profile: { ctx: `${NAV} [data-testid="AppTabBar_Profile_Link"] svg`, group: 'nav', core: true }, profile: { ctx: `${NAV} [data-testid="AppTabBar_Profile_Link"] svg`, group: 'nav', core: true },
more: { ctx: `${NAV} [data-testid="AppTabBar_More_Menu"] svg`, group: 'nav', core: true }, more: { ctx: `${NAV} [data-testid="AppTabBar_More_Menu"] svg`, group: 'nav', core: true },

View file

@ -12,6 +12,8 @@ const POST = 'article[data-testid="tweet"]';
const COLUMN = '[data-testid="primaryColumn"]'; const COLUMN = '[data-testid="primaryColumn"]';
/** The main column on every route but chat (a drawn bar above X's chat app would push its composer out of the window). */ /** The main column on every route but chat (a drawn bar above X's chat app would push its composer out of the window). */
// Keyed on the engine's page flag (THEME_FLAGS in theme.ts), never `:has()` over the page: see SIGNED_OUT_ROOT. // Keyed on the engine's page flag (THEME_FLAGS in theme.ts), never `:has()` over the page: see SIGNED_OUT_ROOT.
/** Where an active 98 title bar's gradient ends (98.css `--dialog-blue-light`). */
const TITLE_END = '#1084d0';
const FRAMED = 'html:not([data-wb-chat]) [data-testid="primaryColumn"]'; const FRAMED = 'html:not([data-wb-chat]) [data-testid="primaryColumn"]';
const RAIL = 'header[role="banner"]'; const RAIL = 'header[role="banner"]';
const NAV = `${RAIL} nav[role="navigation"]`; const NAV = `${RAIL} nav[role="navigation"]`;
@ -44,7 +46,10 @@ export const X_PARTS: PartMap = {
composerTool: { sel: '[data-testid="toolBar"] nav [role="button"]', text: '[data-testid="toolBar"] nav [role="button"] svg' }, composerTool: { sel: '[data-testid="toolBar"] nav [role="button"]', text: '[data-testid="toolBar"] nav [role="button"] svg' },
// Live 2026-10-01: the painted, bordered card is the grandparent of X's aside/section (a plain div sits // Live 2026-10-01: the painted, bordered card is the grandparent of X's aside/section (a plain div sits
// between), or the parent of a `*_sidebar` module (news, scores). // between), or the parent of a `*_sidebar` module (news, scores).
sidebarCard: { sel: '[data-testid="sidebarColumn"] div:has(> div > :is(aside[role="complementary"],section[role="region"])),[data-testid="sidebarColumn"] div:has(> [data-testid$="_sidebar"])' }, // One module per card: the column holding all the modules has a section's wrapper as a direct child
// too, so `div:has(> div > section)` framed the whole column (live 1.0.2). Asides sit two deep,
// sections (trends) one deep, the news/scores cards beside a `*_sidebar` tracker.
sidebarCard: { sel: '[data-testid="sidebarColumn"] div:not(:has(> :nth-child(3))):has(> div > aside[role="complementary"]),[data-testid="sidebarColumn"] div:has(> section[role="region"]),[data-testid="sidebarColumn"] div:has(> [data-testid$="_sidebar"])' },
menu: { sel: '#layers [role="menu"]' }, menu: { sel: '#layers [role="menu"]' },
hoverCard: { sel: '#layers [data-testid="HoverCard"]' }, hoverCard: { sel: '#layers [data-testid="HoverCard"]' },
// The compose dialog's painted sheet (the child of the modal that has a composer toolbar). Never every modal: the photo // The compose dialog's painted sheet (the child of the modal that has a composer toolbar). Never every modal: the photo
@ -61,10 +66,10 @@ export function xDecorTargets(): DecorTargets<XSkinContext> {
moving: `${POST},${NAV} > :is(a,button) > div,[role="tab"],[data-testid$="-follow"],[data-testid="tweetButtonInline"]`, moving: `${POST},${NAV} > :is(a,button) > div,[role="tab"],[data-testid$="-follow"],[data-testid="tweetButtonInline"]`,
pressable: `${NAV} > :is(a,button),[data-testid="tweetButtonInline"],[data-testid="tweetButton"],[data-testid$="-follow"],${POST} [role="group"] [role="button"]`, pressable: `${NAV} > :is(a,button),[data-testid="tweetButtonInline"],[data-testid="tweetButton"],[data-testid$="-follow"],${POST} [role="group"] [role="button"]`,
chrome: { chrome: {
// A window title bar on the main column, and on each sidebar card with X's own label for it. // A window title bar on the main column (98.css: navy fading to #1084d0, not a flat accent), and on each sidebar card with X's own label for it.
titlebar: (title, { colors }) => [ titlebar: (title, { colors }) => [
`${FRAMED}::before{content:${cssString(title || 'Home')};display:block;order:-1;box-sizing:border-box;height:24px;padding:4px 8px;font:700 12px/16px "Pixelated MS Sans Serif","MS Sans Serif","Tahoma",sans-serif;letter-spacing:.2px;color:#ffffff;background:linear-gradient(90deg, ${colors.inverse}, ${colors.accent});white-space:nowrap;overflow:hidden}`, `${FRAMED}::before{content:${cssString(title || 'Home')};display:block;order:-1;box-sizing:border-box;height:24px;padding:4px 8px;font:700 12px/16px "Pixelated MS Sans Serif","MS Sans Serif","Tahoma",sans-serif;letter-spacing:.2px;color:#ffffff;background:linear-gradient(90deg, ${colors.inverse}, ${TITLE_END});white-space:nowrap;overflow:hidden}`,
`[data-testid="sidebarColumn"] :is(aside[role="complementary"],section[role="region"])[aria-label]::before{content:attr(aria-label);display:block;margin:-12px -16px 10px;padding:3px 8px;font:700 12px/16px "Pixelated MS Sans Serif","MS Sans Serif","Tahoma",sans-serif;color:#ffffff;background:linear-gradient(90deg, ${colors.inverse}, ${colors.accent})}`, `[data-testid="sidebarColumn"] :is(aside[role="complementary"],section[role="region"])[aria-label]::before{content:attr(aria-label);display:block;margin:-12px -16px 10px;padding:3px 8px;font:700 12px/16px "Pixelated MS Sans Serif","MS Sans Serif","Tahoma",sans-serif;color:#ffffff;background:linear-gradient(90deg, ${colors.inverse}, ${TITLE_END})}`,
].join('\n'), ].join('\n'),
// A newspaper masthead: the theme's title between two rules at the top of the column. // A newspaper masthead: the theme's title between two rules at the top of the column.
masthead: (title, { colors, fonts }) => `${FRAMED}::before{content:${cssString(title || 'The Timeline')};display:block;order:-1;padding:18px 16px 12px;text-align:center;font:700 34px/1.1 ${fonts.heading};letter-spacing:-.01em;color:${colors.text};border-bottom:4px double ${colors.text};margin:0 16px}`, masthead: (title, { colors, fonts }) => `${FRAMED}::before{content:${cssString(title || 'The Timeline')};display:block;order:-1;padding:18px 16px 12px;text-align:center;font:700 34px/1.1 ${fonts.heading};letter-spacing:-.01em;color:${colors.text};border-bottom:4px double ${colors.text};margin:0 16px}`,
@ -152,28 +157,37 @@ ${NOT_CHAT} ${inner} > div > div:first-child{flex:1 1 auto !important}
${NOT_CHAT} ${inner} > div > div:last-child{flex:0 0 auto !important} ${NOT_CHAT} ${inner} > div > div:last-child{flex:0 0 auto !important}
/* The same for the groups inside the row (the nav and the Post button sit in full-width wrappers). */ /* The same for the groups inside the row (the nav and the Post button sit in full-width wrappers). */
${NOT_CHAT} ${inner} > div > div > div{width:auto !important;flex:0 1 auto !important;min-width:0 !important} ${NOT_CHAT} ${inner} > div > div > div{width:auto !important;flex:0 1 auto !important;min-width:0 !important}
${NOT_CHAT} ${NAV}{flex-direction:row !important;align-items:center !important;flex-wrap:nowrap !important;gap:2px} /* The nav's wrapper takes what is left of the row, so the items spread over the whole bar and no dead
${NOT_CHAT} ${NAV}{min-width:0 !important;overflow:hidden} space sits between the last item and the account (owner, 1.0.2 at 2000px). */
/* Items share the bar like taskbar buttons: each up to 160px, all shrinking alike, the label ending in an ${NOT_CHAT} ${inner} > div > div:first-child > div:has(> nav[role="navigation"]){flex:1 1 0 !important}
ellipsis and then only the icon (live 2026-10-02: X shows up to 12 items, more than a row of whole labels). */ ${edge === 'bottom' ? `/* A taskbar: Start (the logo), the quick launch (Post), then the task buttons. */
${NOT_CHAT} ${NAV} > :is(a,button){width:auto !important;flex:0 1 176px !important;min-width:36px !important;overflow:hidden} ${NOT_CHAT} ${inner} > div > div:first-child > div:has([data-testid="SideNav_NewTweet_Button"]){order:1}
${NOT_CHAT} ${NAV} > :is(a,button) > div{padding:8px 8px !important;gap:0 !important;min-width:0 !important;max-width:100% !important;box-sizing:border-box;justify-content:flex-start !important} ${NOT_CHAT} ${inner} > div > div:first-child > div:has(> nav[role="navigation"]){order:2}
` : ''}${NOT_CHAT} ${NAV}{flex-direction:row !important;align-items:center !important;flex-wrap:nowrap !important;gap:2px}
${NOT_CHAT} ${NAV}{min-width:0 !important;width:100% !important}
/* Items are taskbar buttons. Whether they carry their labels is measured (themeBar.ts, html[data-wb-bar]):
with labels, equal widths up to 168px and never narrower than the whole label; without, icon buttons with
the label as a tooltip. A label is whole or absent: no ellipsis anywhere in the bar (1.0.2 "H...", "E..."). */
${NOT_CHAT} ${NAV} > :is(a,button){position:relative;width:auto !important;flex:1 1 0 !important;max-width:168px !important;min-width:max-content !important}
${NOT_CHAT} ${NAV} > :is(a,button) > div{padding:8px 8px !important;gap:0 !important;max-width:100% !important;box-sizing:border-box;justify-content:flex-start !important}
${NOT_CHAT} ${NAV} > :is(a,button) > div > div:first-child{flex:none !important} ${NOT_CHAT} ${NAV} > :is(a,button) > div > div:first-child{flex:none !important}
${NOT_CHAT} ${NAV} > :is(a,button) > div > div:last-child:not(:first-child){display:block !important;flex:0 1 auto !important;margin-left:8px !important;margin-right:0 !important;padding-right:0 !important;min-width:0 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important} ${NOT_CHAT} ${NAV} > :is(a,button) > div > div:last-child:not(:first-child){display:block !important;flex:none !important;margin-left:8px !important;margin-right:0 !important;padding-right:0 !important;white-space:nowrap !important}
${NOT_CHAT} ${NAV} > :is(a,button) > div > div:last-child:not(:first-child) span{display:inline !important;white-space:nowrap !important} ${NOT_CHAT} ${NAV} > :is(a,button) > div > div:last-child:not(:first-child) span{display:inline !important;white-space:nowrap !important}
/* Icons mode (also before the first measurement, so a label is never seen cut). */
html:not([data-wb-chat]):not([data-wb-bar="labels"]) ${NAV}{justify-content:${edge === 'bottom' ? 'flex-start' : 'center'} !important}
html:not([data-wb-chat]):not([data-wb-bar="labels"]) ${NAV} > :is(a,button){flex:0 0 48px !important;min-width:0 !important}
html:not([data-wb-chat]):not([data-wb-bar="labels"]) ${NAV} > :is(a,button) > div{justify-content:center !important}
html:not([data-wb-chat]):not([data-wb-bar="labels"]) ${NAV} > :is(a,button) > div > div:last-child:not(:first-child){display:none !important}
html:not([data-wb-chat]):not([data-wb-bar="labels"]) ${NAV} > :is(a,button):is(:hover,:focus-visible)::after{content:attr(aria-label);position:absolute;${edge === 'bottom' ? 'bottom' : 'top'}:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:40;padding:4px 8px;white-space:nowrap;max-width:calc(100vw - 16px);font:12px/16px var(--wb-font-interface, inherit);background-color:${colors.text};color:${colors.bg};pointer-events:none}
${NOT_CHAT} ${RAIL} [data-testid="SideNav_NewTweet_Button"]{margin:0 0 0 8px !important;width:auto !important;min-height:40px !important;padding:0 16px !important} ${NOT_CHAT} ${RAIL} [data-testid="SideNav_NewTweet_Button"]{margin:0 ${edge === 'bottom' ? '0 0 0' : '0 0 8px'} !important;width:auto !important;min-height:40px !important;padding:0 16px !important}
${NOT_CHAT} ${RAIL} [data-testid="SideNav_AccountSwitcher_Button"]{margin:0 !important} ${NOT_CHAT} ${RAIL} [data-testid="SideNav_AccountSwitcher_Button"]{margin:0 !important}
${NOT_CHAT} main[role="main"]{padding-${edge}:56px !important;align-items:center !important} ${NOT_CHAT} main[role="main"]{padding-${edge}:56px !important;align-items:center !important}
/* X's floating Grok and Chat buttons (bottom right) ride above a bottom bar instead of over its last items. */ /* X's floating Grok and Chat buttons (bottom right) ride above a bottom bar instead of over its last items. */
${edge === 'bottom' ? `${NOT_CHAT} :is([data-testid="chat-drawer-root"],[data-testid="GrokDrawer"]){transform:translateY(-56px)}` : ''} ${edge === 'bottom' ? `${NOT_CHAT} :is([data-testid="chat-drawer-root"],[data-testid="GrokDrawer"]){transform:translateY(-56px)}` : ''}
/* Popovers clear the bar: the layer guard (themeGuards.ts) keeps them inside the viewport minus this inset. */
:root{--wb-bar-inset-${edge}:56px}
${NOT_CHAT} ${COLUMN} > div > div:first-child{${edge === 'top' ? 'top:56px !important' : ''}} ${NOT_CHAT} ${COLUMN} > div > div:first-child{${edge === 'top' ? 'top:56px !important' : ''}}
} }
/* Too narrow for words: the items are icon buttons (a label cut to one letter reads as noise). */ `;
@media (min-width:700px) and (max-width:1199px){
${NOT_CHAT} ${NAV} > :is(a,button){flex:0 1 48px !important}
${NOT_CHAT} ${NAV} > :is(a,button) > div{justify-content:center !important}
/* Only a label is hidden: below 1265px X itself renders the items with their icon alone (live 2026-10-02). */
${NOT_CHAT} ${NAV} > :is(a,button) > div > div:last-child:not(:first-child){display:none !important}
}`;
} }

View file

@ -16,6 +16,7 @@ import {
type Density, type FontChoice, type FontRole, type ThemeColors, type ThemeSpec, type Density, type FontChoice, type FontRole, type ThemeColors, type ThemeSpec,
} from '../../../../waybetter/packages/runtime/src/themeSpec.ts'; } from '../../../../waybetter/packages/runtime/src/themeSpec.ts';
import type { RuleLike } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts'; import type { RuleLike } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts';
import { deriveSurfaces, surfacesInputFromV2 } from '../../../../waybetter/packages/runtime/src/themeDerive.ts';
export type { RuleLike } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts'; export type { RuleLike } from '../../../../waybetter/packages/runtime/src/themeRuntime.ts';
export * from '../../../../waybetter/packages/runtime/src/themeSpec.ts'; export * from '../../../../waybetter/packages/runtime/src/themeSpec.ts';
@ -304,6 +305,15 @@ const STRUCTURE: Record<string, Partial<ThemeSpec>> = {
// and the compose dialog's app bar and sticky toolbar let the silver window show (X paints them its layer color). // and the compose dialog's app bar and sticky toolbar let the silver window show (X paints them its layer color).
'[data-testid="sidebarColumn"] div:has(> div > div > div > form[role="search"]){background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}', '[data-testid="sidebarColumn"] div:has(> div > div > div > form[role="search"]){background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}',
'#layers [role="dialog"][aria-modal="true"]:has([data-testid="toolBar"]) div:has(:is([data-testid="app-bar-close"],[data-testid="toolBar"])){background-color:transparent !important}', '#layers [role="dialog"][aria-modal="true"]:has([data-testid="toolBar"]) div:has(:is([data-testid="app-bar-close"],[data-testid="toolBar"])){background-color:transparent !important}',
// The taskbar of 98: an etched groove between the quick launch (Post) and the task buttons, and the
// account in a sunken tray at the right end, where the clock sits (98.css status-bar field).
'@media (min-width:700px){html:not([data-wb-chat]) header[role="banner"] div:has(> nav[role="navigation"]){padding:0 0 0 6px !important;margin:0 0 0 2px !important;box-shadow:inset 1px 0 #808080,inset 2px 0 #ffffff !important}',
'html:not([data-wb-chat]) header[role="banner"] > div > div > div > div:last-child{height:40px !important;align-self:center !important;padding:0 4px !important;background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #ffffff,inset 1px 1px #808080 !important}',
'html:not([data-wb-chat]) header[role="banner"] [data-testid="SideNav_AccountSwitcher_Button"]{border-radius:0 !important;padding:4px !important}}',
// Row hover: X tints a hovered post or notification with its blue at a low alpha, which became a lavender
// wash of the navy accent (owner, 1.0.2). 98 has no hover tint; a list row it is not focused on is
// button-face silver, the inactive selection of a 98 list view.
'main[role="main"] [data-testid="cellInnerDiv"] :is(article,[role="link"]):hover,main[role="main"] [data-testid="cellInnerDiv"] :is(article,[role="link"]):hover > div{background-color:#c0c0c0 !important}',
].join('\n'), ].join('\n'),
variants: { nav: 'bottom' }, variants: { nav: 'bottom' },
components: { components: {
@ -326,7 +336,7 @@ const STRUCTURE: Record<string, Partial<ThemeSpec>> = {
dividers: { style: 'solid', color: 'border', width: 1 }, chrome: { kind: 'titlebar', title: 'Timeline - wayBetter' }, dividers: { style: 'solid', color: 'border', width: 1 }, chrome: { kind: 'titlebar', title: 'Timeline - wayBetter' },
focusRing: { width: 2, style: 'dotted', color: 'text', offset: 1 }, scrollbar: { style: 'classic', track: 'elevated' }, focusRing: { width: 2, style: 'dotted', color: 'text', offset: 1 }, scrollbar: { style: 'classic', track: 'elevated' },
}, },
icons: { pack: 'wb-pixel' }, icons: { pack: 'retro-98' },
}, },
paper: { paper: {
layout: { column: 640, sidebar: 330, density: 'comfortable', cards: false, frame: false }, layout: { column: 640, sidebar: 330, density: 'comfortable', cards: false, frame: false },
@ -639,10 +649,12 @@ export function buildStructureCss(rules: Iterable<RuleLike>, theme: ThemeSpec, c
out.push(`@media (prefers-reduced-motion:no-preference){${TWEET},${CELL},[role="button"],a[role="link"],a[role="tab"],[data-testid="UserCell"]{transition:background-color ${t},box-shadow ${t},transform ${t},border-color ${t},color ${t}}}`); out.push(`@media (prefers-reduced-motion:no-preference){${TWEET},${CELL},[role="button"],a[role="link"],a[role="tab"],[data-testid="UserCell"]{transition:background-color ${t},box-shadow ${t},transform ${t},border-color ${t},color ${t}}}`);
} }
if (effects.hover === 'lift' && layout.cards) out.push(`@media (prefers-reduced-motion:no-preference){${MAIN} ${CELL} ${TWEET}:hover{transform:translateY(-1px);box-shadow:0 6px 22px ${rgba('#000000', 0.1)}}}`); if (effects.hover === 'lift' && layout.cards) out.push(`@media (prefers-reduced-motion:no-preference){${MAIN} ${CELL} ${TWEET}:hover{transform:translateY(-1px);box-shadow:0 6px 22px ${rgba('#000000', 0.1)}}}`);
if (effects.hover === 'tint') out.push(`${TWEET}:hover{background-color:${rgba(colors.accent, 0.035)} !important}`); // Row hover is the content surface's derived hover (theme engine v3 3.2): a neutral step that keeps
if (effects.hover === 'glow') { // every ink readable, never an accent wash. `glow` keeps its text glow and its accent edge mark.
out.push(`[data-testid="tweetText"],[data-testid="User-Name"] span{text-shadow:0 0 6px ${rgba(colors.text, 0.35)}}`); if (effects.hover === 'tint' || effects.hover === 'glow') {
out.push(`${TWEET}:hover{background-color:${rgba(colors.accent, 0.05)} !important;box-shadow:inset 2px 0 0 ${colors.accent}}`); const hover = deriveSurfaces(surfacesInputFromV2(colors)).content.hover;
if (effects.hover === 'glow') out.push(`[data-testid="tweetText"],[data-testid="User-Name"] span{text-shadow:0 0 6px ${rgba(colors.text, 0.35)}}`);
out.push(`${TWEET}:hover{background-color:${hover} !important${effects.hover === 'glow' ? `;box-shadow:inset 2px 0 0 ${colors.accent}` : ''}}`);
} }
if (effects.crt) { if (effects.crt) {
out.push(`body::after{content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;background:repeating-linear-gradient(0deg,${rgba('#000000', 0.14)} 0 1px,transparent 1px 3px),radial-gradient(ellipse at center,transparent 62%,${rgba('#000000', 0.38)})}`); out.push(`body::after{content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;background:repeating-linear-gradient(0deg,${rgba('#000000', 0.14)} 0 1px,transparent 1px 3px),radial-gradient(ellipse at center,transparent 62%,${rgba('#000000', 0.38)})}`);

View file

@ -3,6 +3,8 @@
// X's mode and the owner's icon choice, so X inserting rules never rebuilds it. // X's mode and the owner's icon choice, so X inserting rules never rebuilds it.
import { compileComponents, type RoleColors } from '../../../../waybetter/packages/runtime/src/themeComponents.ts'; import { compileComponents, type RoleColors } from '../../../../waybetter/packages/runtime/src/themeComponents.ts';
import { inkOnEvery, TARGET } from '../../../../waybetter/packages/runtime/src/themeInk.ts';
import { CLAMPED_ATTR, frameMarkerCss, layerGuardCss } from '../../../../waybetter/packages/runtime/src/themeGuards.ts';
import { compileDecor } from '../../../../waybetter/packages/runtime/src/themeDecor.ts'; import { compileDecor } from '../../../../waybetter/packages/runtime/src/themeDecor.ts';
import { ICON_GROUPS, compileIcons, createIconCatalog, iconGroupsPresent, normalizeIconChoice, type IconChoice, type IconGroup, type IconPack } from '../../../../waybetter/packages/runtime/src/themeIcons.ts'; import { ICON_GROUPS, compileIcons, createIconCatalog, iconGroupsPresent, normalizeIconChoice, type IconChoice, type IconGroup, type IconPack } from '../../../../waybetter/packages/runtime/src/themeIcons.ts';
import { compileVariants, resolveVariants } from '../../../../waybetter/packages/runtime/src/themeVariants.ts'; import { compileVariants, resolveVariants } from '../../../../waybetter/packages/runtime/src/themeVariants.ts';
@ -39,6 +41,7 @@ export function buildStructureCss(theme: ThemeSpec, resolved: ResolvedTheme, env
const f = resolved.fonts!; const f = resolved.fonts!;
const fonts = { interface: f.interface.stack, post: f.post.stack, heading: f.heading.stack, numbers: f.numbers.stack, mono: f.mono.stack, chrome: f.chrome.stack, dialog: f.dialog.stack }; const fonts = { interface: f.interface.stack, post: f.post.stack, heading: f.heading.stack, numbers: f.numbers.stack, mono: f.mono.stack, chrome: f.chrome.stack, dialog: f.dialog.stack };
const out: string[] = []; const out: string[] = [];
out.push(X_LAYER_CSS, frameMarkerCss());
if (theme.components) { if (theme.components) {
const { values, rules } = compileComponents(theme.components, X_PARTS, { colors, fonts }); const { values, rules } = compileComponents(theme.components, X_PARTS, { colors, fonts });
if (values.length) out.push(`:where(:root){${values.join(';')}}`); if (values.length) out.push(`:where(:root){${values.join(';')}}`);
@ -49,12 +52,23 @@ export function buildStructureCss(theme: ThemeSpec, resolved: ResolvedTheme, env
const skin: XSkinContext = { colors, fonts, labels, brackets: theme.variants?.actions === 'labels' && /\bmono\b|Mono/.test(fonts.interface) }; const skin: XSkinContext = { colors, fonts, labels, brackets: theme.variants?.actions === 'labels' && /\bmono\b|Mono/.test(fonts.interface) };
out.push(...compileVariants(resolveVariants(theme.variants, { allowed: env.layout !== false }), X_SKINS, skin)); out.push(...compileVariants(resolveVariants(theme.variants, { allowed: env.layout !== false }), X_SKINS, skin));
if (theme.decor) out.push(...compileDecor(theme.decor, xDecorTargets(), skin)); if (theme.decor) out.push(...compileDecor(theme.decor, xDecorTargets(), skin));
// Action colors: the set state of like, repost and bookmark, and the reply hover. // Action colors: the set state of like, repost and bookmark, and the reply hover. Meaning colours
const actions = theme.colors?.actions; // (theme engine v3 3.6, R4): X's like pink and repost green, or the theme's own, keep their hue and
if (actions) { // move in lightness only, to 3:1 as icons and 4.5:1 as counts on the post's ground (the like count
const act = (ids: string, color: string | undefined) => color ? `article[data-testid="tweet"] [role="group"] :is(${ids}) :is(div,span,svg){color:${color} !important}` : ''; // was 3.84:1 on white).
out.push(act('[data-testid="unlike"]', actions.like), act('[data-testid="unretweet"]', actions.repost), act('[data-testid="removeBookmark"]', actions.bookmark), if (theme.colors) {
actions.reply ? `article[data-testid="tweet"] [role="group"] [data-testid="reply"]:hover :is(div,span,svg){color:${actions.reply} !important}` : ''); const actions = theme.colors.actions ?? {};
const grounds = [colors.bg, colors.surface];
const act = (ids: string, color: string | undefined) => {
if (!color) return '';
const icon = inkOnEvery(grounds, color, TARGET.nonText, { keepHue: true }).ink;
const count = inkOnEvery(grounds, color, TARGET.text, { keepHue: true }).ink;
const base = `article[data-testid="tweet"] [role="group"] :is(${ids})`;
return `${base} :is(div,svg){color:${icon} !important}
${base} span{color:${count} !important}`;
};
out.push(act('[data-testid="unlike"]', actions.like ?? '#f91880'), act('[data-testid="unretweet"]', actions.repost ?? '#00ba7c'), act('[data-testid="removeBookmark"]', actions.bookmark),
actions.reply ? `article[data-testid="tweet"] [role="group"] [data-testid="reply"]:hover :is(div,span,svg){color:${inkOnEvery(grounds, actions.reply, TARGET.nonText, { keepHue: true }).ink} !important}` : '');
} }
const pack = catalog.resolve(env.icons, theme.icons); const pack = catalog.resolve(env.icons, theme.icons);
out.push(compileIcons(pack, env.icons === 'site' ? null : theme.icons, X_ICONS, { colors, gate: ICON_GATE, allowed: env.iconsAllowed !== false })); out.push(compileIcons(pack, env.icons === 'site' ? null : theme.icons, X_ICONS, { colors, gate: ICON_GATE, allowed: env.iconsAllowed !== false }));
@ -84,6 +98,18 @@ export function installIconGate(win: Window): () => void {
return () => { win.clearInterval(timer); seen = new Set(); }; return () => { win.clearInterval(timer); seen = new Set(); };
} }
/**
* X's popovers for the layer guard (theme engine v3 4.2): the positioned box of a hover card or account
* menu, menus, dropdowns and tooltips, inside `#layers`.
*/
export const X_LAYER_TARGETS = ['[data-testid="hoverCardParent"]', '[role="menu"]', '[role="listbox"]', '[data-testid="Dropdown"]', '[data-testid="HoverLabel"]'];
/** The guard's static rules, and X's caret (it points at the anchor the shift moved away from). */
export const X_LAYER_CSS = `${layerGuardCss()}
[${CLAMPED_ATTR}] [data-testid="HoverCard"] > svg:first-child{visibility:hidden !important}`;
/** X's framed parts for the frame marker (theme engine v3 4.3): sidebar cards and panels in the sidebar. */
export const X_FRAMED = { scopes: ['[data-testid="sidebarColumn"]'], parts: [X_PARTS.sidebarCard?.sel, X_PARTS.panel?.sel].filter(Boolean).join(',') };
export { normalizeIconChoice }; export { normalizeIconChoice };
/** The choice passed to `buildStructureCss` when nothing was picked. */ /** The choice passed to `buildStructureCss` when nothing was picked. */
export const defaultStructureEnv = (): StructureEnv => ({ icons: 'theme' }); export const defaultStructureEnv = (): StructureEnv => ({ icons: 'theme' });

View file

@ -66,7 +66,8 @@ const updateStatus = update === 'ready' ? { state: 'ready', version: '1.4.0', no
const tile = (hue: number) => svg(`<circle cx="22" cy="10" r="4" fill="hsl(${hue} 80% 75%)"/><path d="M0 28l10-10 7 7 5-4 10 9z" fill="hsl(${hue} 60% 55%)"/>`, `hsl(${hue} 40% 20%)`); const tile = (hue: number) => svg(`<circle cx="22" cy="10" r="4" fill="hsl(${hue} 80% 75%)"/><path d="M0 28l10-10 7 7 5-4 10 9z" fill="hsl(${hue} 60% 55%)"/>`, `hsl(${hue} 40% 20%)`);
const handlers: Record<string, Handler> = { const handlers: Record<string, Handler> = {
settings_get: () => ({ homeUrl: 'https://x.com/home', restoreTabs: true, externalLinks: 'pane', siteLinks: 'same' }), // `slowipc=ms`: the first native answer arrives late, as it can on a real start.
settings_get: () => new Promise(resolve => setTimeout(() => resolve({ homeUrl: 'https://x.com/home', restoreTabs: true, externalLinks: 'pane', siteLinks: 'same' }), Number(params.get('slowipc') ?? 0))),
profiles_get: () => state.profiles, profiles_get: () => state.profiles,
// Like native code (profiles.rs `removal`): a profile that still has a synced tab cannot be removed. // Like native code (profiles.rs `removal`): a profile that still has a synced tab cannot be removed.
profiles_set: ({ settings }) => { profiles_set: ({ settings }) => {
@ -189,7 +190,8 @@ const DECK_SOURCES = [
]; ];
export async function mountShellHarness(root: HTMLElement) { export async function mountShellHarness(root: HTMLElement) {
try { localStorage.removeItem('bt.shell.layout.v1'); } catch { /* Preview only. */ } // `keeplayout`: a reload test; the saved layout stays and no fake tabs are added.
if (!params.has('keeplayout')) try { localStorage.removeItem('bt.shell.layout.v1'); } catch { /* Preview only. */ }
try { try {
localStorage.removeItem('bt.shell.decks.v1'); localStorage.removeItem('bt.shell.decks.v1');
localStorage.removeItem('bt.shell.deck-settings.v1'); localStorage.removeItem('bt.shell.deck-settings.v1');
@ -222,7 +224,7 @@ export async function mountShellHarness(root: HTMLElement) {
const first = api.panels[0]!; const first = api.panels[0]!;
if (open === 'empty') { api.clear(); return; } if (open === 'empty') { api.clear(); return; }
// The workspace opened on start is the layout: no fake tabs on top. // The workspace opened on start is the layout: no fake tabs on top.
if (params.has('wsdefault')) return; if (params.has('wsdefault') || params.has('keeplayout')) return;
const count = Math.max(1, Number(params.get('tabs') ?? 6)); const count = Math.max(1, Number(params.get('tabs') ?? 6));
const pinned = Number(params.get('pinned') ?? 2); const pinned = Number(params.get('pinned') ?? 2);
const profiles = state.profiles.profiles; const profiles = state.profiles.profiles;

View file

@ -0,0 +1,103 @@
// Theme invariants (waybetter runtime themeInvariants.ts) on hand-built DOM in Chromium: each invariant
// fails on its smallest bad shape and passes on the good one. The shapes are the owner's reported bugs.
import { test, before, after } from 'node:test';
import assert from 'node:assert/strict';
import { build } from 'esbuild';
import { fileURLToPath } from 'node:url';
import { chromium, type Browser, type Page } from 'playwright';
const src = fileURLToPath(new URL('../../../waybetter/packages/runtime/src/themeInvariants.ts', import.meta.url));
let browser: Browser, page: Page, bundle: string;
before(async () => {
bundle = (await build({ entryPoints: [src], bundle: true, format: 'iife', globalName: 'WBInv', write: false, target: 'chrome120' })).outputFiles[0].text;
browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE || undefined });
page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
});
after(async () => { await browser?.close(); });
async function run(body: string, opts: Record<string, unknown> = {}) {
await page.setContent(`<!doctype html><html><body style="margin:0;background:#fff;font:15px sans-serif">${body}</body></html>`);
await page.addScriptTag({ content: bundle });
return page.evaluate(o => (window as unknown as { WBInv: { runInvariants: (d: Document, o: unknown) => { counts: Record<string, number>; findings: { id: string; detail: string }[] } } }).WBInv.runInvariants(document, o), opts);
}
const BAR = (items: string) => `<header role="banner"><nav role="navigation" style="display:flex;gap:0">${items}</nav></header>`;
test('I1: the "New" badge, navy on indigo, fails; white on black passes', async () => {
const bad = await run('<p style="background:rgb(30,27,75);color:rgb(0,0,168);padding:4px">New</p>');
assert.equal(bad.counts.I1, 1);
assert.match(bad.findings[0].detail, /1\.1\d:1/);
assert.equal((await run('<p style="background:#000;color:#fff">New</p>')).counts.I1, 0);
});
test('I1: the HoverLabel, black on grey 82, fails; large text uses 3:1', async () => {
assert.equal((await run('<div data-testid="HoverLabel" style="background:rgb(82,82,82);color:#000;width:80px">More</div>')).counts.I1, 1);
assert.equal((await run('<h1 style="font-size:28px;color:rgb(130,130,130)">Big</h1>')).counts.I1, 0);
assert.equal((await run('<h1 style="font-size:28px;color:rgb(130,130,130)">Big</h1>', { access: 'high' })).counts.I1, 1);
});
test('I1b: a faint icon fails', async () => {
const svg = (c: string) => `<svg width="24" height="24" viewBox="0 0 24 24" style="color:${c}"><path fill="currentColor" d="M0 0h24v24H0z"/></svg>`;
assert.equal((await run(svg('rgb(238,238,238)'))).counts.I1b, 1);
assert.equal((await run(svg('rgb(40,40,40)'))).counts.I1b, 0);
});
test('I2: X blue left on a themed page fails, unless the theme is X default', async () => {
const html = '<div style="background:rgb(29,155,240);width:200px;height:40px">Follow</div>';
assert.equal((await run(html)).counts.I2, 1);
assert.equal((await run(html, { exemptLeak: true })).counts.I2, 0);
});
test('I3: a bar label cut to "H…" fails; a whole label passes; a long user name is allowed', async () => {
const label = (w: number) => `<a role="link" style="display:block;width:${w}px"><span style="display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">Notifications</span></a>`;
assert.equal((await run(BAR(label(24)))).counts.I3, 1);
assert.equal((await run(BAR(label(200)))).counts.I3, 0);
const name = await run('<button><div data-testid="User-Name" style="width:30px"><span style="display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">Averylongname</span></div></button>');
assert.equal(name.counts.I3, 0);
});
test('I4: a horizontal bar with uneven items fails; equal items pass', async () => {
const item = (w: number, t: string) => `<a role="link" style="display:block;width:${w}px;height:40px"><span>${t}</span></a>`;
assert.ok((await run(BAR(item(80, 'Home') + item(140, 'Explore') + item(80, 'Chat')))).counts.I4 >= 1);
assert.equal((await run(BAR(item(100, 'Home') + item(100, 'Explore') + item(100, 'Chat')))).counts.I4, 0);
});
test('I4: an item covered by another element fails the hit test', async () => {
const item = (t: string) => `<a role="link" style="display:block;width:100px;height:40px"><span>${t}</span></a>`;
const r = await run(`${BAR(item('Home') + item('Explore') + item('Chat'))}<div style="position:fixed;left:0;top:0;width:320px;height:60px;background:#fff"></div>`);
assert.equal(r.counts.I4, 3);
});
test('I5: X line icons in the rail fail under a pack; masked glyphs pass', async () => {
const xIcon = '<a role="link"><svg width="26" height="26" viewBox="0 0 24 24"><path d="M12 3l9 8H3z"/></svg></a>';
const packed = '<a role="link"><svg width="26" height="26" viewBox="0 0 24 24" style="-webkit-mask:url(data:image/svg+xml,%3Csvg/%3E);background:#000"><path style="opacity:0" d="M12 3l9 8H3z"/></svg></a>';
assert.equal((await run(BAR(xIcon), { pack: true })).counts.I5, 1);
assert.equal((await run(BAR(packed), { pack: true })).counts.I5, 0);
assert.equal((await run(BAR(xIcon), { pack: false })).counts.I5, 0);
});
test('I6: the empty grey sidebar box fails; the same box with content passes', async () => {
assert.equal((await run('<div data-testid="sidebarColumn" style="width:350px"><section style="background:#c0c0c0;border:2px inset #fff;height:260px"></section></div>')).counts.I6, 1);
assert.equal((await run('<div style="width:350px"><section style="background:#c0c0c0;border:2px inset #fff;height:260px">Who to follow</section></div>')).counts.I6, 0);
});
test('I7: a frame around the whole sidebar column fails', async () => {
const r = await run('<div style="border:1px solid #888;background:#eee;width:400px"><div data-testid="sidebarColumn" style="height:100px">x</div></div>');
assert.equal(r.counts.I7, 1);
});
test('I8: the account menu 52px past the right edge and a HoverCard cut at the bottom fail', async () => {
const menu = await run('<div role="menu" style="position:fixed;left:1100px;top:100px;width:232px;height:200px;background:#fff;border:1px solid #888">Add an existing account</div>');
assert.equal(menu.counts.I8, 1);
const card = await run('<div data-testid="HoverCard" style="position:fixed;left:100px;top:700px;width:300px;height:240px;background:#fff">Profile</div>');
assert.equal(card.counts.I8, 1);
assert.equal((await run('<div role="menu" style="position:fixed;left:100px;top:100px;width:232px;height:200px;background:#fff">Menu</div>')).counts.I8, 0);
});
test('I10: a 16px bar target fails; 44px is needed with access high', async () => {
const item = (s: number) => `<a role="link" style="display:block;width:${s}px;height:${s}px">.</a>`;
assert.equal((await run(BAR(item(16) + item(16) + item(16)))).counts.I10, 3);
assert.equal((await run(BAR(item(32) + item(32) + item(32)))).counts.I10, 0);
assert.equal((await run(BAR(item(32) + item(32) + item(32)), { access: 'high' })).counts.I10, 3);
});

View file

@ -0,0 +1,51 @@
// Theme engine v3, step 6: pair-aware remap. X fills that are no palette colour take a theme surface and
// everything inside reads in that surface's ink; X's tooltip is the tooltip surface.
import assert from 'node:assert/strict';
import test from 'node:test';
import { contrastRatio } from '../../../waybetter/packages/runtime/src/themeApi.ts';
import { X_COLOUR_KEYS, X_MEANING_KEYS, X_PALETTES, accentWash, buildThemeCss, foreignFillSurface, paletteSurfaces } from '../src/inject/theme.ts';
import { BUILTIN_THEMES } from '../src/inject/themeSpec.ts';
const rule = (selectorText: string, style: Record<string, string>) => ({ selectorText, style: { getPropertyValue: (name: string) => style[name] ?? '' } });
for (const theme of BUILTIN_THEMES.filter(t => t.colors)) {
test(`${theme.id}: Creator Studio's indigo pill (class or inline) gets a fill and an ink that read (was 1.19:1)`, () => {
const palette = { ...theme.colors! };
const css = buildThemeCss([rule('.bg-indigo-950', { 'background-color': 'rgb(30, 27, 75)' })], X_PALETTES.light, palette);
const surfaces = paletteSurfaces(palette)!;
const s = foreignFillSurface('30,27,75', X_PALETTES.light, surfaces);
assert.ok(contrastRatio(s.ink, s.fill) >= 4.5, `${s.ink} on ${s.fill}`);
assert.ok(css.includes(`.bg-indigo-950`) && css.includes(`background-color:${s.fill} !important`), 'class fill remapped');
assert.ok(css.includes('background-color: rgb(30, 27, 75)"]'), 'inline fill remapped');
assert.ok(css.includes(`--jf-text-color:${s.ink} !important`), 'jetfuel text token follows the fill');
// The tooltip: its label reads on its fill (the "More" HoverLabel was 2.7:1).
assert.ok(contrastRatio(surfaces.tooltip.ink, surfaces.tooltip.fill) >= 4.5);
assert.ok(css.includes('[data-testid="HoverLabel"]'));
});
}
test('meaning colours and X accent swatches stay X\'s; every palette key is listed for the leak check', () => {
const palette = { ...BUILTIN_THEMES.find(t => t.id === 'windows-98')!.colors! };
const css = buildThemeCss([rule('.swatch', { 'background-color': 'rgb(120, 86, 255)' }), rule('.like', { 'background-color': 'rgb(249, 24, 128)' })], X_PALETTES.light, palette);
assert.ok(!css.includes('.swatch{') && !css.includes(':is(.swatch'));
assert.ok(!css.includes(':is(.like'));
for (const key of ['120,86,255', '249,24,128']) assert.ok(X_MEANING_KEYS.includes(key), key);
for (const key of ['255,255,255', '15,20,25', '29,155,240', '0,0,0', '115,115,115']) assert.ok(X_COLOUR_KEYS.includes(key), key);
});
test('X\'s blue washes become the content surface\'s neutral hover and its selection (no lavender rows)', () => {
const palette = { ...BUILTIN_THEMES.find(t => t.id === 'windows-98')!.colors! };
const surfaces = paletteSurfaces(palette)!;
const css = buildThemeCss([rule('.r-hover', { 'background-color': 'rgba(29, 155, 240, 0.1)' }), rule('.r-sel', { 'background-color': 'rgba(29, 155, 240, 0.15)' })], X_PALETTES.light, palette);
assert.ok(css.includes(`.r-hover{background-color:${surfaces.content.hover} !important}`), css.split('\n').find(l => l.startsWith('.r-hover')));
assert.ok(css.includes(`.r-sel{background-color:${surfaces.content.selected} !important}`));
assert.equal(accentWash('rgba(29, 155, 240, 0.5)', X_PALETTES.light, surfaces), null, 'a strong tint is a fill, not a state');
});
test('the live rule of the "New" pill: a compound selector with jetfuel\'s variable alpha is a fill class too', () => {
const palette = { ...BUILTIN_THEMES.find(t => t.id === 'windows-98')!.colors! };
const sel = '[data-theme="dark"] .jetfuel-style-root .j-j6ij7u11';
const css = buildThemeCss([rule(sel, { 'background-color': 'rgba(30, 27, 75, var(--jbgo))' })], X_PALETTES.light, palette);
const s = foreignFillSurface('30,27,75', X_PALETTES.light, paletteSurfaces(palette)!);
assert.ok(css.includes(`:is(${sel}`) && css.includes(`--jf-text-color:${s.ink} !important`));
});

View file

@ -1,7 +1,7 @@
{ {
"format": 2, "format": 2,
"name": "wayBetter Store", "name": "wayBetter Store",
"generatedAt": "2026-10-01T10:58:26Z", "generatedAt": "2026-10-01T21:10:36Z",
"items": [ "items": [
{ {
"apps": [ "apps": [
@ -290,8 +290,8 @@
"light" "light"
], ],
"url": "https://waybetter.fyi/store/themes/windows-98.json", "url": "https://waybetter.fyi/store/themes/windows-98.json",
"sha256": "8da1a8713dd67a05d6752b36814954944b8b9d470340e801cab0443e37e3a72c", "sha256": "19c43524b79ac8fbd5d3c61c1fb6e311a2a048d7fdec2658f71d71ede6ab7bad",
"size": 4107, "size": 4756,
"preview": "https://waybetter.fyi/store/previews/theme-windows-98.svg", "preview": "https://waybetter.fyi/store/previews/theme-windows-98.svg",
"colors": { "colors": {
"bg": "#c0c0c0", "bg": "#c0c0c0",

View file

@ -1 +1 @@
EyCVyP6stpxc2l0jrdZ1GR2YMhVudK//qcSKGGuIxI8b5EHACDDMMno4cGgUZC5eCTSFiN0aY2+JDuHt0/XFAg== tFMn1PlLYcOWmimlWON2OAWSkxQ5rPTWWUHSDtFQ9OI3Q7TUlk5udorHkk3awkm40ojbOvuKz5noO6Tv7g7OCQ==

View file

@ -1,7 +1,7 @@
{ {
"format": 3, "format": 3,
"name": "wayBetter Store", "name": "wayBetter Store",
"generatedAt": "2026-10-01T10:58:26Z", "generatedAt": "2026-10-01T21:10:36Z",
"items": [ "items": [
{ {
"apps": [ "apps": [
@ -290,8 +290,8 @@
"light" "light"
], ],
"url": "https://waybetter.fyi/store/themes/windows-98.json", "url": "https://waybetter.fyi/store/themes/windows-98.json",
"sha256": "8da1a8713dd67a05d6752b36814954944b8b9d470340e801cab0443e37e3a72c", "sha256": "19c43524b79ac8fbd5d3c61c1fb6e311a2a048d7fdec2658f71d71ede6ab7bad",
"size": 4107, "size": 4756,
"preview": "https://waybetter.fyi/store/previews/theme-windows-98.svg", "preview": "https://waybetter.fyi/store/previews/theme-windows-98.svg",
"colors": { "colors": {
"bg": "#c0c0c0", "bg": "#c0c0c0",
@ -427,8 +427,8 @@
"navigation" "navigation"
], ],
"url": "https://waybetter.fyi/store/icons/retro-98.icons.json", "url": "https://waybetter.fyi/store/icons/retro-98.icons.json",
"sha256": "768bf57232a28ce269c8e0ae3db716455180bb566f6edae9edb591df3fa63cf2", "sha256": "5f95b6dc59329e1da920ce4ffeb104527a812eba53b46254bef15ab19815ab4f",
"size": 31552, "size": 34075,
"preview": "https://waybetter.fyi/store/previews/icons-retro-98.svg", "preview": "https://waybetter.fyi/store/previews/icons-retro-98.svg",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"credits": "Drawn for wayBetter by CRTkafa: our own 16 by 16 pixel art in the sixteen-color palette of 1998. Nothing is taken from Windows or from any icon archive; no Microsoft artwork is included, and no third-party asset is used." "credits": "Drawn for wayBetter by CRTkafa: our own 16 by 16 pixel art in the sixteen-color palette of 1998. Nothing is taken from Windows or from any icon archive; no Microsoft artwork is included, and no third-party asset is used."
@ -452,8 +452,8 @@
"navigation" "navigation"
], ],
"url": "https://waybetter.fyi/store/icons/retro-xp.icons.json", "url": "https://waybetter.fyi/store/icons/retro-xp.icons.json",
"sha256": "f4065b7a5fcd16113d14b00874ad618f93ea04bc229283b9e9c8adb3caaa7701", "sha256": "43fea0d09222cc0132da3282377ff78eb49887ea1ae240f20399da444ace23ff",
"size": 30831, "size": 33498,
"preview": "https://waybetter.fyi/store/previews/icons-retro-xp.svg", "preview": "https://waybetter.fyi/store/previews/icons-retro-xp.svg",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"credits": "Drawn for wayBetter by CRTkafa: our own vector gel icons in the manner of 2001. Nothing is taken from Windows or from any icon archive; no Microsoft artwork is included, and no third-party asset is used." "credits": "Drawn for wayBetter by CRTkafa: our own vector gel icons in the manner of 2001. Nothing is taken from Windows or from any icon archive; no Microsoft artwork is included, and no third-party asset is used."

View file

@ -1 +1 @@
rC+TdwgxJuXxm6aGYHpV4eYhUioDpOqCp1IDo4fxJ+1lcZVXMJOcv6Fn6O1uwdDs5m3/1/a0h5kND+8b3PqAAg== ++axi/z5ZJjNLM0wSk+nJmUizL3tPBkGRVKHkwWFX9PM1LWFndEv0PzMLNM4O48V5cKjMqaG3YZGaUTAbG63DQ==

View file

@ -698,6 +698,70 @@
"fill": "#000000" "fill": "#000000"
} }
] ]
},
"history": {
"layers": [
{
"d": "M6 3h12v1.5h-12zM6 18h12v1.5h-12z",
"fill": "#c0c0c0"
},
{
"d": "M7.5 4.5h9v1.5h-9zM7.5 6h1.5v1.5h-1.5zM9 7.5h1.5v1.5h-1.5zM10.5 12h1.5v3h-1.5zM9 13.5h1.5v3h-1.5zM7.5 15h1.5v1.5h-1.5z",
"fill": "#ffffff"
},
{
"d": "M9 6h7.5v1.5h-7.5zM10.5 7.5h4.5v1.5h-4.5zM10.5 9h3v1.5h-3zM12 12h1.5v6h-1.5zM13.5 13.5h1.5v4.5h-1.5zM10.5 15h1.5v3h-1.5zM15 15h1.5v3h-1.5zM7.5 16.5h3v1.5h-3z",
"fill": "#ffff00"
},
{
"d": "M4.5 1.5h15v1.5h-15zM4.5 3h1.5v1.5h-1.5zM18 3h1.5v1.5h-1.5zM6 4.5h1.5v3h-1.5zM16.5 4.5h1.5v3h-1.5zM7.5 7.5h1.5v1.5h-1.5zM15 7.5h1.5v1.5h-1.5zM9 9h1.5v1.5h-1.5zM13.5 9h1.5v1.5h-1.5zM10.5 10.5h3v1.5h-3zM9 12h1.5v1.5h-1.5zM13.5 12h1.5v1.5h-1.5zM7.5 13.5h1.5v1.5h-1.5zM15 13.5h1.5v1.5h-1.5zM6 15h1.5v3h-1.5zM16.5 15h1.5v3h-1.5zM4.5 18h1.5v3h-1.5zM18 18h1.5v3h-1.5zM6 19.5h12v1.5h-12z",
"fill": "#000000"
}
]
},
"studio": {
"layers": [
{
"d": "M3 3h1.5v1.5h-1.5zM7.5 3h3v1.5h-3zM13.5 3h3v1.5h-3zM19.5 3h1.5v1.5h-1.5zM4.5 7.5h15v1.5h-15zM4.5 9h1.5v9h-1.5zM18 9h1.5v9h-1.5zM6 16.5h12v1.5h-12z",
"fill": "#ffffff"
},
{
"d": "M3 6h18v1.5h-18zM3 7.5h1.5v12h-1.5zM19.5 7.5h1.5v12h-1.5zM4.5 18h15v1.5h-15z",
"fill": "#808080"
},
{
"d": "M6 9h3v7.5h-3zM10.5 9h7.5v1.5h-7.5zM12 10.5h6v1.5h-6zM13.5 12h4.5v4.5h-4.5zM12 13.5h1.5v3h-1.5zM10.5 15h1.5v1.5h-1.5z",
"fill": "#000080"
},
{
"d": "M9 9h1.5v7.5h-1.5zM10.5 10.5h1.5v4.5h-1.5zM12 12h1.5v1.5h-1.5z",
"fill": "#ff0000"
},
{
"d": "M1.5 1.5h21v1.5h-21zM1.5 3h1.5v18h-1.5zM4.5 3h3v3h-3zM10.5 3h3v3h-3zM16.5 3h3v3h-3zM21 3h1.5v18h-1.5zM3 4.5h1.5v1.5h-1.5zM7.5 4.5h3v1.5h-3zM13.5 4.5h3v1.5h-3zM19.5 4.5h1.5v1.5h-1.5zM3 19.5h18v1.5h-18z",
"fill": "#000000"
}
]
},
"articles": {
"layers": [
{
"d": "M4.5 3h10.5v1.5h-10.5zM4.5 4.5h1.5v15h-1.5zM12 4.5h3v3h-3zM6 6h6v1.5h-6zM15 7.5h4.5v3h-4.5zM6 9h9v1.5h-9zM18 10.5h1.5v9h-1.5zM6 12h12v1.5h-12zM6 15h12v1.5h-12zM13.5 16.5h4.5v3h-4.5zM6 18h7.5v1.5h-7.5z",
"fill": "#ffffff"
},
{
"d": "M6 4.5h6v1.5h-6zM6 7.5h9v1.5h-9zM6 10.5h12v1.5h-12zM6 13.5h12v1.5h-12zM6 16.5h7.5v1.5h-7.5z",
"fill": "#000080"
},
{
"d": "M16.5 4.5h1.5v1.5h-1.5z",
"fill": "#808080"
},
{
"d": "M3 1.5h13.5v1.5h-13.5zM3 3h1.5v18h-1.5zM15 3h3v1.5h-3zM15 4.5h1.5v3h-1.5zM18 4.5h1.5v3h-1.5zM16.5 6h1.5v1.5h-1.5zM19.5 6h1.5v15h-1.5zM4.5 19.5h15v1.5h-15z",
"fill": "#000000"
}
]
} }
} }
} }

View file

@ -1226,6 +1226,103 @@
"opacity": 0.45 "opacity": 0.45
} }
] ]
},
"history": {
"layers": [
{
"d": "M1.4 12a10.6 10.6 0 1 0 21.2 0a10.6 10.6 0 1 0 -21.2 0z",
"fill": "#143c8c"
},
{
"d": "M2.6 12a9.4 9.4 0 1 0 18.8 0a9.4 9.4 0 1 0 -18.8 0z",
"fill": {
"from": "#ffffff",
"to": "#cfdcf4"
}
},
{
"d": "M12.9 12L12.9 5.4L11.1 5.4L11.1 12z",
"fill": "#143c8c"
},
{
"d": "M11.53 12.77L16.13 15.57L17.07 14.03L12.47 11.23z",
"fill": "#143c8c"
},
{
"d": "M10.6 12a1.4 1.4 0 1 0 2.8 0a1.4 1.4 0 1 0 -2.8 0z",
"fill": "#d2301a"
},
{
"d": "M5.4 6a5 2.2 0 1 0 10 0a5 2.2 0 1 0 -10 0z",
"fill": {
"from": "#ffffff",
"to": "#ffffff"
},
"opacity": 0.5
}
]
},
"studio": {
"layers": [
{
"d": "M3.2 3.6h17.6a1.6 1.6 0 0 1 1.6 1.6v13.6a1.6 1.6 0 0 1 -1.6 1.6h-17.6a1.6 1.6 0 0 1 -1.6 -1.6v-13.6a1.6 1.6 0 0 1 1.6 -1.6z",
"fill": "#3b4256"
},
{
"d": "M3.4 4.6h17.2a0.8 0.8 0 0 1 0.8 0.8v13.2a0.8 0.8 0 0 1 -0.8 0.8h-17.2a0.8 0.8 0 0 1 -0.8 -0.8v-13.2a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": {
"from": "#b8e0ff",
"to": "#5aa8f0"
}
},
{
"d": "M2.6 19.4V15l5.6-5 5.2 4.4 3-2.4 4.8 4.4v3z",
"fill": "#2f8a2a"
},
{
"d": "M14.6 8.6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z",
"fill": "#ffd84a"
},
{
"d": "M3.8 5.2h16.4a0.6 0.6 0 0 1 0.6 0.6v2.8a0.6 0.6 0 0 1 -0.6 0.6h-16.4a0.6 0.6 0 0 1 -0.6 -0.6v-2.8a0.6 0.6 0 0 1 0.6 -0.6z",
"fill": {
"from": "#ffffff",
"to": "#ffffff"
},
"opacity": 0.3
}
]
},
"articles": {
"layers": [
{
"d": "M5.6 1.8h12.8a1.4 1.4 0 0 1 1.4 1.4v17.6a1.4 1.4 0 0 1 -1.4 1.4h-12.8a1.4 1.4 0 0 1 -1.4 -1.4v-17.6a1.4 1.4 0 0 1 1.4 -1.4z",
"fill": "#3b4256"
},
{
"d": "M5.9 2.8h12.2a0.7 0.7 0 0 1 0.7 0.7v17a0.7 0.7 0 0 1 -0.7 0.7h-12.2a0.7 0.7 0 0 1 -0.7 -0.7v-17a0.7 0.7 0 0 1 0.7 -0.7z",
"fill": {
"from": "#ffffff",
"to": "#dfe8f6"
}
},
{
"d": "M8.2 6.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.2 10.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.2 14.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.1 17.8h4a0.7 0.7 0 0 1 0.7 0.7v0a0.7 0.7 0 0 1 -0.7 0.7h-4a0.7 0.7 0 0 1 -0.7 -0.7v0a0.7 0.7 0 0 1 0.7 -0.7z",
"fill": "#2a62d4"
}
]
} }
} }
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

View file

@ -76,7 +76,7 @@
"shadow": "none", "shadow": "none",
"crt": false "crt": false
}, },
"css": "[data-testid=\"primaryColumn\"]{border:0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #dfdfdf,inset -2px -2px #808080,inset 2px 2px #ffffff !important}\nheader[role=\"banner\"] h1[role=\"heading\"] > a{border-radius:0 !important;background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}\nheader[role=\"banner\"] h1[role=\"heading\"] > a:active{box-shadow:inset -1px -1px #ffffff,inset 1px 1px #0a0a0a,inset -2px -2px #dfdfdf,inset 2px 2px #808080 !important}\n[data-testid=\"sidebarColumn\"] div:has(> div > div > div > form[role=\"search\"]){background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}\n#layers [role=\"dialog\"][aria-modal=\"true\"]:has([data-testid=\"toolBar\"]) div:has(:is([data-testid=\"app-bar-close\"],[data-testid=\"toolBar\"])){background-color:transparent !important}", "css": "[data-testid=\"primaryColumn\"]{border:0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #dfdfdf,inset -2px -2px #808080,inset 2px 2px #ffffff !important}\nheader[role=\"banner\"] h1[role=\"heading\"] > a{border-radius:0 !important;background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}\nheader[role=\"banner\"] h1[role=\"heading\"] > a:active{box-shadow:inset -1px -1px #ffffff,inset 1px 1px #0a0a0a,inset -2px -2px #dfdfdf,inset 2px 2px #808080 !important}\n[data-testid=\"sidebarColumn\"] div:has(> div > div > div > form[role=\"search\"]){background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #ffffff,inset -2px -2px #808080,inset 2px 2px #dfdfdf !important}\n#layers [role=\"dialog\"][aria-modal=\"true\"]:has([data-testid=\"toolBar\"]) div:has(:is([data-testid=\"app-bar-close\"],[data-testid=\"toolBar\"])){background-color:transparent !important}\n@media (min-width:700px){html:not([data-wb-chat]) header[role=\"banner\"] div:has(> nav[role=\"navigation\"]){padding:0 0 0 6px !important;margin:0 0 0 2px !important;box-shadow:inset 1px 0 #808080,inset 2px 0 #ffffff !important}\nhtml:not([data-wb-chat]) header[role=\"banner\"] > div > div > div > div:last-child{height:40px !important;align-self:center !important;padding:0 4px !important;background-color:#c0c0c0 !important;box-shadow:inset -1px -1px #ffffff,inset 1px 1px #808080 !important}\nhtml:not([data-wb-chat]) header[role=\"banner\"] [data-testid=\"SideNav_AccountSwitcher_Button\"]{border-radius:0 !important;padding:4px !important}}",
"components": { "components": {
"nav": { "nav": {
"borderStyle": "bevel-out", "borderStyle": "bevel-out",
@ -159,6 +159,6 @@
} }
}, },
"icons": { "icons": {
"pack": "wb-pixel" "pack": "retro-98"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Before After
Before After

View file

@ -16,7 +16,7 @@ import { BUILTIN_PACKS, packDocument } from '../apps/desktop/src/inject/packs/in
import { RETRO_PACKS, retroDocument } from '../apps/desktop/src/inject/packs/retro.ts'; import { RETRO_PACKS, retroDocument } from '../apps/desktop/src/inject/packs/retro.ts';
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
export const STORE_ICON_IDS = [...BUILTIN_PACKS.map(pack => pack.id), ...RETRO_PACKS.map(pack => pack.id)]; export const STORE_ICON_IDS = [...new Set([...BUILTIN_PACKS.map(pack => pack.id), ...RETRO_PACKS.map(pack => pack.id)])];
/** The pack file as the Store publishes it. */ /** The pack file as the Store publishes it. */
export const packFile = id => `${JSON.stringify(packDocument(id) ?? retroDocument(id), null, 1)}\n`; export const packFile = id => `${JSON.stringify(packDocument(id) ?? retroDocument(id), null, 1)}\n`;

View file

@ -49,7 +49,7 @@
"assets/readme/app-menu.webp": "8936170ce5beab50aa6d8afbdbcfc11b2512cc878aeb0988d7cb84ebf5c11364", "assets/readme/app-menu.webp": "8936170ce5beab50aa6d8afbdbcfc11b2512cc878aeb0988d7cb84ebf5c11364",
"assets/readme/chat-plus.mp4": "7ab687c9d6e1c805e6499283854e334d1bb1f1af593950982852961420d49cf5", "assets/readme/chat-plus.mp4": "7ab687c9d6e1c805e6499283854e334d1bb1f1af593950982852961420d49cf5",
"assets/readme/chat-plus.webp": "0b240aa32f0e99b7d907b8ed72c1a3ffed46f8ff9ebf5902c4e180932b7741b1", "assets/readme/chat-plus.webp": "0b240aa32f0e99b7d907b8ed72c1a3ffed46f8ff9ebf5902c4e180932b7741b1",
"assets/readme/hero.webp": "6a09807102d9e1e65fea8337b05245162f62943726d188f8dd7158edb5e4d0fd", "assets/readme/hero.webp": "b4d9ec3ebf86e0bad0b3fb40f82f18dd4544cdee332b5042cc0c2408a63cf1a7",
"assets/readme/like-fix.mp4": "7d7b68137537ca2b02d093c19c97a21dcda3dc7f1cc74475f166e6c17dbc2dbb", "assets/readme/like-fix.mp4": "7d7b68137537ca2b02d093c19c97a21dcda3dc7f1cc74475f166e6c17dbc2dbb",
"assets/readme/like-fix.webp": "970494d80ee1f02952a5069523fa4bef83c8c3d976e3df839d8458821d426eeb", "assets/readme/like-fix.webp": "970494d80ee1f02952a5069523fa4bef83c8c3d976e3df839d8458821d426eeb",
"assets/readme/split-accounts.mp4": "c05e04a54ebd2c87c28808ec8091c403b9f1b0ec2703ca39e25f71a4a6cdb63d", "assets/readme/split-accounts.mp4": "c05e04a54ebd2c87c28808ec8091c403b9f1b0ec2703ca39e25f71a4a6cdb63d",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

View file

@ -698,6 +698,70 @@
"fill": "#000000" "fill": "#000000"
} }
] ]
},
"history": {
"layers": [
{
"d": "M6 3h12v1.5h-12zM6 18h12v1.5h-12z",
"fill": "#c0c0c0"
},
{
"d": "M7.5 4.5h9v1.5h-9zM7.5 6h1.5v1.5h-1.5zM9 7.5h1.5v1.5h-1.5zM10.5 12h1.5v3h-1.5zM9 13.5h1.5v3h-1.5zM7.5 15h1.5v1.5h-1.5z",
"fill": "#ffffff"
},
{
"d": "M9 6h7.5v1.5h-7.5zM10.5 7.5h4.5v1.5h-4.5zM10.5 9h3v1.5h-3zM12 12h1.5v6h-1.5zM13.5 13.5h1.5v4.5h-1.5zM10.5 15h1.5v3h-1.5zM15 15h1.5v3h-1.5zM7.5 16.5h3v1.5h-3z",
"fill": "#ffff00"
},
{
"d": "M4.5 1.5h15v1.5h-15zM4.5 3h1.5v1.5h-1.5zM18 3h1.5v1.5h-1.5zM6 4.5h1.5v3h-1.5zM16.5 4.5h1.5v3h-1.5zM7.5 7.5h1.5v1.5h-1.5zM15 7.5h1.5v1.5h-1.5zM9 9h1.5v1.5h-1.5zM13.5 9h1.5v1.5h-1.5zM10.5 10.5h3v1.5h-3zM9 12h1.5v1.5h-1.5zM13.5 12h1.5v1.5h-1.5zM7.5 13.5h1.5v1.5h-1.5zM15 13.5h1.5v1.5h-1.5zM6 15h1.5v3h-1.5zM16.5 15h1.5v3h-1.5zM4.5 18h1.5v3h-1.5zM18 18h1.5v3h-1.5zM6 19.5h12v1.5h-12z",
"fill": "#000000"
}
]
},
"studio": {
"layers": [
{
"d": "M3 3h1.5v1.5h-1.5zM7.5 3h3v1.5h-3zM13.5 3h3v1.5h-3zM19.5 3h1.5v1.5h-1.5zM4.5 7.5h15v1.5h-15zM4.5 9h1.5v9h-1.5zM18 9h1.5v9h-1.5zM6 16.5h12v1.5h-12z",
"fill": "#ffffff"
},
{
"d": "M3 6h18v1.5h-18zM3 7.5h1.5v12h-1.5zM19.5 7.5h1.5v12h-1.5zM4.5 18h15v1.5h-15z",
"fill": "#808080"
},
{
"d": "M6 9h3v7.5h-3zM10.5 9h7.5v1.5h-7.5zM12 10.5h6v1.5h-6zM13.5 12h4.5v4.5h-4.5zM12 13.5h1.5v3h-1.5zM10.5 15h1.5v1.5h-1.5z",
"fill": "#000080"
},
{
"d": "M9 9h1.5v7.5h-1.5zM10.5 10.5h1.5v4.5h-1.5zM12 12h1.5v1.5h-1.5z",
"fill": "#ff0000"
},
{
"d": "M1.5 1.5h21v1.5h-21zM1.5 3h1.5v18h-1.5zM4.5 3h3v3h-3zM10.5 3h3v3h-3zM16.5 3h3v3h-3zM21 3h1.5v18h-1.5zM3 4.5h1.5v1.5h-1.5zM7.5 4.5h3v1.5h-3zM13.5 4.5h3v1.5h-3zM19.5 4.5h1.5v1.5h-1.5zM3 19.5h18v1.5h-18z",
"fill": "#000000"
}
]
},
"articles": {
"layers": [
{
"d": "M4.5 3h10.5v1.5h-10.5zM4.5 4.5h1.5v15h-1.5zM12 4.5h3v3h-3zM6 6h6v1.5h-6zM15 7.5h4.5v3h-4.5zM6 9h9v1.5h-9zM18 10.5h1.5v9h-1.5zM6 12h12v1.5h-12zM6 15h12v1.5h-12zM13.5 16.5h4.5v3h-4.5zM6 18h7.5v1.5h-7.5z",
"fill": "#ffffff"
},
{
"d": "M6 4.5h6v1.5h-6zM6 7.5h9v1.5h-9zM6 10.5h12v1.5h-12zM6 13.5h12v1.5h-12zM6 16.5h7.5v1.5h-7.5z",
"fill": "#000080"
},
{
"d": "M16.5 4.5h1.5v1.5h-1.5z",
"fill": "#808080"
},
{
"d": "M3 1.5h13.5v1.5h-13.5zM3 3h1.5v18h-1.5zM15 3h3v1.5h-3zM15 4.5h1.5v3h-1.5zM18 4.5h1.5v3h-1.5zM16.5 6h1.5v1.5h-1.5zM19.5 6h1.5v15h-1.5zM4.5 19.5h15v1.5h-15z",
"fill": "#000000"
}
]
} }
} }
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

View file

@ -1226,6 +1226,103 @@
"opacity": 0.45 "opacity": 0.45
} }
] ]
},
"history": {
"layers": [
{
"d": "M1.4 12a10.6 10.6 0 1 0 21.2 0a10.6 10.6 0 1 0 -21.2 0z",
"fill": "#143c8c"
},
{
"d": "M2.6 12a9.4 9.4 0 1 0 18.8 0a9.4 9.4 0 1 0 -18.8 0z",
"fill": {
"from": "#ffffff",
"to": "#cfdcf4"
}
},
{
"d": "M12.9 12L12.9 5.4L11.1 5.4L11.1 12z",
"fill": "#143c8c"
},
{
"d": "M11.53 12.77L16.13 15.57L17.07 14.03L12.47 11.23z",
"fill": "#143c8c"
},
{
"d": "M10.6 12a1.4 1.4 0 1 0 2.8 0a1.4 1.4 0 1 0 -2.8 0z",
"fill": "#d2301a"
},
{
"d": "M5.4 6a5 2.2 0 1 0 10 0a5 2.2 0 1 0 -10 0z",
"fill": {
"from": "#ffffff",
"to": "#ffffff"
},
"opacity": 0.5
}
]
},
"studio": {
"layers": [
{
"d": "M3.2 3.6h17.6a1.6 1.6 0 0 1 1.6 1.6v13.6a1.6 1.6 0 0 1 -1.6 1.6h-17.6a1.6 1.6 0 0 1 -1.6 -1.6v-13.6a1.6 1.6 0 0 1 1.6 -1.6z",
"fill": "#3b4256"
},
{
"d": "M3.4 4.6h17.2a0.8 0.8 0 0 1 0.8 0.8v13.2a0.8 0.8 0 0 1 -0.8 0.8h-17.2a0.8 0.8 0 0 1 -0.8 -0.8v-13.2a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": {
"from": "#b8e0ff",
"to": "#5aa8f0"
}
},
{
"d": "M2.6 19.4V15l5.6-5 5.2 4.4 3-2.4 4.8 4.4v3z",
"fill": "#2f8a2a"
},
{
"d": "M14.6 8.6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z",
"fill": "#ffd84a"
},
{
"d": "M3.8 5.2h16.4a0.6 0.6 0 0 1 0.6 0.6v2.8a0.6 0.6 0 0 1 -0.6 0.6h-16.4a0.6 0.6 0 0 1 -0.6 -0.6v-2.8a0.6 0.6 0 0 1 0.6 -0.6z",
"fill": {
"from": "#ffffff",
"to": "#ffffff"
},
"opacity": 0.3
}
]
},
"articles": {
"layers": [
{
"d": "M5.6 1.8h12.8a1.4 1.4 0 0 1 1.4 1.4v17.6a1.4 1.4 0 0 1 -1.4 1.4h-12.8a1.4 1.4 0 0 1 -1.4 -1.4v-17.6a1.4 1.4 0 0 1 1.4 -1.4z",
"fill": "#3b4256"
},
{
"d": "M5.9 2.8h12.2a0.7 0.7 0 0 1 0.7 0.7v17a0.7 0.7 0 0 1 -0.7 0.7h-12.2a0.7 0.7 0 0 1 -0.7 -0.7v-17a0.7 0.7 0 0 1 0.7 -0.7z",
"fill": {
"from": "#ffffff",
"to": "#dfe8f6"
}
},
{
"d": "M8.2 6.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.2 10.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.2 14.2h7.6a0.8 0.8 0 0 1 0.8 0.8v0a0.8 0.8 0 0 1 -0.8 0.8h-7.6a0.8 0.8 0 0 1 -0.8 -0.8v0a0.8 0.8 0 0 1 0.8 -0.8z",
"fill": "#2a62d4"
},
{
"d": "M8.1 17.8h4a0.7 0.7 0 0 1 0.7 0.7v0a0.7 0.7 0 0 1 -0.7 0.7h-4a0.7 0.7 0 0 1 -0.7 -0.7v0a0.7 0.7 0 0 1 0.7 -0.7z",
"fill": "#2a62d4"
}
]
} }
} }
} }

@ -1 +1 @@
Subproject commit 8dfaa9c66d3e4b7f122ba231dfb379d9e7ebd27e Subproject commit 9b42e84cdd71b8ce9378916f09df41a438aae4c5