import * as LucideIcons from 'lucide-react';
import {
Bike,
Check,
Clock,
Coffee,
Footprints,
Globe,
Image as ImageIcon,
Landmark,
MapPin,
Phone,
Plane,
Sailboat,
Search,
Snowflake,
Sparkles,
Star,
TrendingUp,
Zap,
} from 'lucide-react';
import React from 'react';
import './releaseNoticeVisuals.css';
/*
* The small pictures on the release cards: pieces of TREK itself, drawn at card
* size rather than screenshotted, because a screenshot this small is a blur. They
* carry no words, only place names, greetings and figures that read the same in
* every language, so nothing here needs translating. Every colour lives in
* releaseNoticeVisuals.css, and every motion stops under reduced motion.
*/
// ── Tours: a trail climbing to the summit at dusk, and the kinds of tour under it ──
const FAR_RIDGE = 'M0 66 L20 50 L38 60 L60 38 L84 56 L104 44 L128 58 L152 40 L176 54 L200 46 V112 H0 Z';
const MOUNTAIN = 'M0 112 V86 L44 62 L84 28 L98 38 L112 32 L152 68 L200 80 V112 Z';
const SNOW = 'M84 28 L73 38 L79 37 L84 42 L89 37.5 L95 37 Z';
const MEADOW = 'M0 112 V96 C 30 88, 60 90, 92 94 S 160 82, 200 90 V112 Z';
// From the valley up the mountain's flank to the summit, in switchbacks.
const TRAIL = 'M24 100 C 40 96, 50 90, 54 84 S 66 78, 70 72 S 64 62, 72 56 S 82 48, 78 42 S 82 34, 84 29';
const KINDS = [Footprints, Bike, Sailboat, Snowflake, Landmark];
function ToursVisual() {
return (
860 m
{KINDS.map((Kind, i) => (
))}
);
}
// ── TREK Studio: an open photo book with a polaroid, a stamp and a sticker ──
function StudioVisual() {
return (
Dolomiti
);
}
// ── The assistant: a day in Porto proposed stop by stop, ready to apply ──
const PORTO: Array<{ time: string; name: string; tone: string }> = [
{ time: '09:30', name: 'Ribeira', tone: 'sight' },
{ time: '12:30', name: 'Livraria Lello', tone: 'culture' },
{ time: '16:00', name: 'Torre dos Clérigos', tone: 'view' },
];
function AssistantVisual() {
return (
{PORTO.map((stop, i) => (
{stop.time}{stop.name}
))}
);
}
// ── Help on every screen, in 27 languages: hello in each of them, drifting by ──
const HELLO_A = [
'Hallo',
'Bonjour',
'Hola',
'Ciao',
'Olá',
'Hej',
'Ahoj',
'Cześć',
'Szia',
'Tere',
'Salam',
'Bon dia',
'Halo',
];
const HELLO_B = [
'Привіт',
'Привет',
'Γεια σου',
'مرحبا',
'こんにちは',
'안녕하세요',
'你好',
'哈囉',
'สวัสดี',
'Xin chào',
'Merhaba',
'Dobrý deň',
];
function HelloRow({ words, reverse }: { words: string[]; reverse?: boolean }) {
// Written twice, so the row can slide by half its width and start over without a seam.
return (
);
}
// ── Place search: a query typed into the search field, the right place on top ──
const RESULTS: Array<{ name: string; Kind: React.ElementType; tone: string }> = [
{ name: 'Kölner Dom', Kind: Landmark, tone: 'sight' },
{ name: 'CGN', Kind: Plane, tone: 'air' },
{ name: 'Café Reichard', Kind: Coffee, tone: 'food' },
];
function SearchVisual() {
return (
Kölner Dom
{RESULTS.map(({ name, Kind, tone }, i) => (
{name}
))}
);
}
// ── Place details, shared: one place's details travelling out to other TREKs ──
const DETAILS = [Globe, Clock, Phone, ImageIcon];
function ShareVisual() {
return (
{DETAILS.map((Detail, i) => (
))}
{['top', 'mid', 'bottom'].map((at, i) => (
))}
);
}
// ── Routing: a day's stops joined in one go ──
const DAY_ROUTE = 'M16 92 C 34 78, 42 84, 56 70 S 76 40, 96 48 S 120 78, 138 62 S 160 26, 184 22';
const DAY_STOPS: Array<[number, number]> = [
[16, 92],
[56, 70],
[96, 48],
[138, 62],
[184, 22],
];
function RoutingVisual() {
return (
20
);
}
const VISUALS: Record React.ReactElement> = {
tours: ToursVisual,
studio: StudioVisual,
assistant: AssistantVisual,
help: HelpVisual,
search: SearchVisual,
share: ShareVisual,
routing: RoutingVisual,
};
/** The card's picture, or its icon when the release names no drawing this client knows. */
export function ReleaseFeatureVisual({ visual, iconName }: { visual?: string; iconName: string }) {
const Drawing = visual ? VISUALS[visual] : undefined;
if (Drawing) return ;
const Icon: React.ElementType = ((LucideIcons as Record)[iconName] as React.ElementType) ?? Sparkles;
return (