@spunto/brand-kit 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,174 @@
1
+ // What the Foyer screens show: the app's own words, colours and paintings, not invented ones.
2
+ //
3
+ // Drawn from coderhammer/foyer@aa0f3b1 — the Menus, Stock and Recettes pages (app/src/views/menus.jsx,
4
+ // stock.jsx, recettes.jsx, components/cuisine.jsx), captured on a household seeded like the landing's
5
+ // demo (« Chez Camille », four at the table, week of 16–22 November). The app speaks English and French
6
+ // (app/src/i18n/en.js, fr.js): its labels follow the page's language.
7
+ //
8
+ // The pictures are the app's own paintings (scripts/illustrations.mjs), loaded from where the app serves
9
+ // them — foyer.spunto.net/app/illustrations — never copied into the kit: a dish shows the painting the
10
+ // app would show for it (its recipe's from the Foyer cookbook, else its family's; a pantry item its
11
+ // produce's or its shelf's, app/src/lib/illustrations.js). When the app or its paintings change, this
12
+ // file is what to refresh.
13
+
14
+ import type { Words } from "../../../facts"
15
+
16
+ const w = (en: string, fr: string): Words => ({ en, fr })
17
+
18
+ /** Where the app serves its paintings. */
19
+ const ILLUS = "https://foyer.spunto.net/app/illustrations"
20
+ export const painting = (path: string) => `${ILLUS}/${path}.webp`
21
+
22
+ /** The app's surfaces: the Foyer paint's light tokens (paints.ts), the one paint of the family that tints them too. */
23
+ export const APP = {
24
+ bg: "#fff9f1",
25
+ card: "#fffdf9",
26
+ sidebar: "#fdf4e7",
27
+ muted: "#f7efe3",
28
+ border: "#e9ddd0",
29
+ accent: "#ffead3",
30
+ accentInk: "#70280a",
31
+ /** The cream the paintings are set on (--illus-bg). */
32
+ illus: "#f6ecdd",
33
+ green: "#3f9a4a",
34
+ amber: "#c77a12",
35
+ red: "#d13b3b",
36
+ }
37
+
38
+ /** The app's labels, in both languages (app/src/i18n). */
39
+ export const UI = {
40
+ nav: [w("Meal plan", "Menus"), w("Recipes", "Recettes"), w("Pantry", "Stock"), w("Lists", "Listes"), w("Assistant", "Assistant"), w("Household", "Foyer")],
41
+ household: "Chez Camille",
42
+ tonight: w("Tonight", "Ce soir"),
43
+ tonightDate: w("Friday 20 November", "vendredi 20 novembre"),
44
+ nothingTonight: w("Nothing planned tonight", "Rien de prévu ce soir"),
45
+ nothingTonightSub: w("The assistant can suggest a dish with what's left in the kitchen.", "L'assistant peut proposer un plat avec ce qu'il reste dans la cuisine."),
46
+ askIdea: w("An idea for tonight", "Une idée pour ce soir"),
47
+ fillWeek: w("Fill in the week", "Compléter la semaine"),
48
+ cook: w("Cooking mode", "Mode cuisine"),
49
+ seeRecipe: w("See the recipe", "Voir la recette"),
50
+ inSeason: w("In season", "De saison"),
51
+ atTable: w("4 at the table", "4 à table"),
52
+ serves: w("4 people", "4 personnes"),
53
+ week: w("Week of 16 – 22 November", "Semaine du 16 au 22 novembre"),
54
+ planned: (n: number) => w(`${n} meals planned · updated by Camille on 20/11/2026`, `${n} repas prévus · mis à jour par Camille le 20/11/2026`),
55
+ today: w("today", "aujourd'hui"),
56
+ lunch: w("Lunch", "Midi"),
57
+ dinner: w("Dinner", "Soir"),
58
+ recipe: w("Recipe", "Recette"),
59
+ nothingPlanned: w("Nothing planned", "Rien de prévu"),
60
+ assistant: w("Assistant", "Assistant"),
61
+ todayTab: w("Today", "Aujourd'hui"),
62
+ placeholder: w("Your question or request…", "Ta question ou ta demande…"),
63
+ // Stock
64
+ pantry: w("Pantry", "Stock"),
65
+ value: w("Pantry value", "Valeur du stock"),
66
+ items: (n: number) => w(`${n} items`, `${n} articles`),
67
+ rebuy: w("Running low", "À racheter"),
68
+ rebuyBadge: w("running low", "à racheter"),
69
+ in30: w("In, last 30 days", "Entrées sur 30 jours"),
70
+ in30Hint: w("groceries", "courses"),
71
+ out30: w("Used, last 30 days", "Consommé sur 30 jours"),
72
+ out30Hint: w("meals and waste", "repas et pertes"),
73
+ kitchen: w("In the kitchen", "Dans la cuisine"),
74
+ kitchenSub: w("For a stock check (by voice or photo), your groceries (snap the receipt) or a meal you've cooked, ask the assistant.", "Pour l'inventaire (à la voix ou en photo), les courses (photo du ticket) ou un repas cuisiné, demande à l'assistant."),
75
+ search: w("Find an item…", "Chercher un article…"),
76
+ filters: [w("All", "Tout"), w("Fridge", "Frigo"), w("Freezer", "Congélateur"), w("Cupboards", "Placards")],
77
+ fridge: w("Fridge", "Frigo"),
78
+ cupboards: w("Cupboards", "Placards"),
79
+ // Recettes
80
+ recipes: w("Recipes", "Recettes"),
81
+ ours: w("Our cookbook", "Notre carnet"),
82
+ ideas: w("Foyer ideas", "Idées Foyer"),
83
+ searchBook: w("Recipe, ingredient, tag…", "Recette, ingrédient, étiquette…"),
84
+ newRecipe: w("New recipe", "Nouvelle recette"),
85
+ all: (n: number) => w(`All · ${n}`, `Toutes · ${n}`),
86
+ official: w("Approved", "Officielle"),
87
+ toTry: w("To try", "À tester"),
88
+ neverUsed: w("Never on the meal plan", "Jamais au menu"),
89
+ seasonFilter: w("In season", "De saison"),
90
+ }
91
+
92
+ /** What the assistant's thread says — what someone at home asks, and what it answers. */
93
+ export const THREAD = {
94
+ ask: w("Plan the end of the week. Camille is vegetarian, and there are leeks left.", "Prépare la fin de semaine. Camille est végé, et il reste des poireaux."),
95
+ readStock: w("Reads the pantry", "Lit le stock"),
96
+ readBook: w("Reads the cookbook", "Lit le carnet"),
97
+ proposal: w("Here's the end of the week, from what's left:", "Voici la fin de semaine, avec ce qu'il reste :"),
98
+ confirm: w("Shall I put it on the meal plan?", "Je l'inscris au menu ?"),
99
+ yes: w("Yes!", "Oui !"),
100
+ saved: w("Meal plan updated", "Menu mis à jour"),
101
+ receipt: w("Here's the receipt from the shopping.", "Voilà le ticket des courses."),
102
+ readReceipt: w("Reads the receipt", "Lit le ticket"),
103
+ stocked: w("4 items added to the pantry", "4 articles rangés dans le stock"),
104
+ page: w("Add this recipe (photo)", "Ajoute cette recette (photo)"),
105
+ readPage: w("Reads the page", "Lit la page"),
106
+ added: w("“Sweet potato curry” added to the cookbook", "« Curry de patate douce » ajoutée au carnet"),
107
+ }
108
+
109
+ export type Meal = { title: Words; painting: string; slot?: "lunch" | "dinner"; side?: Words; time: string }
110
+
111
+ const quiche: Meal = { title: w("Leek and comté quiche", "Quiche poireaux comté"), painting: painting("recettes/quiche-poireaux-comte"), time: "50 min" }
112
+ const soupe: Meal = { title: w("French onion soup", "Soupe à l'oignon gratinée"), painting: painting("recettes/soupe-oignon-gratinee"), time: "1 h" }
113
+ const crepes: Meal = { title: w("Homemade crêpes", "Crêpes maison"), painting: painting("recettes/crepes-maison"), time: "30 min" }
114
+
115
+ /** The week, Monday first: the first four days are planned, the last three are what the assistant fills. */
116
+ export const WEEK: { day: Words; meals: Meal[] }[] = [
117
+ { day: w("Monday 16", "Lundi 16"), meals: [{ title: w("Pea and lemon risotto", "Risotto petits pois citron"), painting: painting("recettes/risotto-petits-pois-citron"), side: w("no parmesan for Jade", "sans parmesan pour Jade"), time: "40 min" }] },
118
+ { day: w("Tuesday 17", "Mardi 17"), meals: [{ title: w("Red lentil dahl", "Dahl de lentilles corail"), painting: painting("recettes/dahl-lentilles-corail-carottes"), time: "35 min" }] },
119
+ { day: w("Wednesday 18", "Mercredi 18"), meals: [{ title: w("Roast chicken, potatoes", "Poulet rôti, pommes de terre"), painting: painting("recettes/poulet-roti-pommes-de-terre"), side: w("chickpea patty for Camille", "galette de pois chiches pour Camille"), time: "1 h 15" }] },
120
+ { day: w("Thursday 19", "Jeudi 19"), meals: [{ title: w("Leftover dahl", "Restes du dahl"), painting: painting("recettes/dahl-lentilles-corail-carottes"), time: "35 min" }] },
121
+ { day: w("Friday 20", "Vendredi 20"), meals: [quiche] },
122
+ { day: w("Saturday 21", "Samedi 21"), meals: [soupe] },
123
+ { day: w("Sunday 22", "Dimanche 22"), meals: [crepes] },
124
+ ]
125
+ /** Today is Friday: the fifth day. */
126
+ export const TODAY = 4
127
+ export const TONIGHT = quiche
128
+
129
+ /** The proposal, as the assistant writes it: the three days it fills. */
130
+ export const PROPOSAL: { day: Words; meal: Meal; note: Words }[] = [
131
+ { day: w("Fri", "Ven"), meal: quiche, note: w("the leeks in the fridge", "les poireaux du frigo") },
132
+ { day: w("Sat", "Sam"), meal: soupe, note: w("onions and comté in stock", "oignons et comté en stock") },
133
+ { day: w("Sun", "Dim"), meal: crepes, note: w("eggs and milk in stock", "œufs et lait en stock") },
134
+ ]
135
+
136
+ /** The pantry, as the receipt finds it: `after` once the shopping is put away. */
137
+ export type StockRow = { name: Words; unit: Words; painting: string; qty: number; after: number; low?: boolean; out?: boolean; price: number }
138
+
139
+ export const FRIDGE: StockRow[] = [
140
+ { name: w("Butter", "Beurre doux"), unit: w("250 g block · €2.60", "plaquette 250 g · 2,60 €"), painting: painting("garde-manger/beurre"), qty: 0.6, after: 0.6, price: 2.6 },
141
+ { name: w("Semi-skimmed milk", "Lait demi-écrémé"), unit: w("1 L bottle · €1.05", "bouteille 1 L · 1,05 €"), painting: painting("garde-manger/lait"), qty: 1, after: 3, low: true, price: 1.05 },
142
+ { name: w("Eggs", "Œufs"), unit: w("each · €0.35", "pièce · 0,35 €"), painting: painting("garde-manger/oeufs"), qty: 2, after: 14, low: true, price: 0.35 },
143
+ { name: w("Leeks", "Poireaux"), unit: w("each · €0.80", "pièce · 0,80 €"), painting: painting("saisons/poireau"), qty: 3, after: 3, price: 0.8 },
144
+ ]
145
+ export const CUPBOARDS: StockRow[] = [
146
+ { name: w("Red lentils", "Lentilles corail"), unit: w("500 g pack · €2.40", "paquet 500 g · 2,40 €"), painting: painting("garde-manger/riz"), qty: 0.5, after: 2.5, low: true, price: 2.4 },
147
+ { name: w("Penne", "Pâtes penne"), unit: w("500 g pack · €1.20", "paquet 500 g · 1,20 €"), painting: painting("garde-manger/pates"), qty: 0, after: 2, out: true, price: 1.2 },
148
+ ]
149
+
150
+ /** The receipt: what it lists is what `after` adds. Its shop is no real one. */
151
+ export const RECEIPT = {
152
+ shop: "ÉPICERIE DU COIN",
153
+ lines: [
154
+ ["Lait ½ écrémé ×2", "2,10"],
155
+ ["Œufs plein air ×12", "4,20"],
156
+ ["Lentilles corail ×2", "4,80"],
157
+ ["Penne ×2", "2,40"],
158
+ ] as [string, string][],
159
+ total: "13,50",
160
+ }
161
+
162
+ export type BookCard = { title: Words; painting: string; cat: Words; time: string; badge: "official" | "toTry"; season?: boolean; menu?: Words }
163
+
164
+ export const BOOK: BookCard[] = [
165
+ { title: w("Shepherd's pie", "Hachis parmentier"), painting: painting("recettes/hachis-parmentier"), cat: w("Main", "Plat"), time: "1 h", badge: "official", season: true, menu: w("On the meal plan once", "Au menu 1 fois") },
166
+ { title: w("Red lentil dahl", "Dahl de lentilles corail"), painting: painting("recettes/dahl-lentilles-corail-carottes"), cat: w("Main", "Plat"), time: "35 min", badge: "official", season: true, menu: w("On the meal plan 2 times", "Au menu 2 fois") },
167
+ { title: w("Homemade crêpes", "Crêpes maison"), painting: painting("recettes/crepes-maison"), cat: w("Dessert", "Dessert"), time: "30 min", badge: "official", menu: w("On the meal plan once", "Au menu 1 fois") },
168
+ { title: w("Roast chicken, potatoes", "Poulet rôti, pommes de terre"), painting: painting("recettes/poulet-roti-pommes-de-terre"), cat: w("Main", "Plat"), time: "1 h 15", badge: "official", menu: w("On the meal plan once", "Au menu 1 fois") },
169
+ { title: w("Pea and lemon risotto", "Risotto petits pois citron"), painting: painting("recettes/risotto-petits-pois-citron"), cat: w("Main", "Plat"), time: "40 min", badge: "official", menu: w("On the meal plan once", "Au menu 1 fois") },
170
+ { title: w("Leek and comté quiche", "Quiche poireaux comté"), painting: painting("recettes/quiche-poireaux-comte"), cat: w("Main", "Plat"), time: "50 min", badge: "toTry", season: true, menu: w("On the meal plan once", "Au menu 1 fois") },
171
+ ]
172
+
173
+ /** The recipe the photo brings: written by the assistant, so painted as its family (a curry), « to try ». */
174
+ export const FROM_PHOTO: BookCard = { title: w("Sweet potato curry", "Curry de patate douce"), painting: painting("familles/curry"), cat: w("Main", "Plat"), time: "35 min", badge: "toTry", season: true }
@@ -0,0 +1,204 @@
1
+ "use client"
2
+
3
+ import { FONT } from "../../../theme"
4
+ import { AppWindow, Float, INK, MUTED, Stage, u, useStage, type StageColors } from "../stage"
5
+ import { AppShell, Btn, Bubble, Chip, Faces, Glyph, Painting, Pill, ROOM, t, Thread, WIN, type Lang } from "./parts"
6
+ import { APP, PROPOSAL, THREAD, TODAY, TONIGHT, UI, WEEK, painting, type Meal } from "./sample"
7
+
8
+ /* The Menus page: the end of the week is empty, and so is tonight. Someone at home asks the assistant; it reads the
9
+ pantry and the cookbook, proposes three dinners, asks before writing — and once told yes, the days fill one by
10
+ one with their paintings, and « Ce soir » becomes tonight's dish.
11
+
12
+ Drawn from app/src/views/menus.jsx (Tonight, the day cards, MealLine of components/cuisine.jsx) and the panel the
13
+ « Assistant » button opens (components/panel.jsx): the assistant proposes, then writes when told to. */
14
+
15
+ const H = 640
16
+ const STILL = 8
17
+ /* 0 rest · 1 the question · 2 it reads · 3 its proposal · 4 « oui » · 5–7 Fri, Sat, Sun fill · 8 saved · 9 the panel closes · 10 rest */
18
+ const LENGTHS = [1300, 1500, 1300, 2600, 900, 550, 550, 650, 3200, 500, 900] as const
19
+
20
+ const GAP = 8
21
+ const COL = (ROOM - GAP * 3) / 4
22
+ const ROW = 134
23
+ const GRID_TOP = 204
24
+
25
+ export function WeekScreen({ lang, colors, night, label }: { lang: Lang; colors: StageColors; night: boolean; label: string }) {
26
+ const { ref, step } = useStage(LENGTHS, STILL)
27
+ // How many of the last three days are written: none until the « oui », then one a step.
28
+ const written = step >= 5 && step <= 10 ? Math.min(3, step - 4) : 0
29
+ const planned = (i: number) => i < TODAY || i - TODAY < written
30
+ const tonight = planned(TODAY)
31
+
32
+ return (
33
+ <Stage stageRef={ref} colors={colors} night={night} height={H} label={label}>
34
+ <AppWindow {...WIN} h={H} address="foyer.spunto.net/app/#/menus">
35
+ <AppShell lang={lang} colors={colors} active={0} title={t(UI.nav[0], lang)}>
36
+ <Tonight lang={lang} tone={colors.tone} meal={tonight ? TONIGHT : null} />
37
+
38
+ <div style={{ position: "absolute", top: u(160), left: u(4), right: 0, display: "flex", alignItems: "flex-end" }}>
39
+ <div>
40
+ <div style={{ fontFamily: FONT.display, fontSize: u(14) }}>{t(UI.week, lang)}</div>
41
+ <div style={{ marginTop: u(3), fontSize: u(8.8), color: MUTED }}>{t(UI.planned(4 + written), lang)}</div>
42
+ </div>
43
+ <span style={{ marginLeft: "auto" }}>
44
+ <Faces size={17} />
45
+ </span>
46
+ </div>
47
+
48
+ {WEEK.map((d, i) => (
49
+ <DayCard key={i} lang={lang} tone={colors.tone} x={(i % 4) * (COL + GAP)} y={GRID_TOP + Math.floor(i / 4) * (ROW + GAP)} day={t(d.day, lang)} meals={d.meals} planned={planned(i)} today={i === TODAY} past={i < TODAY} />
50
+ ))}
51
+ </AppShell>
52
+ </AppWindow>
53
+
54
+ <Float x={708} y={250} w={204} depth={120} show={step >= 1 && step <= 8}>
55
+ <Thread lang={lang} colors={colors}>
56
+ <Bubble from="you" tone={colors.tone}>
57
+ {t(THREAD.ask, lang)}
58
+ </Bubble>
59
+ <div style={{ display: step >= 2 ? "flex" : "none", flexWrap: "wrap", gap: u(4) }}>
60
+ <Chip icon="fridge" done={step >= 3}>
61
+ {t(THREAD.readStock, lang)}
62
+ </Chip>
63
+ <Chip icon="book" done={step >= 3}>
64
+ {t(THREAD.readBook, lang)}
65
+ </Chip>
66
+ </div>
67
+ <Bubble from="agent" tone={colors.tone} show={step >= 3}>
68
+ {t(THREAD.proposal, lang)}
69
+ <div style={{ display: "flex", flexDirection: "column", gap: u(5), margin: `${u(6)} 0` }}>
70
+ {PROPOSAL.map((p, i) => (
71
+ <div key={i} style={{ display: "flex", alignItems: "center", gap: u(6) }}>
72
+ <Painting src={p.meal.painting} w={26} h={26} radius={6} />
73
+ <span style={{ minWidth: 0 }}>
74
+ <span style={{ display: "block", fontWeight: 600, fontSize: u(9.4) }}>
75
+ {t(p.day, lang)} · {t(p.meal.title, lang)}
76
+ </span>
77
+ <span style={{ display: "block", fontSize: u(8.2), color: MUTED }}>{t(p.note, lang)}</span>
78
+ </span>
79
+ </div>
80
+ ))}
81
+ </div>
82
+ {t(THREAD.confirm, lang)}
83
+ </Bubble>
84
+ <Bubble from="you" tone={colors.tone} show={step >= 4}>
85
+ {t(THREAD.yes, lang)}
86
+ </Bubble>
87
+ <div style={{ display: step >= 8 ? "flex" : "none", justifyContent: "center" }}>
88
+ <Pill kind="done" size={8.8}>
89
+ {t(THREAD.saved, lang)}
90
+ </Pill>
91
+ </div>
92
+ </Thread>
93
+ </Float>
94
+ </Stage>
95
+ )
96
+ }
97
+
98
+ /** « Ce soir »: tonight's dish in large, its painting beside it — or, when nothing is planned, the cloche and an invitation. */
99
+ function Tonight({ lang, tone, meal }: { lang: Lang; tone: string; meal: Meal | null }) {
100
+ const card = { position: "absolute" as const, top: 0, left: 0, width: u(ROOM), height: u(146), borderRadius: u(12), overflow: "hidden", display: "flex" }
101
+ if (!meal)
102
+ return (
103
+ <div style={{ ...card, background: APP.illus, boxShadow: `0 0 0 1px ${APP.border}` }}>
104
+ <div style={{ flex: 1, padding: `${u(22)} ${u(22)}` }}>
105
+ <div style={{ fontSize: u(8.4), fontWeight: 600, letterSpacing: "0.14em", textTransform: "uppercase", color: tone }}>{t(UI.tonight, lang)}</div>
106
+ <div style={{ marginTop: u(5), fontFamily: FONT.display, fontSize: u(19) }}>{t(UI.nothingTonight, lang)}</div>
107
+ <div style={{ marginTop: u(5), maxWidth: u(300), fontSize: u(9.4), color: MUTED }}>{t(UI.nothingTonightSub, lang)}</div>
108
+ <div style={{ display: "flex", gap: u(6), marginTop: u(12) }}>
109
+ <Btn icon="sparkles" tone={tone} size={9}>
110
+ {t(UI.fillWeek, lang)}
111
+ </Btn>
112
+ <Btn icon="sparkles" tone={tone} size={9} outline>
113
+ {t(UI.askIdea, lang)}
114
+ </Btn>
115
+ </div>
116
+ </div>
117
+ <Painting src={painting("scenes/cloche")} w={260} h="100%" radius={0} />
118
+ </div>
119
+ )
120
+ return (
121
+ <div style={{ ...card, background: APP.card, boxShadow: `0 0 0 1px ${APP.border}` }}>
122
+ <div style={{ flex: 1, padding: `${u(20)} ${u(22)}` }}>
123
+ <div style={{ fontSize: u(8.4), fontWeight: 600, letterSpacing: "0.14em", textTransform: "uppercase", color: tone }}>
124
+ {t(UI.tonight, lang)} · {t(UI.tonightDate, lang)}
125
+ </div>
126
+ <div style={{ marginTop: u(5), fontFamily: FONT.display, fontSize: u(21), lineHeight: 1.1 }}>{t(meal.title, lang)}</div>
127
+ <div style={{ display: "flex", alignItems: "center", gap: u(6), marginTop: u(7), fontSize: u(8.8), color: MUTED }}>
128
+ <Pill kind="season">{t(UI.inSeason, lang)}</Pill>
129
+ {meal.time} · {t(UI.serves, lang)}
130
+ </div>
131
+ <div style={{ display: "flex", alignItems: "center", gap: u(6), marginTop: u(6), fontSize: u(8.8), color: MUTED }}>
132
+ {t(UI.atTable, lang)} <Faces size={13} />
133
+ </div>
134
+ <div style={{ display: "flex", gap: u(6), marginTop: u(10) }}>
135
+ <Btn icon="chef" tone={tone} size={9}>
136
+ {t(UI.cook, lang)}
137
+ </Btn>
138
+ <Btn icon="book" tone={tone} size={9} outline>
139
+ {t(UI.seeRecipe, lang)}
140
+ </Btn>
141
+ </div>
142
+ </div>
143
+ <Painting src={meal.painting} w={300} h="100%" radius={0} />
144
+ </div>
145
+ )
146
+ }
147
+
148
+ /** A day of the week: its name, a faint lunch line, and dinner — a meal with its painting, or a dashed « Rien de prévu ». The
149
+ meal is always drawn, so that it can rise in when it is written. */
150
+ function DayCard({ lang, tone, x, y, day, meals, planned, today, past }: { lang: Lang; tone: string; x: number; y: number; day: string; meals: Meal[]; planned: boolean; today: boolean; past: boolean }) {
151
+ const swap = "opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25)"
152
+ return (
153
+ <div
154
+ style={{
155
+ position: "absolute",
156
+ left: u(x),
157
+ top: u(y),
158
+ width: u(COL),
159
+ height: u(ROW),
160
+ padding: u(8),
161
+ borderRadius: u(10),
162
+ background: APP.card,
163
+ boxShadow: today ? `0 0 0 ${u(1.5)} ${tone}` : `0 0 0 1px ${APP.border}`,
164
+ opacity: past ? 0.72 : 1,
165
+ display: "flex",
166
+ flexDirection: "column",
167
+ }}
168
+ >
169
+ <div style={{ display: "flex", alignItems: "center", gap: u(5), fontFamily: FONT.display, fontSize: u(10.4), color: today ? tone : INK }}>
170
+ {day}
171
+ {today && <Pill kind="today" size={7.4}>{t(UI.today, lang)}</Pill>}
172
+ <Glyph id="people" size={9} color={MUTED} style={{ marginLeft: "auto" }} />
173
+ </div>
174
+ <div style={{ display: "flex", alignItems: "center", gap: u(4), marginTop: u(6), fontSize: u(8), color: MUTED, opacity: 0.7 }}>
175
+ <Glyph id="sun" size={8} color={MUTED} />
176
+ {t(UI.lunch, lang)}
177
+ </div>
178
+ <div style={{ display: "flex", alignItems: "center", gap: u(4), marginTop: u(4), fontSize: u(8), fontWeight: 550, letterSpacing: "0.04em", textTransform: "uppercase", color: MUTED }}>
179
+ <Glyph id="moon" size={8} color={MUTED} />
180
+ {t(UI.dinner, lang)}
181
+ </div>
182
+ <div style={{ position: "relative", flex: 1, marginTop: u(6) }}>
183
+ <div style={{ position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", gap: u(4), border: `1px dashed ${APP.border}`, borderRadius: u(9), fontSize: u(8.6), color: MUTED, opacity: planned ? 0 : 1, transition: "opacity 0.3s ease" }}>
184
+ <Glyph id="plus" size={9} color={MUTED} />
185
+ {t(UI.nothingPlanned, lang)}
186
+ </div>
187
+ {meals.map((m, i) => (
188
+ <div key={i} style={{ position: "relative", display: "flex", gap: u(7), opacity: planned ? 1 : 0, transform: planned ? "none" : `translateY(${u(8)}) scale(0.94)`, transition: swap }}>
189
+ <Painting src={m.painting} w={40} h={40} radius={8} />
190
+ <div style={{ minWidth: 0, display: "flex", flexDirection: "column", gap: u(2) }}>
191
+ <span style={{ fontSize: u(9.6), lineHeight: 1.25, fontWeight: 500 }}>{t(m.title, lang)}</span>
192
+ {m.side && <span style={{ fontSize: u(7.8), color: MUTED, lineHeight: 1.25 }}>{t(m.side, lang)}</span>}
193
+ <span style={{ display: "flex", alignItems: "center", gap: u(3), fontSize: u(7.8), color: tone }}>
194
+ <Glyph id="book" size={8} color={tone} />
195
+ {t(UI.recipe, lang)}
196
+ <span style={{ color: MUTED }}>{m.time}</span>
197
+ </span>
198
+ </div>
199
+ </div>
200
+ ))}
201
+ </div>
202
+ </div>
203
+ )
204
+ }
@@ -114,22 +114,24 @@ export function useStage(lengths: readonly number[], still: number) {
114
114
 
115
115
  const vars = (v: Record<string, string | number>) => v as CSSProperties
116
116
 
117
- export function Stage({ stageRef, colors, night, height, label, children }: { stageRef: RefObject<HTMLDivElement | null>; colors: StageColors; night: boolean; height: number; label: string; children: ReactNode }) {
117
+ /** `board`: the drawing's width in design pixels — 920 for an app's window, narrower for a phone (a hero's column).
118
+ `bare`: no panel around it, only the glow — a device that stands on the page by itself. */
119
+ export function Stage({ stageRef, colors, night, height, label, board = BOARD, bare, children }: { stageRef: RefObject<HTMLDivElement | null>; colors: StageColors; night: boolean; height: number; label: string; board?: number; bare?: boolean; children: ReactNode }) {
118
120
  // On paper the screen sits in a panel of the product's field; on a field-coloured band, in a lighter pane of it.
119
- const panel = night ? hexAlpha("#ffffff", 0.07) : colors.field
121
+ const panel = bare ? "transparent" : night ? hexAlpha("#ffffff", 0.07) : colors.field
120
122
  return (
121
123
  <div ref={stageRef} data-showcase-stage role="img" aria-label={label} style={{ position: "relative", containerType: "inline-size", ...vars({ "--p": 0.5 }) }}>
122
124
  <div
123
125
  aria-hidden
124
126
  style={{
125
127
  // Never taller than most of the screen it is read on: the board then sits centred in a wider panel.
126
- ...vars({ "--u": `clamp(${MIN_U}px, calc(100cqi / ${BOARD}), calc(84vh / ${height}))` }),
128
+ ...vars({ "--u": `clamp(${MIN_U}px, calc(100cqi / ${board}), calc(84vh / ${height}))` }),
127
129
  position: "relative",
128
130
  height: u(height),
129
131
  overflow: "hidden",
130
132
  borderRadius: 8,
131
133
  background: panel,
132
- border: night ? "1px solid rgba(255,255,255,0.12)" : "none",
134
+ border: night && !bare ? "1px solid rgba(255,255,255,0.12)" : "none",
133
135
  color: INK,
134
136
  fontFamily: FONT.sans,
135
137
  fontSize: u(12),
@@ -143,7 +145,9 @@ export function Stage({ stageRef, colors, night, height, label, children }: { st
143
145
  style={{
144
146
  position: "absolute",
145
147
  inset: "-20%",
146
- background: `radial-gradient(42% 46% at 78% 22%, ${hexAlpha(colors.signal, night ? 0.2 : 0.34)}, transparent 70%), radial-gradient(40% 50% at 12% 92%, ${hexAlpha(colors.signal, night ? 0.1 : 0.16)}, transparent 70%)`,
148
+ background: bare
149
+ ? `radial-gradient(34% 38% at 50% 50%, ${hexAlpha(colors.signal, 0.3)}, transparent 72%)`
150
+ : `radial-gradient(42% 46% at 78% 22%, ${hexAlpha(colors.signal, night ? 0.2 : 0.34)}, transparent 70%), radial-gradient(40% 50% at 12% 92%, ${hexAlpha(colors.signal, night ? 0.1 : 0.16)}, transparent 70%)`,
147
151
  transform: "translateY(calc((var(--p) - 0.5) * 12%))",
148
152
  }}
149
153
  />
@@ -152,10 +156,10 @@ export function Stage({ stageRef, colors, night, height, label, children }: { st
152
156
  position: "absolute",
153
157
  top: 0,
154
158
  left: 0,
155
- width: u(BOARD),
159
+ width: u(board),
156
160
  height: "100%",
157
161
  // Room to spare: centred. Too narrow: the scroll pans from the board's left edge to its right one.
158
- transform: `translateX(calc(max(0px, 100cqi - ${u(BOARD)}) * 0.5 + min(0px, 100cqi - ${u(BOARD)}) * clamp(0, (var(--p) - 0.32) * 2.8, 1)))`,
162
+ transform: `translateX(calc(max(0px, 100cqi - ${u(board)}) * 0.5 + min(0px, 100cqi - ${u(board)}) * clamp(0, (var(--p) - 0.32) * 2.8, 1)))`,
159
163
  }}
160
164
  >
161
165
  {children}
@@ -12,6 +12,10 @@ import { DriveScreen } from "./desktop/drive"
12
12
  import { HandoffScreen } from "./desktop/handoff"
13
13
  import { LauncherScreen } from "./desktop/launcher"
14
14
  import { WallScreen } from "./desktop/wall"
15
+ import { BookScreen } from "./foyer/book"
16
+ import { PantryScreen } from "./foyer/pantry"
17
+ import { PhoneScreen } from "./foyer/phone"
18
+ import { WeekScreen } from "./foyer/week"
15
19
  import type { StageColors } from "./stage"
16
20
 
17
21
  /* The client half of a `showcase` section: the home (drawn on the server) hands a screen's id and what
@@ -28,6 +32,10 @@ const SCREENS: Record<ShowcaseScreenId, (props: ScreenProps) => ReactNode> = {
28
32
  "desktop-drive": DriveScreen,
29
33
  "desktop-handoff": HandoffScreen,
30
34
  "desktop-launcher": LauncherScreen,
35
+ "foyer-phone": PhoneScreen,
36
+ "foyer-week": WeekScreen,
37
+ "foyer-pantry": PantryScreen,
38
+ "foyer-book": BookScreen,
31
39
  }
32
40
 
33
41
  export function ShowcaseScreen({ screen, locale, product, theme, palette, label }: { screen: ShowcaseScreenId; locale: "en" | "fr"; product: BrandProductId; theme: BrandTheme; palette?: BrandPalette; label: string }) {
package/src/home/types.ts CHANGED
@@ -39,6 +39,9 @@ export type HomeSection =
39
39
  illustration?: IllustrationId
40
40
  /** A 3D module beside (split) or under (centered) the copy — or behind it (band). Takes the illustration's place. */
41
41
  scene?: Module3DRef
42
+ /** A screen of the product, playing beside (split) or under (centered) the copy — a narrow one, drawn for a
43
+ column (`foyer-phone`). Takes the illustration's and the scene's place; not in a band. */
44
+ screen?: ShowcaseScreenId
42
45
  })
43
46
  | (Base & {
44
47
  kind: "facts"