No hand-written SVG: visx charts, lucide icons, Mermaid journey diagram
- desktop: Growth chart, Health and portfolio sparklines and the rollout bar drawn with visx (responsive width, crosshair tooltip with real values, arrow keys, theme tokens, no animation); icons from lucide-react behind the existing Icon names; empty states are lucide icons on token tiles; store marks are generic lucide icons; stars are lucide; the brand mark moves to ui/brand.tsx as the one allowed inline SVG - fixtures: app icons and store art stand-ins are PNGs rendered by tools/fixture-art.ts (lucide on gradients) - site: icons are lucide's own files in site/img/icons (tools/site-icons.ts, with the ISC licence) shown as CSS masks; the journey diagram is rendered from docs/diagrams/journey.mmd by tools/diagrams.ts (Mermaid CLI), with a tall variant for phones - tests/no-handmade-svg.test.ts fails on new inline SVG drawing in apps/desktop/src and site/*.html - desktop bundle: 598.7 -> 695.5 kB minified, 174.6 -> 206.0 kB gzip
BIN
apps/desktop/src/dev/art/icon-block.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
apps/desktop/src/dev/art/icon-focus.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
apps/desktop/src/dev/art/icon-habit.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
apps/desktop/src/dev/art/icon-lantern.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
apps/desktop/src/dev/art/icon-mood.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
apps/desktop/src/dev/art/icon-night.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
apps/desktop/src/dev/art/icon-orbit.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
apps/desktop/src/dev/art/icon-prism.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
apps/desktop/src/dev/art/icon-racer.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
apps/desktop/src/dev/art/icon-sketch.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
apps/desktop/src/dev/art/icon-tidy.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
apps/desktop/src/dev/art/icon-tycoon.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
apps/desktop/src/dev/art/scene1-feature.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
apps/desktop/src/dev/art/scene1-ipad.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/desktop/src/dev/art/scene1-phone.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
apps/desktop/src/dev/art/scene1-play.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
apps/desktop/src/dev/art/scene2-feature.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
apps/desktop/src/dev/art/scene2-ipad.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
apps/desktop/src/dev/art/scene2-phone.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
apps/desktop/src/dev/art/scene2-play.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
apps/desktop/src/dev/art/scene3-feature.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
apps/desktop/src/dev/art/scene3-ipad.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/desktop/src/dev/art/scene3-phone.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/desktop/src/dev/art/scene3-play.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
apps/desktop/src/dev/art/scene4-feature.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
apps/desktop/src/dev/art/scene4-ipad.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/desktop/src/dev/art/scene4-phone.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
apps/desktop/src/dev/art/scene4-play.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -116,26 +116,11 @@ export const LISTING_TEXT: Record<string, ListingText> = {
|
|||
'p-tidy': { play: { path: `${HOME}/apps/tidy-lists/store/listing.md`, text: '## en-US\n' }, apple: { path: `${HOME}/apps/tidy-lists/store/appstore.md`, text: '## en-US\n' } },
|
||||
};
|
||||
|
||||
// ---- store art: drawn stand-ins for the renders ----
|
||||
const COPY: Record<string, string[][]> = {
|
||||
en: [['Catch every', 'color drop!'], ['Chain splashes,', 'stack combos'], ['A new challenge', 'every day'], ['Clear levels,', 'earn 3 stars']],
|
||||
tr: [['Renkli damlaları', 'yakala!'], ['Sıçrat, eşleştir,', 'komboyu büyüt'], ['Her gün', 'yeni bir görev'], ['Bölümleri geç,', '3 yıldız topla']],
|
||||
ja: [['カラフルなしずくを', 'キャッチ!'], ['しずくをそろえて', 'コンボをつなげ'], ['毎日あたらしい', 'チャレンジ'], ['ステージクリアで', '星を3つゲット']],
|
||||
ar: [['التقط كل', 'قطرة ملوّنة!'], ['طابق القطرات', 'وضاعف الكومبو'], ['تحدٍّ جديد', 'كل يوم'], ['أنهِ المراحل', 'واجمع 3 نجوم']],
|
||||
};
|
||||
const PAL = [['#7c5cff', '#ff5fa2', '#ffd36e'], ['#ff7a59', '#ff3d7f', '#ffe08a'], ['#2fb5ff', '#5b6cff', '#b8f3ff'], ['#ffb03b', '#ff7a1a', '#fff1b8']];
|
||||
const esc = (s: string) => s.replace(/&/g, '&').replace(/</g, '<');
|
||||
function shot(scene: number, lang: string, w: number, h: number, variant: string): string {
|
||||
// ---- store art: stand-ins for the renders, PNGs from tools/fixture-art.ts (four scenes in four shapes) ----
|
||||
const SHAPE: Record<string, string> = { ios69: 'phone', ios65: 'phone', ipad13: 'ipad', play: 'play', feature: 'feature', poster: 'phone' };
|
||||
function shot(scene: number, size: string, variant: string): string {
|
||||
const order = variant === 'b' ? [1, 0, 3, 2] : [0, 1, 2, 3];
|
||||
const sc = order[scene % 4]!;
|
||||
const [a, b, c] = PAL[variant === 'b' && sc === 1 ? 2 : sc]!;
|
||||
const t = COPY[lang]?.[sc] ?? COPY.en![sc]!;
|
||||
const land = w > h;
|
||||
const fs = Math.round((land ? h : w) * 0.085);
|
||||
const pw = land ? h * 0.42 : w * 0.62, ph = pw * 2.05, px = land ? w * 0.62 : (w - pw) / 2, py = land ? h * 0.18 : h * 0.3;
|
||||
const drops = Array.from({ length: 7 }, (_, i) => `<circle cx="${px + pw * (0.2 + (i % 3) * 0.3)}" cy="${py + ph * (0.25 + Math.floor(i / 3) * 0.2)}" r="${pw * 0.09}" fill="${[a, b, c][i % 3]}" opacity=".9"/>`).join('');
|
||||
const tx = land ? w * 0.08 : w / 2, anchor = land ? 'start' : 'middle';
|
||||
return `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${w} ${h}"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="${a}"/><stop offset="1" stop-color="${b}"/></linearGradient><radialGradient id="r" cx=".5" cy=".3" r=".7"><stop offset="0" stop-color="#fff" stop-opacity=".35"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient></defs><rect width="${w}" height="${h}" fill="url(#g)"/><rect width="${w}" height="${h}" fill="url(#r)"/><text x="${tx}" y="${land ? h * 0.42 : h * 0.12}" font-family="Arial Rounded MT Bold, Arial, sans-serif" font-weight="800" font-size="${fs}" fill="#fff" text-anchor="${anchor}">${esc(t[0]!)}</text><text x="${tx}" y="${(land ? h * 0.42 : h * 0.12) + fs * 1.15}" font-family="Arial Rounded MT Bold, Arial, sans-serif" font-weight="800" font-size="${fs}" fill="${c}" text-anchor="${anchor}">${esc(t[1]!)}</text><rect x="${px}" y="${py}" width="${pw}" height="${ph}" rx="${pw * 0.12}" fill="#10142a" stroke="#fff" stroke-opacity=".85" stroke-width="${pw * 0.03}"/><rect x="${px + pw * 0.06}" y="${py + pw * 0.08}" width="${pw * 0.88}" height="${ph - pw * 0.16}" rx="${pw * 0.08}" fill="#1d2350"/>${drops}</svg>`)))}`;
|
||||
return new URL(`./art/scene${order[scene % 4]! + 1}-${SHAPE[size] ?? 'phone'}.png`, import.meta.url).href;
|
||||
}
|
||||
const SIZES: [string, string, 'apple' | 'play', number, number][] = [
|
||||
['ios69', 'App Store iPhone 6.9"', 'apple', 1320, 2868], ['ios65', 'App Store iPhone 6.5"', 'apple', 1284, 2778], ['ipad13', 'App Store iPad 13"', 'apple', 2064, 2752],
|
||||
|
|
@ -152,7 +137,7 @@ function renders(langs: string[], variants: string[]): RendersResult {
|
|||
const n = size === 'feature' ? 1 : lang === 'ar' && size === 'ipad13' ? 0 : 4;
|
||||
const tiles: RenderTile[] = Array.from({ length: n }, (_, i) => {
|
||||
const src = `${v ? `${v}/` : ''}${lang}/${size}/${size === 'feature' ? '1024x500' : String(i + 1).padStart(2, '0')}.png`;
|
||||
ART[src] = shot(i, lang, w, h, v);
|
||||
ART[src] = shot(i, size, v);
|
||||
const issues = lang === 'ja' && size === 'play' && i === 1 ? [{ level: 'warn' as const, code: 'overflow', msg: 'title line 2 shrunk to 72 %: consider shorter words' }]
|
||||
: lang === 'tr' && size === 'feature' ? [{ level: 'warn' as const, code: 'bytes', msg: 'PNG is 1.4 MB: the JPEG copy uploads 4x faster (storebound shots jpeg)' }] : [];
|
||||
images++; warnings += issues.length;
|
||||
|
|
@ -163,7 +148,7 @@ function renders(langs: string[], variants: string[]): RendersResult {
|
|||
return { size, label, store, tiles, issues: rowIssues };
|
||||
}), ...(!v && lang !== 'ar' ? [{ size: 'preview/iphone', label: 'App preview iPhone', store: 'apple' as const, issues: [], tiles: [(() => {
|
||||
const src = `${lang}/preview/iphone/01.mp4`, poster = `${lang}/preview/iphone/01-poster.png`;
|
||||
ART[poster] = shot(1, lang, 886, 1920, '');
|
||||
ART[poster] = shot(1, 'poster', '');
|
||||
videos++;
|
||||
return { src, kind: 'video' as const, poster, name: '01.mp4', w: 886, h: 1920, bytes: 18_400_000, issues: [] };
|
||||
})()] }] : [])],
|
||||
|
|
|
|||
|
|
@ -28,12 +28,9 @@ export async function mockListen(event: string, cb: Cb): Promise<() => void> {
|
|||
const emit = (event: string, payload: unknown) => { for (const cb of listeners.get(event) ?? []) cb(payload); };
|
||||
const cancelled = new Set<string>();
|
||||
|
||||
// ---- icons (fixture art, drawn for the demo apps) ----
|
||||
const svg = (s: string) => `data:image/svg+xml;base64,${btoa(s)}`;
|
||||
const ICONS: Record<string, string> = {
|
||||
'p-prism': svg(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#7c5cff"/><stop offset="1" stop-color="#ff5fa2"/></linearGradient></defs><rect width="64" height="64" fill="url(#g)"/><path d="M32 12 50 44H14z" fill="#fff" fill-opacity=".92"/><path d="M32 12 41 44H32z" fill="#ffd36e"/><path d="M46 46c0 4-3 7-6 7s-6-3-6-7 6-10 6-10 6 6 6 10z" fill="#5ee0ff" stroke="#fff" stroke-width="2"/></svg>`),
|
||||
'p-tidy': svg(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#2fd18b"/><stop offset="1" stop-color="#0f9d74"/></linearGradient></defs><rect width="64" height="64" fill="url(#g)"/><rect x="14" y="13" width="36" height="40" rx="7" fill="#fff"/><path d="M20 25l3 3 6-6M20 37l3 3 6-6" stroke="#0f9d74" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M33 26h11M33 38h11" stroke="#b6e8d4" stroke-width="3" stroke-linecap="round"/></svg>`),
|
||||
};
|
||||
// ---- icons: PNGs rendered by tools/fixture-art.ts (lucide icons on gradients), served by Vite in dev ----
|
||||
const art = (name: string) => new URL(`./art/${name}.png`, import.meta.url).href;
|
||||
const ICONS: Record<string, string> = { 'p-prism': art('icon-prism'), 'p-tidy': art('icon-tidy') };
|
||||
|
||||
// ---- workspace: 3 studios, 2 Play service accounts + 3 App Store Connect teams, 2 app folders, store-only apps ----
|
||||
// Placeholder names only (example.com style): no real studio, person, team or id.
|
||||
|
|
@ -57,19 +54,10 @@ let accounts: Account[] = [
|
|||
];
|
||||
if (import.meta.env.VITE_FIXTURES === 'empty') { projects = []; accounts = []; studios = []; }
|
||||
|
||||
/** Small drawn icons for the store apps (fixture art). */
|
||||
const glyph = (a: string, b: string, inner: string) => `data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="${a}"/><stop offset="1" stop-color="${b}"/></linearGradient></defs><rect width="64" height="64" fill="url(#g)"/>${inner}</svg>`)}`;
|
||||
/** Store app icons (tools/fixture-art.ts). */
|
||||
const G = {
|
||||
orbit: glyph('#0ea5e9', '#6366f1', '<circle cx="32" cy="32" r="9" fill="#fff"/><ellipse cx="32" cy="32" rx="22" ry="9" fill="none" stroke="#fff" stroke-width="3" transform="rotate(-25 32 32)"/>'),
|
||||
block: glyph('#22c55e', '#15803d', '<rect x="14" y="30" width="16" height="16" rx="3" fill="#fff"/><rect x="34" y="30" width="16" height="16" rx="3" fill="#bbf7d0"/><rect x="24" y="12" width="16" height="16" rx="3" fill="#fff"/>'),
|
||||
lantern: glyph('#f59e0b', '#b45309', '<path d="M24 18h16l4 8v16l-4 6H24l-4-6V26z" fill="#fff"/><text x="32" y="41" font-family="Georgia" font-size="16" font-weight="700" text-anchor="middle" fill="#b45309">W</text>'),
|
||||
tycoon: glyph('#a855f7', '#6d28d9', '<circle cx="32" cy="32" r="16" fill="#fde68a"/><text x="32" y="39" font-family="Arial" font-size="18" font-weight="800" text-anchor="middle" fill="#92400e">$</text>'),
|
||||
racer: glyph('#ef4444', '#991b1b', '<path d="M14 38l6-12h24l6 12v6H14z" fill="#fff"/><circle cx="22" cy="44" r="4" fill="#111"/><circle cx="42" cy="44" r="4" fill="#111"/>'),
|
||||
habit: glyph('#14b8a6', '#0f766e', '<ellipse cx="32" cy="36" rx="13" ry="16" fill="#fff"/><path d="M24 34l5 5 11-11" stroke="#0f766e" stroke-width="4" fill="none" stroke-linecap="round"/>'),
|
||||
focus: glyph('#f43f5e', '#be123c', '<circle cx="32" cy="34" r="15" fill="#fff"/><path d="M32 34V24M32 34l7 4" stroke="#be123c" stroke-width="3.5" stroke-linecap="round"/>'),
|
||||
sketch: glyph('#fb923c', '#ea580c', '<path d="M32 13l5 11 12 1-9 8 3 12-11-7-11 7 3-12-9-8 12-1z" fill="#fff"/>'),
|
||||
night: glyph('#1e293b', '#4338ca', '<path d="M38 16a16 16 0 1 0 10 28 13 13 0 0 1-10-28z" fill="#fde68a"/><rect x="18" y="40" width="20" height="3" rx="1.5" fill="#c7d2fe"/>'),
|
||||
mood: glyph('#ec4899', '#8b5cf6', '<rect x="14" y="14" width="10" height="10" rx="3" fill="#fff"/><rect x="27" y="14" width="10" height="10" rx="3" fill="#fbcfe8"/><rect x="40" y="14" width="10" height="10" rx="3" fill="#fff"/><rect x="14" y="27" width="10" height="10" rx="3" fill="#ddd6fe"/><rect x="27" y="27" width="10" height="10" rx="3" fill="#fff"/><rect x="40" y="27" width="10" height="10" rx="3" fill="#fbcfe8"/><rect x="14" y="40" width="10" height="10" rx="3" fill="#fff"/><rect x="27" y="40" width="10" height="10" rx="3" fill="#ddd6fe"/><rect x="40" y="40" width="10" height="10" rx="3" fill="#fff"/>'),
|
||||
orbit: art('icon-orbit'), block: art('icon-block'), lantern: art('icon-lantern'), tycoon: art('icon-tycoon'), racer: art('icon-racer'),
|
||||
habit: art('icon-habit'), focus: art('icon-focus'), sketch: art('icon-sketch'), night: art('icon-night'), mood: art('icon-mood'),
|
||||
};
|
||||
const ios = (id: string, bundleId: string, name: string, icon: string | null, latest: [string, string] | null): StoreApp =>
|
||||
({ store: 'ios', id, bundleId, name, platforms: ['IOS'], sku: null, primaryLocale: 'en-US', latest: latest ? { version: latest[0], state: latest[1], platform: 'IOS' } : null, icon });
|
||||
|
|
|
|||