Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.
Rust apple-notesapple-reminderscloudkitcrdtdesktop-appicloudicloud-calendaricloud-driveicloud-notesicloud-photosiphonelinuxlinux-desktoplocal-firstoffline-firstprivacyrusttauritauri-appwindows
README screenshots retaken from the current app
Yashwanth Kamireddi3ecb3d06d8a0
diff --git a/.uiverify/readme-fixture.mjs b/.uiverify/readme-fixture.mjsindex 4a9c7ae..ab28097 100644--- a/.uiverify/readme-fixture.mjs+++ b/.uiverify/readme-fixture.mjs@@ -1,20 +1,69 @@// The README's demo library: an invented person's notes, reminders, week, contacts, files and// photos, so the screenshots show a lived-in app without anyone's real data. Every name, place// and address here is made up; phone numbers use the 555-01xx range kept for fiction, emails-// use example.com, and every picture is drawn by .uiverify/readme-shots.mjs.+// and links use example.com/.example, and every picture is drawn by .uiverify/readme-pictures.mjs.//// Used only when a suite passes `demoFixture: true` to installStub (stub.mjs) and adds this-// script first: `ctx.addInitScript(installDemo, { picBase, tz })`. Nothing else reads it.+// script first: `ctx.addInitScript(installDemo, { picBase, tz, library: photoLibrary() })`.//-// addInitScript SERIALIZES this function: everything it needs is inside it or in its argument.-export function installDemo({ picBase, tz }) {+// addInitScript SERIALIZES installDemo: everything it needs is inside it or in its argument.++/**+ * The photo library, planned in one place so the pictures drawn (readme-shots.mjs) and the+ * rows the app reads (installDemo) agree: outings over four months, each a handful of shots+ * of one kind of scene, with a few videos, Live Photos and favourites among them.+ */+export function photoLibrary() {+ const outings = [+ // [days ago, scenes in order]+ [0, ["city", "sea"]],+ [2, ["forest", "forest", "landscape", "forest", "lake"]],+ [4, ["city", "sea", "city", "bloom"]],+ [6, ["tulips", "bloom", "tulips"]],+ [9, ["bloom", "lake"]],+ [12, ["lake", "landscape", "lake", "night", "fire", "night"]],+ [16, ["sea", "beach", "sea"]],+ [19, ["city", "coffee", "city"]],+ [24, ["landscape", "landscape", "forest", "lake"]],+ [29, ["city", "city", "sea", "coffee", "city", "sea"]],+ [34, ["tulips", "bloom", "tulips", "bloom"]],+ [38, ["beach", "beach", "sea", "beach", "sea"]],+ [43, ["coffee", "city"]],+ [47, ["dunes", "dunes", "landscape", "dunes", "night"]],+ [53, ["forest", "lake", "forest"]],+ [58, ["beach", "sea", "beach", "beach", "sea", "beach"]],+ [63, ["aurora", "night", "aurora", "lake"]],+ [69, ["city", "coffee", "city", "city"]],+ [74, ["landscape", "lake", "landscape", "lake", "fire"]],+ [80, ["tulips", "bloom", "tulips"]],+ [86, ["sea", "beach", "dunes", "sea"]],+ [92, ["forest", "forest", "landscape"]],+ [99, ["city", "sea", "city", "coffee"]],+ [104, ["lake", "landscape", "night", "fire", "lake"]],+ ];+ const shapes = [[800, 600], [600, 800], [800, 600], [800, 450], [800, 600], [600, 800], [800, 600]];+ const videos = { 3: 14.2, 17: 41.6, 33: 8.4, 52: 22.9 };+ const live = new Set([1, 6, 11, 20, 27, 39, 46, 61]);+ const favourite = new Set([2, 8, 14, 19, 25, 31, 44, 50, 57, 66, 72, 80]);+ const out = [];+ for (const [daysAgo, scenes] of outings)+ scenes.forEach((scene, k) => {+ const i = out.length;+ const [w, h] = shapes[(i * 5 + k) % shapes.length];+ out.push({ id: `g${i}`, scene, w, h, seed: i + 3, daysAgo, minutes: daysAgo === 0 ? 7 * 60 + 40 + k * 35 : 10 * 60 + (i % 7) * 47 - k * 9,+ kind: videos[i] ? "video" : live.has(i) ? "live" : "image", duration: videos[i] ?? (live.has(i) ? 2.8 : null), favorite: favourite.has(i) });+ });+ return out;+}++export function installDemo({ picBase, tz, library }) {const HOUR = 3600, DAY = 86400, MIN = 60;const today = new Date(); today.setHours(0, 0, 0, 0);const at = (days, h = 0, m = 0) => { const d = new Date(today); d.setDate(d.getDate() + days); d.setHours(h, m, 0, 0); return d.getTime() / 1000; };const now = Math.floor(Date.now() / 1000);window.__picBase = picBase;- // ---- Calendar: a busy week, four calendars, a birthday and reminders on the schedule.+ // ---- Calendar: a busy week, four calendars, a birthday, video calls and reminders on the schedule.const calendars = [{ guid: "work", title: "Work", colour: "#0088ff", ctag: null, sortOrder: 0, enabled: true, writable: true, isDefault: true },{ guid: "home", title: "Home", colour: "#34c759", ctag: null, sortOrder: 1, enabled: true, writable: true, isDefault: false },@@ -25,63 +74,80 @@ export function installDemo({ picBase, tz }) {let n = 0;const ev = (cal, title, day, h, m, minutes, location = null, extra = {}) => ({guid: extra.guid ?? `d${++n}`, calendarGuid: cal, title, location, startsAt: at(day, h, m), endsAt: at(day, h, m) + minutes * MIN,- allDay: false, timezone: tz, url: null, notes: null, etag: null });+ allDay: false, timezone: tz, url: extra.url ?? null, notes: extra.notes ?? null, etag: null });const allDay = (cal, title, day, days = 1, guid = `a${++n}`) => ({ guid, calendarGuid: cal, title, location: null,startsAt: at(day), endsAt: at(day + days), allDay: true, timezone: null, url: null, notes: null, etag: null });- const standups = [-2, -1, 0, 1, 2].map((d) => ev("work", "Team standup", d, 9, 0, 30, null, { guid: `SERIES__standup${d + 2}` }));+ const standups = [-2, -1, 0, 1, 2].map((d) => ev("work", "Standup", d, 9, 0, 30, null, { guid: `SERIES__standup${d + 2}` }));const events = [...standups,- ev("work", "Design critique", -2, 11, 0, 60, "Studio B"),+ ev("family", "Brunch", -3, 11, 0, 90, "Juniper Kitchen"),+ ev("fitness", "Long run", -3, 8, 0, 60, "Riverside loop"),+ ev("work", "Design crit", -2, 11, 0, 60, "Studio B"),ev("fitness", "Yoga", -2, 18, 0, 60, "Northside Studio"),- ev("work", "Roadmap planning", -1, 10, 0, 90, "Room 4"),- ev("home", "Lunch with Sam", -1, 12, 30, 60, "Corner Café"),- ev("home", "Dentist", -1, 16, 0, 60),- ev("work", "Product review", 0, 10, 30, 60, "Room 4"),- ev("family", "Lunch with Mum", 0, 12, 30, 60),- ev("work", "1:1 with Jordan", 0, 15, 0, 45),+ ev("work", "Roadmap", -1, 10, 0, 90, "Room 4"),+ ev("home", "Lunch: Sam", -1, 12, 30, 60, "Corner Café"),+ ev("home", "Dentist", -1, 16, 0, 60, "Brookfield Dental"),+ ev("work", "Q4 review", 0, 10, 30, 60, "Room 4"),+ ev("family", "Lunch: Mum", 0, 12, 30, 60, "Olive & Fig"),+ ev("work", "1:1 Jordan", 0, 15, 0, 45, null, { url: "https://zoom.us/j/5550100142" }),ev("fitness", "Climbing", 0, 17, 30, 90, "Boulder Hall"),- ev("work", "Customer interviews", 1, 11, 0, 90),+ ev("work", "Interviews", 1, 11, 0, 90, null, { guid: "d-meet", url: "https://meet.google.com/xqv-mbtr-kpe",+ notes: "Three customers, thirty minutes each. Ask about the first week." }),ev("home", "Bike service", 1, 14, 0, 60, "Spoke & Chain"),ev("family", "Movie night", 1, 19, 0, 120),- ev("work", "Sprint demo", 2, 10, 0, 60),+ ev("work", "Sprint demo", 2, 10, 0, 60, "Room 4"),ev("work", "Focus time", 2, 13, 0, 120),ev("family", "Swim lessons", 3, 10, 0, 60, "Leisure Centre"),- ev("family", "Farmers market", 3, 11, 30, 90),- ev("family", "Brunch with the Okafors", -3, 11, 0, 90),+ ev("family", "Market", 3, 11, 30, 90, "Market Square"),+ ev("fitness", "Yoga", 1, 7, 30, 60, "Northside Studio"),allDay("family", "Cabin weekend", 2, 3),allDay("quince:birthdays", "Maya Chen’s Birthday", 1, 1, "quince:birthdays:c3:2026"),];const dueReminders = [- { guid: "dr1", listGuid: "trip", title: "Book the train tickets", notes: null, dueAt: at(0, 14, 0), completedAt: null, priority: 0, etag: null },- { guid: "dr2", listGuid: "errands", title: "Pick up the dry cleaning", notes: null, dueAt: at(1, 17, 0), completedAt: null, priority: 0, etag: null },+ { guid: "r2", listGuid: "trip", title: "Book the train tickets", notes: null, dueAt: at(0, 14, 0), completedAt: null, priority: 0, etag: null },+ { guid: "r7", listGuid: "errands", title: "Pick up the dry cleaning", notes: null, dueAt: at(1, 17, 0), completedAt: null, priority: 0, etag: null },];- // ---- Reminders: Today, colourful lists, tags, sections and a subtask or two.+ // ---- Reminders: colourful lists, tags, sections, subtasks, a link, a place and an early alert.const reminderLists = [{ guid: "home", title: "Home", colour: "#007aff", ctag: null, sortOrder: 0, enabled: true, emblem: "house" },- { guid: "errands", title: "Errands", colour: "#ff9500", ctag: null, sortOrder: 1, enabled: true, emblem: "cart" },- { guid: "work", title: "Work", colour: "#af52de", ctag: null, sortOrder: 2, enabled: true, emblem: "briefcase" },- { guid: "trip", title: "Cabin Weekend", colour: "#34c759", ctag: null, sortOrder: 3, enabled: true, emblem: "tent" },- { guid: "groceries", title: "Groceries", colour: "#ff3b30", ctag: null, sortOrder: 4, enabled: true, emblem: "basket" },+ { guid: "work", title: "Work", colour: "#af52de", ctag: null, sortOrder: 1, enabled: true, emblem: null },+ { guid: "trip", title: "Cabin Weekend", colour: "#34c759", ctag: null, sortOrder: 2, enabled: true, emblem: "nature" },+ { guid: "errands", title: "Errands", colour: "#ff9500", ctag: null, sortOrder: 3, enabled: true, emblem: null },+ { guid: "groceries", title: "Groceries", colour: "#ff3b30", ctag: null, sortOrder: 4, enabled: true, emblem: null },+ { guid: "reading", title: "Reading", colour: "#a2845e", ctag: null, sortOrder: 5, enabled: true, emblem: "book" },+ { guid: "training", title: "Training", colour: "#ff2d55", ctag: null, sortOrder: 6, enabled: true, emblem: "fitness" },];const R = (guid, listGuid, title, dueAt, extra = {}) => ({ guid, listGuid, title, notes: null, dueAt, completedAt: null,priority: 0, flagged: false, parentGuid: null, recurFrequency: null, recurInterval: null, sectionGuid: null, allDay: false, etag: null, ...extra });+ // Apple's priorities: 1 high, 5 medium, 9 low.const reminderItems = [R("r1", "home", "Call the plumber about the sink", at(0, 8, 30), { priority: 1 }),- R("r2", "trip", "Book the train tickets", at(0, 10, 0), { flagged: true, notes: "Window seats if we can", sectionGuid: "s-before" }),- R("r2a", "trip", "Compare the 4:10 and 5:40 trains", null, { parentGuid: "r2", sectionGuid: "s-before" }),+ R("r2", "trip", "Book the train tickets", at(0, 14, 0), { flagged: true, priority: 5, notes: "Window seats if we can", sectionGuid: "s-before" }),+ R("r2a", "trip", "Compare the 4:10 and the 5:40", null, { parentGuid: "r2", sectionGuid: "s-before" }),+ R("r13", "trip", "Print the trail map", at(1, 19, 0), { sectionGuid: "s-before" }),+ R("r6", "trip", "Pack the camping gear", at(2, 8, 0), { sectionGuid: "s-pack", flagged: true }),+ R("r6a", "trip", "Headlamps and spare batteries", null, { parentGuid: "r6", sectionGuid: "s-pack" }),+ R("r6b", "trip", "Sleeping bags", null, { parentGuid: "r6", sectionGuid: "s-pack" }),+ R("r6c", "trip", "Stove and fuel", null, { parentGuid: "r6", sectionGuid: "s-pack" }),+ R("r16", "trip", "Turn the heating down", at(2, 15, 30), { sectionGuid: "s-before" }),R("r3", "work", "Send the Q4 slides to Jordan", at(0, 11, 30), { priority: 1 }),R("r4", "errands", "Return the library books", at(0), { allDay: true }),R("r5", "home", "Water the herbs", at(0, 18, 0), { recurFrequency: 0, recurInterval: 1 }),- R("r6", "trip", "Pack the camping gear", at(0, 20, 0), { sectionGuid: "s-pack", flagged: true }),- R("r6a", "trip", "Headlamps and spare batteries", null, { parentGuid: "r6", sectionGuid: "s-pack" }),R("r7", "errands", "Pick up the dry cleaning", at(1, 17, 0)),+ R("r17", "errands", "Post the birthday card", at(0, 16, 0), { flagged: true }),R("r8", "groceries", "Oat milk", null), R("r9", "groceries", "Basil", null), R("r10", "groceries", "Lemons", null),- R("r11", "work", "Review the onboarding draft", at(2, 10, 0)),- R("r12", "home", "Renew car insurance", at(9, 9, 0), { flagged: true }),- R("r13", "trip", "Print the trail map", at(1, 19, 0), { sectionGuid: "s-before" }),+ R("r18", "groceries", "Sourdough loaf", null), R("r19", "groceries", "Coffee beans", null),+ R("r11", "work", "Review the onboarding draft", at(2, 9, 30)),+ R("r20", "work", "Book a room for the offsite", at(5, 10, 0)),+ R("r12", "home", "Renew the car insurance", at(9, 9, 0), { flagged: true }),+ R("r21", "home", "Book the boiler service", at(12, 9, 0)),+ R("r22", "reading", "Piranesi", null), R("r23", "reading", "The Overstory", null), R("r24", "reading", "A Psalm for the Wild-Built", null),+ R("r25", "training", "Easy 5 km", at(1, 7, 0), { recurFrequency: 1, recurInterval: 1 }),+ R("r26", "training", "Stretch after climbing", at(0, 19, 30)),];- window.__tagMap = { r2: ["trip"], r3: ["work"], r4: ["errands"], r5: ["home"], r6: ["trip", "weekend"], r7: ["errands"], r13: ["trip"] };+ window.__tagMap = { r2: ["trip"], r3: ["work"], r4: ["errands"], r5: ["home"], r6: ["trip", "weekend"], r7: ["errands"], r13: ["trip"],+ r17: ["errands"] };window.__sections = [{ guid: "s-before", listGuid: "trip", title: "Before we go", createdAt: null },{ guid: "s-pack", listGuid: "trip", title: "Packing", createdAt: null },@@ -90,156 +156,202 @@ export function installDemo({ picBase, tz }) {{ guid: "SL-today", kind: "today", title: null, colour: null, emblem: null, pinned: true, sorting: null, filter: null },{ guid: "SL-1", kind: "custom", title: "This Weekend", colour: "#5856d6", emblem: null, pinned: false, sorting: null, filter: '{"hashtags":["weekend"]}' },];- window.__details = { r2: { url: null, earlyAlerts: [{ id: "a1", count: 30, unit: 0 }] } };+ window.__details = { r2: { url: "https://rail.example/tickets/fern-hollow", earlyAlerts: [{ id: "a1", count: 1, unit: 1 }] } };+ window.__marks = {+ r2: { url: "https://rail.example/tickets/fern-hollow" },+ r16: { location: { title: "Home", proximity: "leaving", kind: "custom" } },+ };- // ---- Notes: folders, pinned notes, and one note with a checklist, a table and a picture.+ // ---- Notes: folders, pinned notes, and a note with a link, a tag, a picture, a checklist and a table.const noteFolders = [{ guid: "f1", title: "Notes", sortOrder: 0 },{ guid: "f3", title: "Travel", sortOrder: 1 },{ guid: "f4", title: "Recipes", sortOrder: 2 },{ guid: "f5", title: "Work", sortOrder: 3 },+ { guid: "f6", title: "Home", sortOrder: 4 },+ { guid: "f7", title: "Journal", sortOrder: 5 },{ guid: "f2", title: "Recently Deleted", sortOrder: 9 },];+ // A line is [text, style, checked, attachment]; text may be a list of [piece, marks] for a+ // line that mixes plain words with a link or an inline #tag. Styles as Apple numbers them:+ // 0 title, 1 heading, 2 subheading, 100 dashed, 101 bulleted, 102 numbered, 103 checklist.const cabin = [["Cabin weekend", 0],- ["Friday to Sunday at Fern Hollow. Leave by four to miss the traffic.", null],- ["\uFFFC", null, null, "M1"],+ [[["Friday to Sunday at Fern Hollow. Leave by four to miss the traffic. "], ["", { attachment: "H1" }]], null],+ [[["Cabin 7, booked on "], ["fernhollow.example", { link: "https://fernhollow.example/cabin-7" }]], null],+ ["", null, null, "M1"],["Packing", 1],["Hiking boots", 103, true], ["Rain jackets", 103, true], ["Camera and a spare battery", 103, true],["Board games", 103, false], ["Coffee beans and the grinder", 103, false],["Who brings what", 1],- ["\uFFFC", null, null, "T1"],+ ["", null, null, "T1"],["", null],];const notes = {nC: { lines: cabin, folder: "f3", pinned: true, modified: now - 25 * MIN },nS: { lines: [["Sourdough starter", 0], ["Feed it every morning: 50 g flour, 50 g water.", null], ["Bake when it doubles in four hours", 103, false], ["Rye works too, it just smells sharper", 101]], folder: "f4", pinned: true, modified: now - 2 * DAY },+ nW: { lines: [["Wi-Fi and house codes", 0], ["Guest network: Rivera-Guest", null], ["Bins go out on Tuesday night", 101]], folder: "f6", pinned: true, modified: now - 40 * DAY },nB: { lines: [["Book club picks", 0], ["November: The Overstory. December: Piranesi.", null], ["Ask Lena to host", 103, false]], folder: "f1", modified: now - 3 * HOUR },+ nJ: { lines: [["Climbing day", 0], ["Climbed the green route clean for the first time. Sore hands, happy.", null]], folder: "f7", modified: now - 19 * HOUR },nQ: { lines: [["Q4 planning", 0], ["Ship the new onboarding by mid-November.", null], ["Hire a second designer", 103, false]], folder: "f5", modified: now - 26 * HOUR },- nG: { lines: [["Gift ideas", 0], ["Sam: a good pour-over kettle", 101], ["Mum: the blue scarf from the market", 101]], folder: "f1", modified: now - 3 * DAY },+ nG: { lines: [["Gift ideas", 0], ["Sam: a good pour-over kettle", 101], ["Mum: the blue scarf from the market", 101], ["Maya: climbing chalk bag", 101]], folder: "f1", modified: now - 3 * DAY },nL: { lines: [["Lisbon in spring", 0], ["Tram 28 early, before the crowds. Custard tarts in Belém.", null]], folder: "f3", modified: now - 5 * DAY },+ nP: { lines: [["Garden plan", 0], ["Tulip bulbs in before the first frost. Move the rosemary to the sun.", null]], folder: "f6", modified: now - 6 * DAY },nM: { lines: [["Design sync", 0], ["Tighter spacing in the sidebar, and calmer empty states.", null]], folder: "f5", modified: now - 8 * DAY },nK: { lines: [["Bike maintenance", 0], ["Chain lube every 300 km. Brake pads at 2 mm.", null]], folder: "f1", modified: now - 12 * DAY },+ nT: { lines: [["Kyoto, someday", 0], ["Philosopher’s Path in April. Stay near Gion.", null]], folder: "f3", modified: now - 16 * DAY },nR: { lines: [["Tomato soup", 0], ["Roast the tomatoes first, with garlic and thyme.", null]], folder: "f4", modified: now - 20 * DAY },+ nN: { lines: [["Pancakes", 0], ["Buttermilk, a pinch of salt, rest the batter ten minutes.", null]], folder: "f4", modified: now - 33 * DAY },+ nO: { lines: [["Offsite ideas", 0], ["A day at the lake, with one long walk and no laptops.", null]], folder: "f5", modified: now - 45 * DAY },};+ const textOf = (l) => (Array.isArray(l[0]) ? l[0].map((p) => p[0]).join("") : l[0]);const toNote = (guid, n) => {- const text = n.lines.map((l) => l[0]).join("\n");- const rest = n.lines.slice(1).map((l) => l[0]).filter((t) => t !== "").join(" ");- return { guid, folderGuid: n.folder, title: n.lines[0][0], snippet: rest, body: text, locked: false, editable: true,+ const text = n.lines.map(textOf).join("\n");+ const rest = n.lines.slice(1).map(textOf).map((t) => t.replace(//g, "").trim()).filter(Boolean).join(" ");+ return { guid, folderGuid: n.folder, title: textOf(n.lines[0]), snippet: rest, body: text, locked: false, editable: true,pinned: !!n.pinned, createdAt: n.modified - 30 * DAY, modifiedAt: n.modified, etag: null };};const noteList = Object.entries(notes).map(([g, n]) => toNote(g, n));// The note that arrives from "the phone" in the hero animation (readme-shots.mjs adds it).const arriving = { lines: [["Farmers market", 0], ["Saturday morning, before swim lessons", null], ["Sourdough loaf", 103, false], ["Honey", 103, false], ["Apples for the pie", 103, false], ["Flowers for Maya", 103, false]], folder: "f1", modified: now };window.__demoArrive = () => { const list = window.__demo.noteList; if (!list.some((x) => x.guid === "nF")) { notes.nF = arriving; list.unshift(toNote("nF", arriving)); } };- window.__table = [["Who", "Brings"], ["Sam", "Firewood and the speaker"], ["Alex", "Breakfast for Saturday"], ["Maya", "Board games and snacks"]];- const runsOf = (n) => n.lines.map((l, i) => ({ length: [...l[0]].length + (i < n.lines.length - 1 ? 1 : 0), style: l[1], indent: 0,- checked: l[1] === 103 ? !!l[2] : null, bold: false, italic: false, underline: false, strike: false, link: null, ...(l[3] ? { attachment: l[3] } : {}) }));+ window.__table = [["Who", "Brings"], ["Sam", "Firewood"], ["Alex", "Saturday breakfast"], ["Maya", "Games and snacks"]];+ const plain = { indent: 0, bold: false, italic: false, underline: false, strike: false, link: null };+ const runsOf = (n) => n.lines.flatMap((l, i) => {+ const nl = i < n.lines.length - 1 ? 1 : 0;+ const line = { style: l[1], checked: l[1] === 103 ? !!l[2] : null };+ if (!Array.isArray(l[0]))+ return [{ ...plain, ...line, length: [...l[0]].length + nl, ...(l[3] ? { attachment: l[3] } : {}) }];+ return l[0].map(([piece, marks = {}], k) => ({ ...plain, ...line, ...marks, length: [...piece].length + (k === l[0].length - 1 ? nl : 0) }));+ });- // ---- Contacts.- const C = (guid, firstName, lastName, methods = [], extra = {}) => ({ guid, firstName, middleName: null, lastName, photoUrl: null, photoSignature: null,+ // ---- Contacts: faces on most cards, lists, and one card with everything on it.+ const C = (guid, firstName, lastName, methods = [], extra = {}) => ({ guid, firstName, middleName: null, lastName,+ photoUrl: extra.face ? `demo:${guid}` : null, photoSignature: extra.face ? guid : null,company: null, isCompany: false, birthday: null, notes: null, etag: null, methods, ...extra });+ const phone = (label, last) => ({ kind: "phone", label, value: `+1 (555) 01${last}` });const contactList = [- C("c1", "Alex", "Brennan", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-2231" }]),- C("c2", "Priya", "Desai", [{ kind: "email", label: "home", value: "[email protected]" }]),+ C("c1", "Alex", "Brennan", [phone("mobile", "0-2231")], { face: true }),+ C("c2", "Priya", "Desai", [{ kind: "email", label: "home", value: "[email protected]" }], { face: true }),C("c3", "Maya", "Chen", [- { kind: "phone", label: "mobile", value: "+1 (555) 010-4417" },- { kind: "phone", label: "work", value: "+1 (555) 010-9020" },+ phone("mobile", "0-4417"),+ phone("work", "0-9020"),{ kind: "email", label: "home", value: "[email protected]" },- { kind: "email", label: "work", value: "[email protected]" },+ { kind: "email", label: "work", value: "[email protected]" },{ kind: "url", label: "homepage", value: "mayachen.example" },- ], { company: "Studio North", birthday: "1991-10-22", notes: "Met at the climbing gym. Loves the sourdough." }),- C("c4", "Jordan", "Ellis", [{ kind: "phone", label: "work", value: "+1 (555) 010-7788" }], { company: "Studio North" }),- C("c5", "Noah", "Fischer", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-3304" }]),- C("c6", "Sam", "Garcia", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-6612" }]),- C("c7", "Lena", "Hart", [{ kind: "email", label: "home", value: "[email protected]" }]),- C("c8", "Theo", "Ivanov", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-1180" }]),- C("c9", "Ada", "Kim", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-5521" }]),- C("c10", "Ruth", "Lindqvist", [{ kind: "phone", label: "home", value: "+1 (555) 010-0045" }]),+ { kind: "related", label: "brother", value: "Leo Chen" },+ { kind: "related", label: "partner", value: "Sam Garcia" },+ ], { face: true, company: "Studio North", jobTitle: "Product Designer", birthday: "1991-10-22", notes: "Met at the climbing gym. Loves the sourdough." }),+ C("c4", "Jordan", "Ellis", [phone("work", "0-7788")], { company: "Studio North", face: true }),+ C("c5", "Noah", "Fischer", [phone("mobile", "0-3304")]),+ C("c6", "Sam", "Garcia", [phone("mobile", "0-6612")], { face: true }),+ C("c7", "Lena", "Hart", [{ kind: "email", label: "home", value: "[email protected]" }], { face: true }),+ C("c8", "Theo", "Ivanov", [phone("mobile", "0-1180")]),+ C("c9", "Ada", "Kim", [phone("mobile", "0-5521")], { face: true }),+ C("c10", "Ruth", "Lindqvist", [phone("home", "0-0045")], { face: true }),C("c11", "Ben", "Morales", [{ kind: "email", label: "home", value: "[email protected]" }]),- C("c12", "Chidi", "Okafor", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-8890" }]),- C("c13", "Jamie", "Rivera", [{ kind: "email", label: "home", value: "[email protected]" }]),- C("c14", "Hana", "Sato", [{ kind: "phone", label: "mobile", value: "+1 (555) 010-2675" }]),- C("c15", null, null, [{ kind: "phone", label: "work", value: "+1 (555) 010-0100" }], { company: "Spoke & Chain Bikes", isCompany: true }),+ C("c12", "Chidi", "Okafor", [phone("mobile", "0-8890")], { face: true }),+ C("c13", "Jamie", "Rivera", [{ kind: "email", label: "home", value: "[email protected]" }], { face: true }),+ C("c14", "Hana", "Sato", [phone("mobile", "0-2675")], { face: true }),+ C("c15", null, null, [phone("work", "0-0100")], { company: "Spoke & Chain Bikes", isCompany: true }),+ C("c16", "Leo", "Chen", [phone("mobile", "0-4410")]),+ C("c17", "Grace", "Adeyemi", [phone("mobile", "0-3391")], { face: true }),+ C("c18", "Oscar", "Bell", [phone("mobile", "0-7720")]),+ C("c19", "Elena", "Costa", [phone("mobile", "0-6604")], { face: true }),+ C("c20", "Marcus", "Dlamini", [phone("mobile", "0-2219")]),+ C("c21", "Isla", "Fraser", [phone("mobile", "0-5583")], { face: true }),+ C("c22", "Kai", "Nakamura", [phone("mobile", "0-1147")]),+ C("c23", "Zara", "Patel", [phone("mobile", "0-9035")], { face: true }),+ C("c24", "Owen", "Walsh", [phone("mobile", "0-6458")]),+ C("c25", null, null, [phone("work", "0-0177")], { company: "Brookfield Dental", isCompany: true }),];window.__lists = [- { guid: "L1", name: "Family", members: ["c10", "c13"], etag: "e1" },- { guid: "L2", name: "Climbing club", members: ["c3", "c6", "c9"], etag: "e2" },- { guid: "L3", name: "Studio North", members: ["c3", "c4"], etag: "e3" },+ { guid: "L1", name: "Family", members: ["c10", "c13", "c16"], etag: "e1" },+ { guid: "L2", name: "Climbing club", members: ["c3", "c6", "c9", "c21"], etag: "e2" },+ { guid: "L3", name: "Studio North", members: ["c3", "c4", "c19"], etag: "e3" },+ { guid: "L4", name: "Book club", members: ["c7", "c2", "c17", "c23"], etag: "e4" },];window.__me = "c13";window.__addresses = { c3: [{ label: "HOME", street: "48 Willow Lane", subLocality: null, city: "Brookfield", subAdministrativeArea: null,state: "OR", postalCode: "97000", country: "United States", countryCode: "us" }] };- // ---- Drive: a tidy root and a folder of trip files with thumbnails.- const F = (id, parentId, name, extension, kind, size, modified, childCount = null) => ({ drivewsid: id, parentId, name, extension, kind, size,- childCount, createdAt: modified - 40 * DAY, modifiedAt: modified, etag: "e" });+ // ---- Drive: a folder of a summer trip, with pictures, documents and their thumbnails.+ // Ids carry iCloud Drive's own zone, as Apple's do, so the folder takes uploads.+ const Z = "com.apple.CloudDocs";+ const F = (key, parent, name, extension, kind, size, modified, childCount = null) => ({ drivewsid: `${kind === "FILE" ? "FILE" : kind === "APP_LIBRARY" ? "APPLIB" : "FOLDER"}::${Z}::${key}`,+ parentId: parent ? `FOLDER::${Z}::${parent}` : null, name, extension, kind, size, childCount, createdAt: modified - 40 * DAY, modifiedAt: modified, etag: "e" });const drive = {root: [- F("FOLDER::cabin", null, "Cabin Weekend", null, "FOLDER", null, now - 2 * HOUR, 12),- F("FOLDER::docs", null, "Documents", null, "FOLDER", null, now - 3 * DAY, 24),- F("FOLDER::desk", null, "Desktop", null, "FOLDER", null, now - DAY, 6),- F("FOLDER::recipes", null, "Recipes", null, "FOLDER", null, now - 9 * DAY, 12),- F("APPLIB::pages", null, "Pages", null, "APP_LIBRARY", null, null),- F("APPLIB::numbers", null, "Numbers", null, "APP_LIBRARY", null, null),- F("APPLIB::keynote", null, "Keynote", null, "APP_LIBRARY", null, null),- F("FILE::budget", null, "Household budget", "numbers", "FILE", 412300, now - 4 * DAY),- F("FILE::resume", null, "Portfolio", "pdf", "FILE", 2840000, now - 15 * DAY),+ F("lake", null, "Summer at the Lake", null, "FOLDER", null, now - 2 * HOUR, 17),+ F("docs", null, "Documents", null, "FOLDER", null, now - 3 * DAY, 24),+ F("desk", null, "Desktop", null, "FOLDER", null, now - DAY, 6),+ F("recipes", null, "Recipes", null, "FOLDER", null, now - 9 * DAY, 12),+ F("budget", null, "Household budget", "numbers", "FILE", 412300, now - 4 * DAY),+ F("portfolio", null, "Portfolio", "pdf", "FILE", 2840000, now - 15 * DAY),],- "FOLDER::cabin": [- F("FILE::lake", "FOLDER::cabin", "Lake at dawn", "jpg", "FILE", 3412000, now - 2 * HOUR),- F("FILE::ridge", "FOLDER::cabin", "Ridge trail", "jpg", "FILE", 2980000, now - 3 * HOUR),- F("FILE::fire", "FOLDER::cabin", "Campfire", "jpg", "FILE", 2210000, now - 5 * HOUR),- F("FILE::dunes", "FOLDER::cabin", "Sunset over the valley", "jpg", "FILE", 3120000, now - 6 * HOUR),- F("FILE::map", "FOLDER::cabin", "Trail map", "pdf", "FILE", 1840000, now - DAY),- F("FILE::plan", "FOLDER::cabin", "Weekend plan", "pdf", "FILE", 220000, now - DAY),- F("FILE::costs", "FOLDER::cabin", "Shared costs", "numbers", "FILE", 98000, now - 2 * DAY),- F("FILE::play", "FOLDER::cabin", "Road trip songs", "txt", "FILE", 2100, now - 3 * DAY),- F("FILE::stars", "FOLDER::cabin", "Stars over the lake", "jpg", "FILE", 2650000, now - 7 * HOUR),- F("FILE::mist", "FOLDER::cabin", "Morning mist", "jpg", "FILE", 2870000, now - 8 * HOUR),- F("FILE::shore", "FOLDER::cabin", "The shore", "jpg", "FILE", 3010000, now - 9 * HOUR),- F("FOLDER::receipts", "FOLDER::cabin", "Receipts", null, "FOLDER", null, now - 2 * DAY, 4),+ lake: [+ F("receipts", "lake", "Receipts", null, "FOLDER", null, now - 2 * DAY, 4),+ F("fromsam", "lake", "From Sam", null, "FOLDER", null, now - 3 * DAY, 23),+ F("lakedawn", "lake", "Lake at dawn", "jpg", "FILE", 3412000, now - 2 * HOUR),+ F("ridge", "lake", "Ridge trail", "jpg", "FILE", 2980000, now - 3 * HOUR),+ F("fire", "lake", "Campfire", "jpg", "FILE", 2210000, now - 5 * HOUR),+ F("aurora", "lake", "Northern lights", "jpg", "FILE", 3540000, now - 6 * HOUR),+ F("stars", "lake", "Stars over the lake", "jpg", "FILE", 2650000, now - 7 * HOUR),+ F("mist", "lake", "Morning mist", "jpg", "FILE", 2870000, now - 8 * HOUR),+ F("pines", "lake", "Pines", "jpg", "FILE", 2760000, now - 9 * HOUR),+ F("porch", "lake", "Coffee on the porch", "jpg", "FILE", 1980000, now - 10 * HOUR),+ F("shore", "lake", "The shore", "jpg", "FILE", 3010000, now - 11 * HOUR),+ F("map", "lake", "Trail map", "pdf", "FILE", 1840000, now - DAY),+ F("plan", "lake", "Weekend plan", "pdf", "FILE", 220000, now - DAY),+ F("packing", "lake", "Packing list", "pages", "FILE", 310000, now - DAY),+ F("costs", "lake", "Shared costs", "numbers", "FILE", 98000, now - 2 * DAY),+ F("slides", "lake", "Trip slideshow", "key", "FILE", 8200000, now - 2 * DAY),+ F("songs", "lake", "Road trip songs", "txt", "FILE", 2100, now - 3 * DAY),],};+ const children = (folderId) => drive[String(folderId ?? "").split("::").pop()] ?? drive.root;const driveById = new Map(Object.values(drive).flat().map((i) => [i.drivewsid, i]));- const thumbs = Object.fromEntries(["lake", "ridge", "fire", "dunes", "map", "plan", "stars", "mist", "shore"].map((k) => [`FILE::${k}`, `${picBase}/drive/${k}`]));+ const thumbs = Object.fromEntries(["lakedawn", "ridge", "fire", "aurora", "stars", "mist", "pines", "porch", "shore", "map", "plan", "packing", "costs", "slides", "budget", "portfolio"]+ .map((k) => [`FILE::${Z}::${k}`, `${picBase}/drive/${k}`]));- // ---- Photos: a library over three months, a video, a Live Photo, favourites and albums.- const shapes = [[4032, 3024], [3024, 4032], [4032, 3024], [4032, 2268], [4032, 3024], [3024, 4032]];- window.__photos = Array.from({ length: 54 }, (_, i) => {- const [width, height] = shapes[i % shapes.length];- const takenAt = now - Math.floor(i * 1.7 * DAY) - (i % 5) * 3 * HOUR - HOUR;- return { id: `g${i}`, master: `mg${i}`, takenAt, addedAt: takenAt, kind: i === 4 ? "video" : i === 9 ? "live" : "image",- width, height, duration: i === 4 ? 14.2 : i === 9 ? 2.8 : null, filename: i === 4 ? `IMG_${4100 + i}.MOV` : `IMG_${4100 + i}.HEIC`,- size: 2400000, uti: i === 4 ? "com.apple.quicktime-movie" : "public.heic", favorite: i % 7 === 2, hidden: false, deleted: false,- deletedAt: null, subtype: 0, changeTag: null };- });+ // ---- Photos: the planned library (photoLibrary), favourites, videos, Live Photos and albums.+ window.__photos = library.map((p) => {+ const takenAt = at(-p.daysAgo) + p.minutes * MIN;+ const video = p.kind === "video";+ return { id: p.id, master: `m${p.id}`, takenAt, addedAt: takenAt, kind: p.kind, width: p.w * 5, height: p.h * 5, duration: p.duration,+ filename: `IMG_${4100 + Number(p.id.slice(1))}.${video ? "MOV" : "HEIC"}`, size: video ? 38_000_000 : 2_400_000,+ uti: video ? "com.apple.quicktime-movie" : "public.heic", favorite: p.favorite, hidden: false, deleted: false, deletedAt: null, subtype: 0, changeTag: null };+ }).filter((p) => p.takenAt <= now);+ const ofScene = (...scenes) => library.filter((p) => scenes.includes(p.scene)).map((p) => p.id);window.__albums = [- { id: "AL1", name: "Cabin Weekend", position: 0, changeTag: null, items: ["g0", "g1", "g2", "g3"] },- { id: "AL2", name: "Sunsets", position: 1, changeTag: null, items: ["g5", "g11", "g17"] },- { id: "AL3", name: "Garden", position: 2, changeTag: null, items: ["g7", "g8"] },+ { id: "AL1", name: "Summer at the Lake", position: 0, changeTag: null, items: ofScene("lake", "fire", "night").slice(0, 14) },+ { id: "AL2", name: "Sunsets", position: 1, changeTag: null, items: ofScene("sea", "dunes").slice(0, 12) },+ { id: "AL3", name: "Lisbon", position: 2, changeTag: null, items: ofScene("city").slice(0, 16) },+ { id: "AL4", name: "Garden", position: 3, changeTag: null, items: ofScene("tulips", "bloom").slice(0, 9) },+ { id: "AL5", name: "Coffee", position: 4, changeTag: null, items: ofScene("coffee") },];// ---- Settings and freshness.const services = ["notes", "reminders", "calendar", "contacts", "drive", "photos"];const labels = { notes: "Notes", reminders: "Reminders", calendar: "Calendar", contacts: "Contacts", drive: "Drive", photos: "Photos" };const report = () => ({ services: services.map((s, i) => ({ service: s, label: labels[s], outcome: "ok", detail: null,- lastSyncedAt: Math.floor(Date.now() / 1000) - 20 - i * 9 })), asOf: Math.floor(Date.now() / 1000) - 20, tookMs: 40 });+ lastSyncedAt: Math.floor(Date.now() / 1000) - 6 - i * 3 })), asOf: Math.floor(Date.now() / 1000) - 6, tookMs: 40 });window.__local = { library: 48_200_000, photos: 1_912_000_000, notes: 86_000_000, drive: 640_000_000, other: 7_400_000, total: 2_693_600_000, clearable: 2_100_000_000 };window.__demo = {events, calendars, dueReminders, reminderLists, reminderItems, noteFolders, noteList, contactList,- // Driveitems for the stub's own search; the folders are answered below.+ // Drive items for the stub's own search; the folders are answered below.driveItems: drive.root,answer(cmd, args) {// The stub's own arrays, which it shares back after taking these rows in.const reminderItems = window.__demo.reminderItems;switch (cmd) {case "note_runs": return notes[args.guid] ? runsOf(notes[args.guid]) : undefined;- case "note_body": return notes[args.guid] ? notes[args.guid].lines.map((l) => l[0]).join("\n") : undefined;+ case "note_body": return notes[args.guid] ? notes[args.guid].lines.map(textOf).join("\n") : undefined;case "note_attachment_info":if (args.id === "T1") return { id: "T1", uti: "com.apple.notes.table", kind: "table", filename: null, title: null, width: null, height: null, size: 1200, hasPreview: false };- if (args.id === "M1") return { id: "M1", uti: "public.jpeg", kind: "image", filename: "Porch.jpeg", title: null, width: 1600, height: 760, size: 412000, hasPreview: true };+ if (args.id === "M1") return { id: "M1", uti: "public.jpeg", kind: "image", filename: "Porch.jpeg", title: null, width: 1600, height: 560, size: 412000, hasPreview: true };+ if (args.id === "H1") return { id: "H1", uti: "com.apple.notes.inlinetextattachment.hashtag", kind: "inline", filename: null, title: "#trips", width: null, height: null, size: null, hasPreview: false };return undefined;case "reminder_counts": {const open = reminderItems.filter((r) => !r.completedAt && !r.parentGuid);@@ -252,9 +364,8 @@ export function installDemo({ picBase, tz }) {case "reminders_smart": {const open = reminderItems.filter((r) => !r.completedAt);const pick = { today: (r) => r.dueAt !== null && r.dueAt < args.until, scheduled: (r) => r.dueAt !== null, flagged: (r) => r.flagged, all: () => true }[args.kind] ?? (() => true);- const tops = open.filter((r) => !r.parentGuid && pick(r));// As Today shows them on a phone: the reminders due, without their undated subtasks.- return tops;+ return open.filter((r) => !r.parentGuid && pick(r));}case "reminders_in": {const all = reminderItems.filter((r) => r.listGuid === args.listGuid);@@ -267,13 +378,13 @@ export function installDemo({ picBase, tz }) {}case "reminders_in_smart_list":return { reminders: reminderItems.filter((r) => !r.completedAt && (window.__tagMap[r.guid] ?? []).includes("weekend")), unknown: [] };- case "drive_children": return (drive[args.folderId] ?? drive.root).map((i) => ({ ...i }));+ case "drive_children": return children(args.folderId).map((i) => ({ ...i }));case "drive_item": return driveById.get(args.drivewsid) ?? null;case "drive_thumbnails": return thumbs;- case "drive_sync_folder": return (drive[args.folderId] ?? drive.root).length;- case "drive_recents": return drive["FOLDER::cabin"].filter((i) => i.kind === "FILE").map((i, k) => ({ ...i, openedAt: now - (k + 1) * 3 * HOUR }));+ case "drive_sync_folder": return children(args.folderId).length;+ case "drive_recents": return drive.lake.filter((i) => i.kind === "FILE").map((i, k) => ({ ...i, openedAt: now - (k + 1) * 3 * HOUR }));case "drive_trash": return [];- case "account_info": return { name: "Jamie Rivera", email: "[email protected]", photoContact: null, webAccessAllowed: true, dataProtection: false };+ case "account_info": return { name: "Jamie Rivera", email: "[email protected]", photoContact: "c13", webAccessAllowed: true, dataProtection: false };case "storage_info": return { usedBytes: 61_400_000_000, totalBytes: 200_000_000_000 };case "sync_status": case "sync_all": return report();case "photos_albums": return window.__albums.map(({ items, ...a }) => [a, items.length, items[0] ?? null]);diff --git a/.uiverify/readme-pictures.mjs b/.uiverify/readme-pictures.mjsindex dea67eb..1ecbec6 100644--- a/.uiverify/readme-pictures.mjs+++ b/.uiverify/readme-pictures.mjs@@ -1,9 +1,10 @@-// Pictures for the README's demo library, drawn on a canvas: skies, ridges, lakes, dunes and-// a campfire, each from a seed. Nobody's photos; nothing real. Runs in a browser page:+// Pictures for the README's demo library, drawn on a canvas: skies, ridges, lakes, a city at+// dusk, tulips, coffee, forests, beaches, illustrated contact portraits and document pages,+// each from a seed. Nobody's photos; nothing real. Runs in a browser page:// `await page.evaluate(drawPictures, specs)` answers { name: base64 JPEG }.//-// A spec is { name, w, h, scene, seed } with scene one of: landscape, lake, dunes, sea, night,-// fire, bloom, map, page.+// A spec is { name, w, h, scene, seed, grey? } with scene one of: landscape, lake, dunes, sea, night,+// fire, bloom, city, tulips, coffee, forest, aurora, beach, portrait, map, page, sheet, slides.export function drawPictures(specs) {const rng = (seed) => () => { seed |= 0; seed = (seed + 0x6d2b79f5) | 0; let t = Math.imul(seed ^ (seed >>> 15), 1 | seed);t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; return ((t ^ (t >>> 14)) >>> 0) / 4294967296; };@@ -136,6 +137,155 @@ export function drawPictures(specs) {g.fillStyle = "#ffffff"; g.fillRect(0, 0, w, h);g.fillStyle = "#2f6fd6"; g.fillRect(w * 0.1, h * 0.08, w * 0.5, h * 0.035);for (let i = 0; i < 22; i++) { g.fillStyle = i % 6 === 0 ? "#44474f" : "#b9bdc6"; g.fillRect(w * 0.1, h * (0.17 + i * 0.034), w * (i % 6 === 0 ? 0.42 : 0.6 + r() * 0.2), h * 0.012); }+ } else if (scene === "city") {+ // A skyline at dusk over a river, its windows lit.+ const horizon = h * 0.7;+ sky(["#1d2a5c", "#2a2a6b", "#14204a"][spec.seed % 3], ["#b2557a", "#d0607a", "#8b5aa8"][spec.seed % 3], ["#f6b37a", "#ffcf8f", "#f59f7a"][spec.seed % 3], horizon);+ glow(w * (0.3 + r() * 0.4), horizon, h * 0.5, "#ffd9a0", 0.35);+ for (const [k, far] of [[0, true], [1, false]]) {+ let x = -10;+ while (x < w) {+ const bw = w * (0.04 + r() * 0.07), bh = h * (far ? 0.12 + r() * 0.22 : 0.08 + r() * 0.36);+ g.fillStyle = far ? "#3a3566" : "#16142c";+ g.fillRect(x, horizon - bh, bw, bh);+ if (!far && r() < 0.3) g.fillRect(x + bw * 0.45, horizon - bh - h * 0.05, bw * 0.1, h * 0.05);+ if (!far) for (let wy = horizon - bh + 6; wy < horizon - 6; wy += h * 0.022)+ for (let wx = x + 4; wx < x + bw - 6; wx += w * 0.012)+ if (r() < 0.32) { g.fillStyle = `rgba(255,${200 + r() * 40 | 0},${120 + r() * 60 | 0},${0.55 + r() * 0.4})`; g.fillRect(wx, wy, w * 0.005, h * 0.008); }+ x += bw + (far ? 0 : w * 0.004);+ }+ }+ g.save(); g.translate(0, horizon * 2); g.scale(1, -1); g.globalAlpha = 0.45; g.drawImage(c, 0, 0, w, horizon, 0, 0, w, horizon); g.restore(); g.globalAlpha = 1;+ const water = g.createLinearGradient(0, horizon, 0, h); water.addColorStop(0, "rgba(20,18,50,0.35)"); water.addColorStop(1, "rgba(8,8,24,0.85)");+ g.fillStyle = water; g.fillRect(0, horizon, w, h - horizon);+ grain(8);+ } else if (scene === "tulips") {+ // A field of tulips under a soft sky.+ sky("#7fb5ea", "#c8e2f6", "#eef6e4", h * 0.45);+ ridge(h * 0.42, h * 0.06, "#8fb07a");+ const field = g.createLinearGradient(0, h * 0.42, 0, h); field.addColorStop(0, "#5f8f45"); field.addColorStop(1, "#2f5a26");+ g.fillStyle = field; g.fillRect(0, h * 0.44, w, h);+ const cols = [["#e8384f", "#b81f3a"], ["#ff9fb5", "#e0607f"], ["#ffd34d", "#e8a91c"], ["#f6f1ea", "#d9cfc4"]][spec.seed % 4];+ for (let row = 0; row < 26; row++) {+ const t = row / 25, y = h * (0.46 + Math.pow(t, 1.6) * 0.6), s = h * (0.008 + Math.pow(t, 2) * 0.06);+ for (let x = -s; x < w + s; x += s * (2.2 + r())) {+ const xx = x + (r() - 0.5) * s;+ g.strokeStyle = "#3e6b2c"; g.lineWidth = Math.max(1, s * 0.18); g.beginPath(); g.moveTo(xx, y); g.lineTo(xx, y + s * 2.5); g.stroke();+ const tg = g.createLinearGradient(xx, y - s, xx, y + s); tg.addColorStop(0, cols[0]); tg.addColorStop(1, cols[1]);+ g.fillStyle = tg; g.beginPath(); g.ellipse(xx, y, s * 0.6, s * 0.85, 0, 0, 7); g.fill();+ g.beginPath(); g.moveTo(xx - s * 0.6, y - s * 0.2); g.lineTo(xx - s * 0.3, y - s * 1.05); g.lineTo(xx, y - s * 0.4); g.lineTo(xx + s * 0.3, y - s * 1.05); g.lineTo(xx + s * 0.6, y - s * 0.2); g.fill();+ }+ }+ grain(9);+ } else if (scene === "coffee") {+ // A flat white from above, on a wooden table.+ const wood = ["#8a5a3b", "#a7744f", "#6e4630"][spec.seed % 3];+ g.fillStyle = wood; g.fillRect(0, 0, w, h);+ for (let i = 0; i < 70; i++) { g.strokeStyle = `rgba(${r() < 0.5 ? "40,20,10" : "255,220,180"},${0.05 + r() * 0.08})`; g.lineWidth = 1 + r() * 4; g.beginPath();+ const y = r() * h; g.moveTo(0, y); g.bezierCurveTo(w * 0.3, y + (r() - 0.5) * 30, w * 0.6, y + (r() - 0.5) * 30, w, y + (r() - 0.5) * 20); g.stroke(); }+ const cx = w * (0.42 + r() * 0.16), cy = h * 0.5, R = Math.min(w, h) * 0.3;+ g.shadowColor = "rgba(0,0,0,0.35)"; g.shadowBlur = R * 0.25; g.shadowOffsetY = R * 0.06;+ g.fillStyle = "#f4f1ec"; g.beginPath(); g.arc(cx, cy, R * 1.35, 0, 7); g.fill();+ g.shadowBlur = R * 0.12; g.fillStyle = "#ffffff"; g.beginPath(); g.arc(cx, cy, R, 0, 7); g.fill();+ g.shadowColor = "transparent";+ g.beginPath(); g.ellipse(cx + R * 1.02, cy + R * 0.2, R * 0.32, R * 0.14, 0.4, 0, 7); g.fillStyle = "#f7f4ef"; g.fill();+ const cof = g.createRadialGradient(cx, cy, 0, cx, cy, R * 0.82); cof.addColorStop(0, "#c08a5c"); cof.addColorStop(0.75, "#9a6337"); cof.addColorStop(1, "#5e3517");+ g.fillStyle = cof; g.beginPath(); g.arc(cx, cy, R * 0.82, 0, 7); g.fill();+ // A heart in the foam.+ g.fillStyle = "rgba(250,240,225,0.95)"; g.beginPath();+ const hs = R * 0.36; g.moveTo(cx, cy + hs * 0.9);+ g.bezierCurveTo(cx - hs * 1.6, cy - hs * 0.1, cx - hs * 0.7, cy - hs * 1.2, cx, cy - hs * 0.45);+ g.bezierCurveTo(cx + hs * 0.7, cy - hs * 1.2, cx + hs * 1.6, cy - hs * 0.1, cx, cy + hs * 0.9); g.fill();+ grain(7);+ } else if (scene === "forest") {+ // Pines fading into morning fog.+ sky("#c9d6dc", "#dfe6e6", "#eef0ea");+ for (let k = 0; k < 5; k++) {+ const t = k / 4, base = h * (0.45 + t * 0.14), col = mix("#a9bcbf", "#1d3a30", t), size = h * (0.12 + t * 0.16);+ for (let x = -size; x < w + size; x += size * (0.32 + r() * 0.35)) {+ const top = base - size * (0.7 + r() * 0.6);+ g.fillStyle = col; g.beginPath(); g.moveTo(x, top);+ for (let s = 1; s <= 4; s++) { const yy = top + (base - top) * (s / 4); g.lineTo(x + size * 0.14 * s, yy); g.lineTo(x + size * 0.07 * s, yy); }+ for (let s = 4; s >= 1; s--) { const yy = top + (base - top) * (s / 4); g.lineTo(x - size * 0.07 * s, yy); g.lineTo(x - size * 0.14 * s, yy); }+ g.closePath(); g.fill(); g.fillRect(x - size * 0.6, base - 1, size * 1.2, h);+ }+ const fog = g.createLinearGradient(0, base - size, 0, h); fog.addColorStop(0, "rgba(235,240,238,0)"); fog.addColorStop(1, "rgba(235,240,238,0.55)");+ g.globalAlpha = 1 - t * 0.7; g.fillStyle = fog; g.fillRect(0, 0, w, h); g.globalAlpha = 1;+ }+ glow(w * 0.7, h * 0.15, h * 0.5, "#fffbea", 0.4);+ grain(8);+ } else if (scene === "aurora") {+ sky("#020814", "#071a2c", "#0f2f3c", h * 0.8);+ for (let i = 0; i < 300; i++) { g.fillStyle = `rgba(255,255,255,${r() * 0.8})`; g.fillRect(r() * w, r() * h * 0.6, 1.3, 1.3); }+ g.globalCompositeOperation = "lighter";+ for (let k = 0; k < 4; k++) {+ const y0 = h * (0.25 + k * 0.07), amp = h * 0.1;+ g.shadowColor = k % 2 ? "#5cffb0" : "#46e08c"; g.shadowBlur = h * 0.08;+ g.strokeStyle = `rgba(${k === 3 ? "170,120,255" : "80,240,160"},0.22)`; g.lineWidth = h * (0.05 + r() * 0.05);+ g.beginPath(); g.moveTo(-20, y0);+ g.bezierCurveTo(w * 0.3, y0 - amp * (1 + r()), w * 0.6, y0 + amp * r(), w + 20, y0 - amp * 0.6); g.stroke();+ }+ g.shadowBlur = 0; g.globalCompositeOperation = "source-over";+ ridge(h * 0.7, h * 0.12, "#04101a");+ const water = g.createLinearGradient(0, h * 0.8, 0, h); water.addColorStop(0, "#0b2a30"); water.addColorStop(1, "#02070c");+ g.fillStyle = water; g.fillRect(0, h * 0.82, w, h);+ grain(8);+ } else if (scene === "beach") {+ // Turquoise water meeting the sand, waves foaming in.+ const horizon = h * 0.38;+ sky("#4aa3e8", "#9fd2f5", "#e8f6fd", horizon);+ clouds(5, "rgba(255,255,255,0.95)", h * 0.06, horizon * 0.7);+ const sea = g.createLinearGradient(0, horizon, 0, h * 0.7); sea.addColorStop(0, "#1f6fa8"); sea.addColorStop(0.6, "#2fb3c4"); sea.addColorStop(1, "#7fe0d6");+ g.fillStyle = sea; g.fillRect(0, horizon, w, h);+ const shore = (y, col, amp) => { g.beginPath(); g.moveTo(0, h); for (let x = 0; x <= w; x += 6) g.lineTo(x, y + Math.sin(x / w * 7 + spec.seed) * amp + Math.sin(x / w * 19) * amp * 0.3); g.lineTo(w, h); g.closePath(); g.fillStyle = col; g.fill(); };+ shore(h * 0.66, "rgba(255,255,255,0.85)", h * 0.02);+ shore(h * 0.69, "#f0dcb4", h * 0.02);+ const sand = g.createLinearGradient(0, h * 0.7, 0, h); sand.addColorStop(0, "rgba(240,220,180,0)"); sand.addColorStop(1, "#d9b98a");+ g.fillStyle = sand; g.fillRect(0, h * 0.7, w, h);+ grain(10);+ } else if (scene === "portrait") {+ // A flat illustrated portrait, as people often choose for a contact: a figure on colour.+ const bgs = [["#ffd8c2", "#ffb48f"], ["#cfe6ff", "#9cc8f5"], ["#d9f2d0", "#a8d99a"], ["#efe0ff", "#c9b0f0"], ["#fff1b8", "#f7d36b"], ["#ffd1dc", "#f7a1b6"], ["#cdeff0", "#8fd3d6"]];+ const skins = ["#f6d2b8", "#e8b48f", "#c98b62", "#a86b45", "#7a4a2e", "#f1c6a4"];+ const hairs = ["#2b1d16", "#5a3a22", "#a8643a", "#d9b26a", "#1a1a1a"];+ const shirts = ["#2f6fd6", "#e8594a", "#2f9e6b", "#7b4fd6", "#f2a33a", "#283043", "#e5e1d8"];+ const pick = (a, k) => a[(spec.seed * [1, 5, 3, 3][k] + k) % a.length];+ const bg = pick(bgs, 0), skin = pick(skins, 1), hair = spec.grey ? "#a7a7a7" : pick(hairs, 2), shirt = pick(shirts, 3), style = spec.seed % 4;+ const s = g.createLinearGradient(0, 0, w, h); s.addColorStop(0, bg[0]); s.addColorStop(1, bg[1]); g.fillStyle = s; g.fillRect(0, 0, w, h);+ const cx = w / 2, hy = h * 0.43, rx = w * 0.17, ry = h * 0.2;+ if (style === 1) { g.fillStyle = hair; g.beginPath(); g.roundRect(cx - rx * 1.25, hy - ry * 0.6, rx * 2.5, ry * 2.3, rx * 0.9); g.fill(); }+ g.fillStyle = shirt; g.beginPath(); g.ellipse(cx, h * 1.02, w * 0.36, h * 0.28, 0, 0, 7); g.fill();+ g.fillStyle = mix(skin, "#000000", 0.12); g.fillRect(cx - rx * 0.42, hy + ry * 0.6, rx * 0.84, h * 0.17);+ g.fillStyle = skin; g.beginPath(); g.ellipse(cx, hy, rx, ry, 0, 0, 7); g.fill();+ g.beginPath(); g.ellipse(cx - rx * 0.98, hy + ry * 0.1, rx * 0.16, ry * 0.18, 0, 0, 7); g.ellipse(cx + rx * 0.98, hy + ry * 0.1, rx * 0.16, ry * 0.18, 0, 0, 7); g.fill();+ g.fillStyle = hair;+ if (style === 2) { for (let i = 0; i < 16; i++) { const a = Math.PI * (1.02 + i / 15 * 0.96); g.beginPath(); g.arc(cx + Math.cos(a) * rx * 0.95, hy - ry * 0.12 + Math.sin(a) * ry * 0.95, rx * 0.34, 0, 7); g.fill(); } }+ else { g.beginPath(); g.ellipse(cx, hy - ry * 0.28, rx * 1.06, ry * 0.8, 0, Math.PI * 1.02, Math.PI * 1.98); g.fill();+ g.beginPath(); g.moveTo(cx - rx * 1.04, hy - ry * 0.3); g.quadraticCurveTo(cx - rx * 0.2, hy - ry * 0.15, cx + rx * 0.5, hy - ry * 0.62); g.lineTo(cx + rx * 1.04, hy - ry * 0.3); g.lineTo(cx, hy - ry * 1.08); g.closePath(); g.fill(); }+ if (style === 3) { g.beginPath(); g.arc(cx, hy - ry * 1.12, rx * 0.42, 0, 7); g.fill(); }+ // A face kept simple: eyes, a smile, a little warmth in the cheeks.+ g.fillStyle = "#2a1c18"; for (const d of [-1, 1]) { g.beginPath(); g.ellipse(cx + d * rx * 0.36, hy + ry * 0.12, rx * 0.07, ry * 0.07, 0, 0, 7); g.fill(); }+ g.fillStyle = "rgba(240,110,110,0.22)"; for (const d of [-1, 1]) { g.beginPath(); g.arc(cx + d * rx * 0.55, hy + ry * 0.38, rx * 0.16, 0, 7); g.fill(); }+ g.strokeStyle = "#7a3b2e"; g.lineWidth = w * 0.012; g.lineCap = "round"; g.beginPath(); g.arc(cx, hy + ry * 0.36, rx * 0.26, Math.PI * 0.2, Math.PI * 0.8); g.stroke();+ } else if (scene === "sheet") {+ // A spreadsheet's first page: a title, a table and a small chart.+ g.fillStyle = "#ffffff"; g.fillRect(0, 0, w, h);+ g.fillStyle = "#1f2430"; g.fillRect(w * 0.08, h * 0.06, w * 0.45, h * 0.035);+ const top = h * 0.14, rows = 12, rh = h * 0.032;+ g.fillStyle = "#34a853"; g.fillRect(w * 0.08, top, w * 0.84, rh);+ for (let i = 1; i <= rows; i++) { g.fillStyle = i % 2 ? "#f3f6f4" : "#ffffff"; g.fillRect(w * 0.08, top + i * rh, w * 0.84, rh);+ g.fillStyle = "#9aa0a6"; g.fillRect(w * 0.1, top + i * rh + rh * 0.35, w * (0.18 + r() * 0.1), rh * 0.3);+ g.fillStyle = "#5f6368"; g.fillRect(w * 0.62, top + i * rh + rh * 0.35, w * (0.08 + r() * 0.06), rh * 0.3); g.fillRect(w * 0.8, top + i * rh + rh * 0.35, w * 0.08, rh * 0.3); }+ const cb = top + (rows + 2) * rh;+ for (let i = 0; i < 6; i++) { const bh = h * (0.08 + r() * 0.2); g.fillStyle = ["#34a853", "#4285f4", "#fbbc04"][i % 3]; g.fillRect(w * (0.14 + i * 0.13), cb + h * 0.3 - bh, w * 0.08, bh); }+ g.fillStyle = "#dadce0"; g.fillRect(w * 0.1, cb + h * 0.3, w * 0.8, 2);+ } else if (scene === "slides") {+ // A presentation's title slide.+ const s = g.createLinearGradient(0, 0, w, h); s.addColorStop(0, "#1b2a6b"); s.addColorStop(1, "#4b2d84"); g.fillStyle = s; g.fillRect(0, 0, w, h);+ glow(w * 0.8, h * 0.2, h * 0.7, "#ff8fb1", 0.35);+ g.fillStyle = "#ffffff"; g.fillRect(w * 0.08, h * 0.38, w * 0.56, h * 0.09);+ g.fillStyle = "rgba(255,255,255,0.6)"; g.fillRect(w * 0.08, h * 0.53, w * 0.36, h * 0.04);+ g.fillStyle = "rgba(255,255,255,0.35)"; g.fillRect(w * 0.08, h * 0.82, w * 0.18, h * 0.03);}out[spec.name] = c.toDataURL("image/jpeg", 0.86).split(",")[1];}diff --git a/.uiverify/readme-shots.mjs b/.uiverify/readme-shots.mjsindex 82ea616..fa36d86 100644--- a/.uiverify/readme-shots.mjs+++ b/.uiverify/readme-shots.mjs@@ -6,15 +6,14 @@//// It builds the interface and previews it on PORT (4220) unless something already answers// there. Needs ImageMagick (`magick`) and ffmpeg. PNGs are optimised with pngquant and oxipng-// when installed, or the same engines through `uv`. Optional: the four Unsplash pictures named-// in UNSPLASH below; without them, drawn pictures take their places.+// when installed, or the same engines through `uv`. Every picture is drawn; no photo file is read.import { spawn, execFileSync } from "node:child_process";import fs from "node:fs";import os from "node:os";import path from "node:path";import { chromium } from "playwright";import { SERVICES, installStub, openScreen } from "./stub.mjs";-import { installDemo } from "./readme-fixture.mjs";+import { installDemo, photoLibrary } from "./readme-fixture.mjs";import { drawPictures } from "./readme-pictures.mjs";const ROOT = path.resolve(import.meta.dirname, "..");@@ -28,10 +27,12 @@ const want = (name) => ONLY.size === 0 || ONLY.has(name);// Wednesday, 9:41 in the morning, in a zone the fixture's events are written in.const TZ = "America/Los_Angeles";const NOW = new Date("2026-10-21T09:41:00-07:00");-// Unsplash-licensed abstract pictures (free to use), resized and stripped before use.-const UNSPLASH = ["kunal-patil-2hB-jhXLd3c-unsplash.jpg", "dirk-lach-fSgF4pEQEY8-unsplash.jpg",- "dileepa-nipun-5bakUnqvBo0-unsplash.jpg", "magicpattern-87PP9Zd7MNo-unsplash.jpg"]- .map((f) => path.join(process.env.UNSPLASH_DIR ?? path.join(os.homedir(), "Pictures/Wallpapers"), f));+const LIBRARY = photoLibrary();+// The window: small enough that its text reads at the README's 880 px, wide enough for every+// app's columns. Drawn at 2x, then each still is scaled to WIDTH, twice the README's width.+const WIN = { width: 1200, height: 760 };+const PAD = [44, 40];+const WIDTH = 1760;fs.mkdirSync(OUT, { recursive: true });fs.mkdirSync(WORK, { recursive: true });@@ -50,39 +51,37 @@ if (!(await up())) {const browser = await chromium.launch();-// ---- Pictures: drawn ones, and the Unsplash ones where present.+// ---- Pictures, all drawn: the photo library, Drive's thumbnails, a note's picture, faces.const pictures = new Map();{const page = await browser.newPage();- const scenes = ["lake", "landscape", "sea", "landscape", "dunes", "lake", "bloom", "landscape", "night", "sea"];- const shapes = [[1200, 900], [900, 1200], [1200, 900], [1280, 720], [1200, 900], [900, 1200]];- const specs = Array.from({ length: 54 }, (_, i) => ({ name: `g${i}`, w: shapes[i % 6][0], h: shapes[i % 6][1], scene: scenes[(i * 7) % scenes.length], seed: i + 3 }));- specs.push({ name: "drive/lake", w: 1200, h: 900, scene: "lake", seed: 5 }, { name: "drive/ridge", w: 1200, h: 900, scene: "landscape", seed: 2 },- { name: "drive/fire", w: 1200, h: 900, scene: "fire", seed: 1 }, { name: "drive/dunes", w: 1200, h: 900, scene: "landscape", seed: 3 },- { name: "drive/map", w: 900, h: 1200, scene: "map", seed: 4 }, { name: "drive/plan", w: 900, h: 1200, scene: "page", seed: 6 },- { name: "drive/stars", w: 1200, h: 900, scene: "night", seed: 8 }, { name: "drive/mist", w: 1200, h: 900, scene: "landscape", seed: 4 }, { name: "drive/shore", w: 1200, h: 900, scene: "sea", seed: 6 },- { name: "note/M1", w: 1600, h: 760, scene: "lake", seed: 13 });+ const specs = LIBRARY.map((p) => ({ name: p.id, w: p.w, h: p.h, scene: p.scene, seed: p.seed }));+ const L = [1200, 900], P = [900, 1200];+ for (const [name, [w, h], scene, seed] of [+ ["lakedawn", L, "lake", 5], ["ridge", L, "landscape", 2], ["fire", L, "fire", 1], ["aurora", L, "aurora", 2],+ ["stars", L, "night", 8], ["mist", L, "landscape", 4], ["pines", L, "forest", 3], ["porch", L, "coffee", 2], ["shore", L, "sea", 6],+ ["map", P, "map", 4], ["plan", P, "page", 6], ["packing", P, "page", 9], ["costs", P, "sheet", 3], ["slides", [1280, 720], "slides", 1],+ ["budget", P, "sheet", 5], ["portfolio", P, "page", 2],+ ]) specs.push({ name: `drive/${name}`, w, h, scene, seed });+ specs.push({ name: "note/M1", w: 1600, h: 560, scene: "lake", seed: 13 });+ // Ruth (c10) is the one with grey hair.+ for (let i = 1; i <= 25; i++) specs.push({ name: `face/${i}`, w: 400, h: 400, scene: "portrait", seed: i, grey: i === 10 });for (const [k, v] of Object.entries(await page.evaluate(drawPictures, specs))) pictures.set(k, Buffer.from(v, "base64"));await page.close();- // Four of the library's spots go to the Unsplash pictures, small and without metadata.- UNSPLASH.forEach((file, i) => {- if (!fs.existsSync(file)) return;- const small = path.join(WORK, `unsplash-${i}.jpg`);- if (!fs.existsSync(small)) sh("magick", [file, "-strip", "-resize", "1200x1200>", "-quality", "84", small]);- pictures.set(`g${[1, 6, 14, 23][i]}`, fs.readFileSync(small));- });}+// pic/<id>/<size>, note/<id>/<part>, drive/<name>, photo/<contact>?v=…const pictureFor = (p) => {- // pic/<id>/<size>, note/<id>/<part>, drive/<name>- const parts = p.split("/");+ const parts = p.replace(/\?.*$/, "").split("/");if (parts[0] === "pic") return pictures.get(parts[1]);if (parts[0] === "note") return pictures.get(`note/${parts[1]}`);if (parts[0] === "drive") return pictures.get(p);+ // A contact's face: the portrait numbered as the card is (c13, face/13).+ if (parts[0] === "photo") return pictures.get(`face/${parts[1].replace(/^c/, "")}`);return null;};/** A window of the app on the demo library, at `scale`, in `scheme`. */-async function open({ scheme = "light", scale = 2, width = 1280, height = 800, screen = "library", cursor = false, storage = {} } = {}) {+async function open({ scheme = "light", scale = 2, width = WIN.width, height = WIN.height, screen = "library", cursor = false, storage = {} } = {}) {const ctx = await browser.newContext({ viewport: { width, height }, deviceScaleFactor: scale, colorScheme: scheme,timezoneId: TZ, locale: "en-US", reducedMotion: "no-preference" });await ctx.clock.setFixedTime(NOW);@@ -90,7 +89,7 @@ async function open({ scheme = "light", scale = 2, width = 1280, height = 800, sconst body = pictureFor(decodeURIComponent(route.request().url().slice(PICS.length + 1)));return body ? route.fulfill({ body, contentType: "image/jpeg" }) : route.fulfill({ status: 404, body: "" });});- await ctx.addInitScript(installDemo, { picBase: PICS, tz: TZ });+ await ctx.addInitScript(installDemo, { picBase: PICS, tz: TZ, library: LIBRARY });await ctx.addInitScript(installStub, { screen, services: SERVICES, twoFactor: null, notesFixture: true, calendarFixture: true,remindersFixture: true, contactsFixture: true, driveFixture: true, demoFixture: true });await ctx.addInitScript((s) => { try { for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } catch {} }, storage);@@ -102,6 +101,16 @@ async function open({ scheme = "light", scale = 2, width = 1280, height = 800, sreturn { ctx, page };}+/** Until every picture in view is drawn and the fonts are in: never a half-loaded still. */+async function settled(page, ms = 400) {+ await page.evaluate(() => document.fonts.ready);+ await page.waitForFunction(() => [...document.querySelectorAll("img")].every((i) => {+ const r = i.getBoundingClientRect();+ return r.width === 0 || r.bottom < 0 || r.top > innerHeight || (i.complete && i.naturalWidth > 0);+ }), null, { timeout: 15000 }).catch(() => console.log("some pictures still loading"));+ await page.waitForTimeout(ms);+}+/** A pointer drawn into the page, for the animation: a screencast shows no cursor of its own. */function fakeCursor() {addEventListener("DOMContentLoaded", () => {@@ -122,6 +131,8 @@ const SCENES = {},reminders: async (page) => {await openScreen(page, "Reminders");+ await page.waitForTimeout(500);+ await page.locator(".rx").getByText("Cabin Weekend", { exact: true }).first().click();await page.waitForTimeout(700);},calendar: async (page) => {@@ -143,19 +154,14 @@ const SCENES = {drive: async (page) => {await openScreen(page, "Drive");await page.waitForTimeout(400);- await page.locator(".drive").getByText("Cabin Weekend", { exact: true }).first().dblclick();+ await page.locator(".drive").getByText("Summer at the Lake", { exact: true }).first().dblclick();await page.waitForTimeout(1200);- await page.mouse.click(5, 795);+ await page.mouse.click(5, WIN.height - 5);},photos: async (page) => {await page.locator(".nav-item", { hasText: "Photos" }).click();await page.waitForTimeout(1800);- // Every tile in view drawn, not a grey placeholder still waiting on its picture.- await page.waitForFunction(() => [...document.querySelectorAll("img")].every((i) => {- const r = i.getBoundingClientRect();- return r.bottom < 0 || r.top > innerHeight || (i.complete && i.naturalWidth > 0);- }), null, { timeout: 15000 }).catch(() => console.log("photos: some tiles still loading"));- await page.waitForTimeout(5000);+ await settled(page, 3000);},settings: async (page) => {await page.locator(".sidebar-account").click();@@ -165,7 +171,7 @@ const SCENES = {};/** The window, framed: rounded, shadowed, on a soft wash of Skykeep's blue. */-async function frame(rawPng, scheme, { pad = [76, 64] } = {}) {+async function frame(rawPng, scheme, { pad = PAD } = {}) {const meta = await sizeOf(rawPng);const scale = 2;const w = meta.w / scale, h = meta.h / scale;@@ -203,10 +209,10 @@ async function sizeOf(png) {return { w, h };}-/** A PNG for the README, 1600 px wide (sharp at the README's 880), stripped and optimised. */+/** A PNG for the README, WIDTH px wide (sharp at the README's 880 on a 2x screen), stripped and optimised. */function publish(framed, name) {const png = path.join(OUT, `${name}.png`);- sh("magick", [framed, "-strip", "-resize", "1600x", "-define", "png:compression-level=9", `PNG24:${png}`]);+ sh("magick", [framed, "-strip", "-filter", "Lanczos", "-resize", `${WIDTH}x`, "-define", "png:compression-level=9", `PNG24:${png}`]);optimise(png);console.log(`${path.relative(ROOT, png)} ${Math.round(fs.statSync(png).size / 1024)} KB`);}@@ -234,6 +240,7 @@ for (const [scene, schemes] of Object.entries(stills)) {for (const scheme of schemes) {const { ctx, page } = await open({ scheme, storage: { "quince.drive.view": "grid" } });await SCENES[scene](page);+ await settled(page);const raw = path.join(WORK, `${scene}-${scheme}.raw.png`);await page.screenshot({ path: raw });await ctx.close();diff --git a/README.md b/README.mdindex 6419e19..84bd02a 100644--- a/README.md+++ b/README.md@@ -26,7 +26,7 @@ Notes, Reminders, Calendar, Contacts, Drive and Photos as fast desktop apps that<picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/notes-dark.png">- <img src="docs/media/notes-light.png" alt="Skykeep Notes showing a trip note with a picture, a checklist and a table" width="880">+ <img src="docs/media/notes-light.png" alt="Skykeep Notes showing folders, pinned notes and a trip note with a tag, a link, a picture, a checklist and a table" width="880"></picture></div>@@ -38,14 +38,14 @@ Notes, Reminders, Calendar, Contacts, Drive and Photos as fast desktop apps that<td width="50%" align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/reminders-dark.png">- <img src="docs/media/reminders-light.png" alt="Skykeep Reminders showing Today with coloured lists, priorities and flags">+ <img src="docs/media/reminders-light.png" alt="Skykeep Reminders showing a list with sections, subtasks, flags, tags, a link and a place, beside coloured lists and smart lists"></picture><b>Reminders</b></td><td width="50%" align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/calendar-dark.png">- <img src="docs/media/calendar-light.png" alt="Skykeep Calendar in week view with events from four calendars">+ <img src="docs/media/calendar-light.png" alt="Skykeep Calendar in week view with events from four calendars, an all-day trip, a birthday and reminders"></picture><b>Calendar</b></td>@@ -54,14 +54,14 @@ Notes, Reminders, Calendar, Contacts, Drive and Photos as fast desktop apps that<td width="50%" align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/contacts-dark.png">- <img src="docs/media/contacts-light.png" alt="Skykeep Contacts showing a contact card with phones, emails and an address">+ <img src="docs/media/contacts-light.png" alt="Skykeep Contacts showing contacts with photos and a full card with phones, emails, related names, an address and a birthday"></picture><b>Contacts</b></td><td width="50%" align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/drive-dark.png">- <img src="docs/media/drive-light.png" alt="Skykeep Drive showing a folder of pictures in grid view">+ <img src="docs/media/drive-light.png" alt="Skykeep Drive showing a folder of pictures and documents with thumbnails in grid view"></picture><b>iCloud Drive</b></td>@@ -70,7 +70,7 @@ Notes, Reminders, Calendar, Contacts, Drive and Photos as fast desktop apps that<td width="50%" align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/media/photos-dark.png">- <img src="docs/media/photos-light.png" alt="Skykeep Photos showing the library by month">+ <img src="docs/media/photos-light.png" alt="Skykeep Photos showing the library by month with favourites, videos and albums"></picture><b>Photos</b></td>diff --git a/docs/media/README.md b/docs/media/README.mdindex 9b227c3..226027e 100644--- a/docs/media/README.md+++ b/docs/media/README.md@@ -8,23 +8,23 @@ node .uiverify/readme-shots.mjs notes calendar # only those scenesPORT=4330 node .uiverify/readme-shots.mjs # preview on another port```-Needs ImageMagick and ffmpeg. PNGs are written 1600 px wide, stripped, and optimised with pngquant and oxipng when installed, or the same engines through `uv`.+Needs ImageMagick and ffmpeg. Each still is a 1200 × 760 window drawn at 2x, framed, then written 1760 px wide (sharp at the README's 880 on a 2x screen), stripped, and optimised with pngquant and oxipng when installed, or the same engines through `uv`. The script waits for fonts and every picture in view before it takes a still.## Files| File | Shows ||---|---|-| `notes-light.png`, `notes-dark.png` | A note with a picture, a checklist and a table |-| `reminders-light.png`, `reminders-dark.png` | Today, with coloured lists, priorities and flags |-| `calendar-light.png`, `calendar-dark.png` | A week with four calendars, reminders and a birthday |-| `contacts-light.png`, `contacts-dark.png` | A full contact card and lists |-| `drive-light.png`, `drive-dark.png` | A folder in grid view with thumbnails |-| `photos-light.png`, `photos-dark.png` | The library by month, with a video and favourites |+| `notes-light.png`, `notes-dark.png` | Folders, pinned notes, and a note with a #tag, a link, a picture, a checklist and a table |+| `reminders-light.png`, `reminders-dark.png` | A list with sections, subtasks, a priority, flags, tags, a link and a place; smart lists and tags beside it |+| `calendar-light.png`, `calendar-dark.png` | A week with four calendars, an all-day trip, a birthday and reminders |+| `contacts-light.png`, `contacts-dark.png` | Contacts with photos, lists, and a full card with related names |+| `drive-light.png`, `drive-dark.png` | A folder in grid view with picture and document thumbnails |+| `photos-light.png`, `photos-dark.png` | The library by month, with videos, favourites and albums || `settings-light.png`, `settings-dark.png` | Account, storage and sync || `signin-light.png`, `signin-dark.png` | Signing in with a demo Apple Account |## Rules for every image- **Demo data only.** Invented names, `example.com` emails and 555-01xx phone numbers. Nothing real from anyone's library, no school or workplace names.-- **Pictures** are drawn by the harness, plus four Unsplash images from the harness's `UNSPLASH` list, resized with metadata stripped. Never a personal photo.+- **Pictures** are all drawn by the harness (`readme-pictures.mjs`): photos, thumbnails, the note's picture and the contacts' illustrated portraits. No photo file is read. Never a personal photo.- Look over every frame before committing: sidebars, avatars, toasts and window titles.diff --git a/docs/media/calendar-dark.png b/docs/media/calendar-dark.pngindex a647ca7..83ca4b0 100644Binary files a/docs/media/calendar-dark.png and b/docs/media/calendar-dark.png differdiff --git a/docs/media/calendar-light.png b/docs/media/calendar-light.pngindex 4a1fb71..6cff1ee 100644Binary files a/docs/media/calendar-light.png and b/docs/media/calendar-light.png differdiff --git a/docs/media/contacts-dark.png b/docs/media/contacts-dark.pngindex 7ac841a..9bb2d16 100644Binary files a/docs/media/contacts-dark.png and b/docs/media/contacts-dark.png differdiff --git a/docs/media/contacts-light.png b/docs/media/contacts-light.pngindex 3c4ac87..680cf0f 100644Binary files a/docs/media/contacts-light.png and b/docs/media/contacts-light.png differdiff --git a/docs/media/drive-dark.png b/docs/media/drive-dark.pngindex ebaf4c7..787d508 100644Binary files a/docs/media/drive-dark.png and b/docs/media/drive-dark.png differdiff --git a/docs/media/drive-light.png b/docs/media/drive-light.pngindex 1680757..abc4e77 100644Binary files a/docs/media/drive-light.png and b/docs/media/drive-light.png differdiff --git a/docs/media/notes-dark.png b/docs/media/notes-dark.pngindex 2dc499d..a930760 100644Binary files a/docs/media/notes-dark.png and b/docs/media/notes-dark.png differdiff --git a/docs/media/notes-light.png b/docs/media/notes-light.pngindex 46e7108..be188b0 100644Binary files a/docs/media/notes-light.png and b/docs/media/notes-light.png differdiff --git a/docs/media/photos-dark.png b/docs/media/photos-dark.pngindex 2419005..5caf7c9 100644Binary files a/docs/media/photos-dark.png and b/docs/media/photos-dark.png differdiff --git a/docs/media/photos-light.png b/docs/media/photos-light.pngindex 0394353..a0bd1ce 100644Binary files a/docs/media/photos-light.png and b/docs/media/photos-light.png differdiff --git a/docs/media/reminders-dark.png b/docs/media/reminders-dark.pngindex 2d62032..b564a7f 100644Binary files a/docs/media/reminders-dark.png and b/docs/media/reminders-dark.png differdiff --git a/docs/media/reminders-light.png b/docs/media/reminders-light.pngindex 532d3ba..dee0940 100644Binary files a/docs/media/reminders-light.png and b/docs/media/reminders-light.png differdiff --git a/docs/media/settings-dark.png b/docs/media/settings-dark.pngindex 5c7a863..b807e0d 100644Binary files a/docs/media/settings-dark.png and b/docs/media/settings-dark.png differdiff --git a/docs/media/settings-light.png b/docs/media/settings-light.pngindex 6a9a0b8..9c0e76a 100644Binary files a/docs/media/settings-light.png and b/docs/media/settings-light.png differdiff --git a/docs/media/signin-dark.png b/docs/media/signin-dark.pngindex e711097..520675e 100644Binary files a/docs/media/signin-dark.png and b/docs/media/signin-dark.png differdiff --git a/docs/media/signin-light.png b/docs/media/signin-light.pngindex 00dc1aa..9189438 100644Binary files a/docs/media/signin-light.png and b/docs/media/signin-light.png differ