Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

feat(website): build the landing page around the editor

Etienne Lescot2d71b3c04a41
diff --git a/website/src/components/Editor/index.tsx b/website/src/components/Editor/index.tsx
new file mode 100644
index 000000000..b2ddbc6dd
--- /dev/null
+++ b/website/src/components/Editor/index.tsx
@@ -0,0 +1,42 @@
+/**
+ * The page's centre of gravity: a heading, and then six viewports of editor.
+ *
+ * It sits immediately under the hero because it is the argument. Everything
+ * after it is either a claim the editor cannot make on its own (the recorder,
+ * the encoder, captions, the agent) or a property rather than a capability
+ * (the licence, the privacy, the platforms).
+ *
+ * The heading keeps the page's measure; the recreation does not, and is the one
+ * block on this page that uses the whole viewport.
+ */
+
+import Heading from "@theme/Heading";
+
+import Recreation from "../Recreation";
+import styles from "./styles.module.css";
+
+export default function Editor() {
+ return (
+ <section className={styles.section} aria-labelledby="editor-title">
+ <div className={styles.head}>
+ {/* The band is six viewports tall. Tabbing through it to reach the
+ download link is a long way to go for someone who has already
+ decided. */}
+ <a className={styles.skip} href="#download-install">
+ Skip the editor — go to downloads
+ </a>
+
+ <p className={styles.kicker}>the editor</p>
+ <Heading as="h2" id="editor-title" className={styles.title}>
+ Six things you will actually do.
+ </Heading>
+ <p className={styles.deck}>
+ Scroll to drive it. Nothing below is a video: it is the editor, redrawn live in your
+ browser from the design tokens the app ships and the project file of one real session.
+ </p>
+ </div>
+
+ <Recreation />
+ </section>
+ );
+}
diff --git a/website/src/components/Editor/styles.module.css b/website/src/components/Editor/styles.module.css
new file mode 100644
index 000000000..19fb059e1
--- /dev/null
+++ b/website/src/components/Editor/styles.module.css
@@ -0,0 +1,91 @@
+/**
+ * The heading keeps the page's 1096px measure. The recreation below it does not
+ * — it is a direct child of the section rather than of `.head`, which is the
+ * whole reason the section has no horizontal padding of its own.
+ */
+
+.section {
+ /* Explicit: the dark-theme document canvas resolves to Infima's own #1b1b1d,
+ and `html, body { height: 100% }` means the body paints only the first
+ viewport — so a section without a background sits on the wrong grey. */
+ background: var(--os-bg);
+ color: var(--os-fg);
+ /* The hero has no bottom padding of its own — it used to hand straight over
+ to a plate section that supplied its own. This is that air. */
+ padding: 104px 0 8px;
+}
+
+/* Centred, like every other section heading on the page.
+ *
+ * Left-aligned it introduced a third x-origin: the hero is centred, the
+ * recreation's captions sit at 5% of the full-bleed stage, and a heading on the
+ * 1096px measure landed between the two — near enough to the caption 200px
+ * below it to read as a failed alignment rather than a different one. Aligning
+ * the heading to the caption instead is not available: the caption has to stay
+ * near the left edge, or at 1920px it runs into the composite. */
+.head {
+ position: relative;
+ max-width: 1096px;
+ margin: 0 auto;
+ padding: 0 28px 34px;
+ text-align: center;
+}
+
+.kicker {
+ margin: 0;
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 11px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--os-accent);
+}
+
+.title {
+ margin: 10px 0 0;
+ font-size: clamp(26px, 3.2vw, 36px);
+ font-weight: 700;
+ letter-spacing: -0.025em;
+ color: var(--os-fg-emphasis);
+}
+
+.deck {
+ margin: 12px auto 0;
+ max-width: 62ch;
+ font-size: 14.5px;
+ line-height: 1.6;
+ color: var(--os-fg-2);
+}
+
+/* Visible only on focus. */
+.skip {
+ position: absolute;
+ left: 28px;
+ top: 0;
+ transform: translateY(-140%);
+ padding: 9px 14px;
+ border-radius: 9px;
+ border: 1px solid var(--os-accent-border);
+ background: var(--os-surface-1);
+ color: var(--os-fg-emphasis);
+ font-size: 13px;
+ font-weight: 600;
+ opacity: 0;
+ pointer-events: none;
+}
+
+.skip:focus,
+.skip:focus-visible {
+ transform: none;
+ opacity: 1;
+ pointer-events: auto;
+}
+
+@media (max-width: 600px) {
+ .head {
+ padding: 0 18px 24px;
+ }
+
+ .skip {
+ left: 18px;
+ }
+}
diff --git a/website/src/components/Recreation/scene.ts b/website/src/components/Recreation/scene.ts
index a9f54b491..6f7329b57 100644
--- a/website/src/components/Recreation/scene.ts
+++ b/website/src/components/Recreation/scene.ts
@@ -46,7 +46,11 @@ import { CONTROLS, EFFECTS, META, PILLS, STAGE, WORDS } from "./generated";
* that happens under a caption that is still up.
*/
export const BEATS = [
- { id: "background", from: 0.6, to: 4.15 },
+ // From zero, not from a settling beat. The band's first screen is visible
+ // under the heading before anyone has scrolled into it, and a beat table that
+ // starts late renders that screen as an empty stage — the one frame every
+ // reader is guaranteed to see.
+ { id: "background", from: 0, to: 4.15 },
{ id: "padding", from: 4.15, to: 7.5 },
{ id: "cursor", from: 7.5, to: 11.0 },
{ id: "autozoom", from: 11.0, to: 15.3 },
diff --git a/website/src/components/Recreation/styles.module.css b/website/src/components/Recreation/styles.module.css
index aa4aea5d6..3785a339b 100644
--- a/website/src/components/Recreation/styles.module.css
+++ b/website/src/components/Recreation/styles.module.css
@@ -188,6 +188,33 @@
.scene {
display: none;
}
+
+ /* "The editor above is redrawn in your browser…" — there is no editor above
+ at this width. A caption for a picture that was not drawn is worse than no
+ caption. */
+ .figcaption {
+ display: none;
+ }
+
+ /* Six claims in a column want to read as a list, not as six sections. The
+ pinned layout gives each one a whole viewport and can afford a 34px claim;
+ stacked, that size turns the fallback into a wall. */
+ .captions {
+ gap: 26px;
+ }
+
+ .capClaim {
+ font-size: 21px;
+ letter-spacing: -0.015em;
+ }
+
+ .capBody {
+ font-size: 13.5px;
+ }
+
+ .capFact {
+ font-size: 11px;
+ }
}
@supports not (position: sticky) {
@@ -219,6 +246,10 @@
.scene {
display: none;
}
+
+ .figcaption {
+ display: none;
+ }
}
/* Forced colors cannot carry any of the tokens above, and a recreation drawn in
@@ -228,6 +259,10 @@
.scene {
display: none;
}
+
+ .figcaption {
+ display: none;
+ }
}
/* Reduced motion keeps the picture and gives up the ride.
diff --git a/website/src/components/Showcase/content.ts b/website/src/components/Showcase/content.ts
new file mode 100644
index 000000000..c7febb0cc
--- /dev/null
+++ b/website/src/components/Showcase/content.ts
@@ -0,0 +1,104 @@
+/**
+ * Everything the page says after the editor has finished demonstrating itself.
+ *
+ * The scroll-driven editor above this section is where the product is argued:
+ * six settings, shown working, on a real project file. That leaves this section
+ * a narrower job — the parts of the app the editor is not — and the job is done
+ * badly by repeating the same treatment four more times.
+ *
+ * So the split here is deliberate and it is editorial, not technical:
+ *
+ * A photograph earns its place when the claim is about something you have to
+ * SEE to believe. Captions are type rendered over video, and the agent's reply
+ * is prose with real timecodes in it; a paragraph describing either one is
+ * asking to be taken on trust when the evidence was cheap to show.
+ *
+ * Recording and exporting are settings and a progress bar. A screenshot of a
+ * format dropdown proves nothing a sentence does not, costs a request and a
+ * place in the reader's attention, and pads a page whose whole argument is
+ * that this application is quick. They are text, and the specification line
+ * under each is doing the work the screenshot would have pretended to.
+ *
+ * If a claim here ever needs an image to be believed, the claim is the thing to
+ * fix first.
+ */
+
+const IMG = "/img/walkthrough";
+
+export type Shown = {
+ id: string;
+ kicker: string;
+ claim: string;
+ body: string;
+ fact: string;
+ /** Layout only — the copy stays first in the DOM either way. */
+ flip?: boolean;
+ media: {
+ image: string;
+ imageSm: string;
+ /** Both are needed on the `<img>` or the page reflows when it lands;
+ * `aspect-ratio` alone loses Safari 14. */
+ width: number;
+ height: number;
+ alt: string;
+ };
+};
+
+export type Told = {
+ id: string;
+ kicker: string;
+ claim: string;
+ body: string;
+ fact: string;
+};
+
+/** The two worth a photograph. */
+export const SHOWN: Shown[] = [
+ {
+ id: "captions",
+ kicker: "captions",
+ claim: "Transcription runs on your machine.",
+ body: "whisper.cpp ships with the app, and the model downloads once on first use — after that it works with the network off. The audio never leaves the laptop, and what comes back is editable text: set the typeface, the size, the colour and the position, then burn it into the render.",
+ fact: "whisper.cpp · 13 languages · offline after first run",
+ media: {
+ image: `${IMG}/03-captions-a.jpg`,
+ imageSm: `${IMG}/03-captions-sm-a.jpg`,
+ width: 960,
+ height: 540,
+ alt: "A caption line reading “amber day on the validator, and it” rendered large over the video, with the Captions panel open beside it: captions switched on, a note that fifteen caption lines were derived live from the transcript, a language row offering the original transcript or a translation, and the type controls — typeface, bold, size, colour — that are setting how the line above is drawn.",
+ },
+ },
+ {
+ id: "agent",
+ kicker: "agent",
+ claim: "Or say which parts to cut.",
+ body: "The wizard further up this page places zooms by watching where your cursor went. The agent goes further: it reads the actual transcript and the actual timeline, so it answers with timecodes you can go and check — which spans it will cut, and how much that saves. Every edit it makes is an ordinary undoable one, and it needs a provider key you supply. Nothing runs until you connect one.",
+ fact: "bring your own key · off by default · every edit is undoable",
+ flip: true,
+ media: {
+ image: `${IMG}/04-agent-a.jpg`,
+ imageSm: `${IMG}/04-agent-sm-a.jpg`,
+ width: 960,
+ height: 540,
+ alt: "The agent's reply in the chat panel, quoting the transcript back with timecodes: the only silences over a second were at the two ends, 0–2.19s of dead lead-in before “Hi” and 35.12–40.03s of dead tail after “think.”, both cut, taking the video about seven seconds shorter — from 40.0s to 33.0s of playable footage — with a note that the existing zooms stay anchored to the same moments, and a green line underneath reading “applied: added 2 trims”.",
+ },
+ },
+];
+
+/** The two that are a sentence and a specification, and nothing more. */
+export const TOLD: Told[] = [
+ {
+ id: "record",
+ kicker: "record",
+ claim: "It records with the operating system, not around it.",
+ body: "Pick a window or a display. macOS goes through ScreenCaptureKit and Windows through Windows Graphics Capture — the same capture path the system uses itself. The pointer is recorded as data rather than burned into the pixels, which is the only reason you could restyle it further up this page.",
+ fact: "ScreenCaptureKit on macOS · Windows Graphics Capture · system audio without an extra driver",
+ },
+ {
+ id: "export",
+ kicker: "export",
+ claim: "Then it writes the file.",
+ body: "MP4 from 720p up to source, at 24, 30 or 60, in H.264 or H.265 — or a GIF. The encode runs on your machine and counts frames while it does. No queue, no account, no watermark, and the file is on disk when the bar fills.",
+ fact: "H.264 / H.265 · 24, 30, 60 fps · no watermark",
+ },
+];
diff --git a/website/src/components/Showcase/index.tsx b/website/src/components/Showcase/index.tsx
new file mode 100644
index 000000000..1f95e38e4
--- /dev/null
+++ b/website/src/components/Showcase/index.tsx
@@ -0,0 +1,74 @@
+/**
+ * What the app is besides the editor: the recorder in front of it, the encoder
+ * behind it, and the two features that are easier to show than to describe.
+ *
+ * Two treatments, and which one a claim gets is the editorial decision recorded
+ * in `content.ts`. Nothing here plays: the page has one moving thing on it and
+ * it is the editor above, which is the point of having built it.
+ */
+
+import Heading from "@theme/Heading";
+
+import { SHOWN, TOLD } from "./content";
+import styles from "./styles.module.css";
+
+export default function Showcase() {
+ return (
+ <section className={styles.section} aria-labelledby="showcase-title">
+ <div className={styles.inner}>
+ <p className={styles.kicker}>also in the box</p>
+ <Heading as="h2" id="showcase-title" className={styles.title}>
+ Recorder, captions, agent, encoder.
+ </Heading>
+
+ {/* The two sentences first: they are the pipeline the editor sits in
+ the middle of, and they read in seconds. */}
+ <div className={styles.told}>
+ {TOLD.map((item) => (
+ <article key={item.id} id={item.id} className={styles.toldCard}>
+ <p className={styles.itemKicker}>{item.kicker}</p>
+ <h3 className={styles.claim}>{item.claim}</h3>
+ <p className={styles.body}>{item.body}</p>
+ <p className={styles.fact}>{item.fact}</p>
+ </article>
+ ))}
+ </div>
+
+ {SHOWN.map((item) => (
+ <article
+ key={item.id}
+ id={item.id}
+ className={`${styles.band} ${item.flip ? styles.flip : ""}`}
+ >
+ <div className={styles.copy}>
+ <p className={styles.itemKicker}>{item.kicker}</p>
+ <h3 className={styles.claim}>{item.claim}</h3>
+ <p className={styles.body}>{item.body}</p>
+ <p className={styles.fact}>{item.fact}</p>
+ </div>
+ <figure className={styles.figure}>
+ <div
+ className={styles.frame}
+ style={{ aspectRatio: `${item.media.width} / ${item.media.height}` }}
+ >
+ <picture>
+ <source media="(max-width: 780px)" srcSet={item.media.imageSm} />
+ <img
+ className={styles.still}
+ src={item.media.image}
+ width={item.media.width}
+ height={item.media.height}
+ loading="lazy"
+ decoding="async"
+ alt={item.media.alt}
+ />
+ </picture>
+ </div>
+ <figcaption className={styles.caption}>A frame of the running application</figcaption>
+ </figure>
+ </article>
+ ))}
+ </div>
+ </section>
+ );
+}
diff --git a/website/src/components/Showcase/styles.module.css b/website/src/components/Showcase/styles.module.css
new file mode 100644
index 000000000..ebcc5b859
--- /dev/null
+++ b/website/src/components/Showcase/styles.module.css
@@ -0,0 +1,207 @@
+/**
+ * Two treatments, one measure.
+ *
+ * Carried over from the section this replaces, minus everything that existed to
+ * run video: no rail, no replay control, no reduced-motion result swap, no
+ * `.clip` layer. There are no clips left on this page — the editor above is the
+ * only thing that moves — so the markup those rules styled is gone and the rules
+ * went with it.
+ */
+
+.section {
+ /* Explicit: the dark-theme document canvas resolves to Infima's own #1b1b1d,
+ and `html, body { height: 100% }` means the body paints only the first
+ viewport — so a section without a background sits on the wrong grey. */
+ background: var(--os-bg);
+ color: var(--os-fg);
+ padding: 96px 0 104px;
+}
+
+.inner {
+ max-width: 1096px;
+ margin: 0 auto;
+ padding: 0 28px;
+}
+
+/* The heading is centred like the page's other section headings; the items
+ under it are not, because each one is a claim beside a picture. */
+.kicker,
+.title {
+ text-align: center;
+}
+
+.kicker {
+ margin: 0;
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 11px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--os-accent);
+}
+
+.title {
+ margin: 10px 0 0;
+ font-size: clamp(24px, 3vw, 32px);
+ font-weight: 700;
+ letter-spacing: -0.02em;
+ color: var(--os-fg-emphasis);
+}
+
+/* ---- told ----
+ Two cards, same chrome and radius as the install panes. A bordered card
+ rather than bare prose: without an image beside it, a claim needs an edge or
+ it reads as a caption that lost its picture. */
+
+.told {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 16px;
+ margin-top: 36px;
+}
+
+.toldCard {
+ padding: 26px;
+ border-radius: 14px;
+ border: 1px solid var(--os-border);
+ background: var(--os-surface-1);
+ box-shadow: var(--os-elev-card);
+}
+
+/* ---- shown ---- */
+
+.band {
+ display: grid;
+ grid-template-columns: 360px 1fr;
+ gap: 40px;
+ align-items: center;
+ margin-top: 72px;
+ /* The navbar is 60px and sticky; without this an anchor jump parks the
+ band's heading underneath it. */
+ scroll-margin-top: 76px;
+}
+
+/* Assigning columns and rows, not `order`: the tracks are asymmetric
+ (360px + 1fr), and reordering auto-placed items moves the plate into the
+ narrow track instead of swapping the two sides. Pinning only the column is
+ not enough either — auto-placement refuses to go backwards, so the figure
+ drops to a second row and the band silently becomes two stacked halves. The
+ DOM keeps the copy first either way, so reading order never depends on it. */
+.flip {
+ grid-template-columns: 1fr 360px;
+}
+
+.flip .copy {
+ grid-column: 2;
+ grid-row: 1;
+}
+
+.flip .figure {
+ grid-column: 1;
+ grid-row: 1;
+}
+
+/* ---- copy, shared by both treatments ---- */
+
+.itemKicker {
+ margin: 0;
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 11px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--os-muted);
+}
+
+.claim {
+ margin: 14px 0 0;
+ font-size: 19px;
+ font-weight: 600;
+ line-height: 1.35;
+ letter-spacing: -0.01em;
+ color: var(--os-fg-emphasis);
+}
+
+.body {
+ margin: 12px 0 0;
+ font-size: 13.5px;
+ line-height: 1.65;
+ color: var(--os-fg-2);
+}
+
+.fact {
+ margin: 16px 0 0;
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 11px;
+ line-height: 1.65;
+ color: var(--os-muted);
+}
+
+/* ---- the picture ---- */
+
+.figure {
+ margin: 0;
+}
+
+.frame {
+ position: relative;
+ overflow: hidden;
+ border-radius: 14px;
+ border: 1px solid var(--os-border);
+ background: var(--os-surface-1);
+ box-shadow: var(--os-elev-card);
+}
+
+.still {
+ display: block;
+ width: 100%;
+ height: auto;
+}
+
+.caption {
+ margin: 10px 2px 0;
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 11px;
+ color: var(--os-muted);
+}
+
+/* ---- narrow ---- */
+
+@media (max-width: 900px) {
+ .section {
+ padding-top: 72px;
+ }
+
+ .told {
+ grid-template-columns: 1fr;
+ }
+
+ .band,
+ .flip {
+ grid-template-columns: 1fr;
+ gap: 22px;
+ margin-top: 56px;
+ }
+
+ /* The explicit placement above has to be undone with it, or the single
+ column inherits `grid-column: 2` and collapses to nothing. */
+ .flip .copy,
+ .flip .figure {
+ grid-column: 1;
+ grid-row: auto;
+ }
+}
+
+@media (max-width: 600px) {
+ .inner {
+ padding: 0 18px;
+ }
+
+ .toldCard {
+ padding: 20px;
+ }
+}
+
+@media print {
+ .section {
+ padding: 24px 0;
+ }
+}
diff --git a/website/src/components/Walkthrough/bands.ts b/website/src/components/Walkthrough/bands.ts
deleted file mode 100644
index 7dc052a98..000000000
--- a/website/src/components/Walkthrough/bands.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * The walkthrough's content, in one file.
- *
- * Every claim on this page is illustrated by a frame of the real application,
- * never by a drawing of it. That is the whole point of the section: the page it
- * replaced was 54 divs imitating an interface, including a made-up timecode and
- * a grey gradient standing in for video.
- *
- * It also has to hold under `video, img { display: none }`. The clips carry no
- * sound and no narration, so they owe no captions and no transcript — they take
- * WCAG 1.2.1's "media alternative for text" exemption, and the exemption is only
- * earned as long as the prose below says everything the footage says. Read the
- * page with the media hidden before changing a word of it.
- */
-
-export type BandMedia = {
- /** Shown before anything plays. The clip's own first frame, where there is a clip. */
- image: string;
- imageSm: string;
- /** The clip's last frame — the outcome. Shown after it plays, and instead of it
- * under reduced motion, so a reader who never sees motion still sees the result. */
- result?: string;
- resultSm?: string;
- clip?: string;
- clipSm?: string;
- /**
- * The scroll-driven rendition, where one exists.
- *
- * A different encode of the same footage, not the same file: scrubbing seeks
- * rather than plays, and a seek into a long GOP has to decode from the
- * preceding keyframe, so the shipped `clip` (`-g 60`) stutters under a
- * scrollwheel. These are all-intra — every frame its own keyframe — which
- * makes a seek exact and cheap and costs 8.4x the bytes at 30fps. Measured on
- * the export beat: 32 KB at -g 60, 402 KB all-intra. Dropping to 20fps takes
- * that to 268 KB, and 20fps is more than a scroll can resolve: a beat spans
- * roughly a viewport and a half of scrolling, so a frame lands every ~15px.
- */
- scrub?: {
- clip: string;
- clipSm: string;
- seconds: number;
- frames: number;
- };
- /** Intrinsic size of the desktop asset. Both are needed on the <img> or the
- * page reflows when it lands; `aspect-ratio` alone loses Safari 14. */
- width: number;
- height: number;
- widthSm: number;
- heightSm: number;
- seconds?: number;
- alt: string;
- /** Alt text for the outcome frame, when it differs from the opening one. */
- resultAlt?: string;
-};
-
-export type Band = {
- id: string;
- index: string;
- kicker: string;
- claim: string;
- body: string;
- fact: string;
- /** plate: 640px, beside the copy. letterbox: full width, copy above — a
- * timeline is a horizontal instrument and cropping one to 640px destroys
- * the thing being claimed. statement: no media yet. */
- shape: "plate" | "letterbox" | "statement";
- /** Puts the plate on the left. Layout only — the copy stays first in the DOM. */
- flip?: boolean;
- media?: BandMedia;
-};
-
-const IMG = "/img/walkthrough";
-const VID = "/video";
-
-export const BANDS: Band[] = [
- {
- id: "band-record",
- index: "01",
- kicker: "record",
- claim: "It records with the operating system, not around it.",
- body: "Pick a window or a display. macOS goes through ScreenCaptureKit and Windows through Windows Graphics Capture — the same capture path the system uses itself. The pointer is recorded as data rather than burned into the pixels, so you can restyle it after the fact.",
- fact: "ScreenCaptureKit · Windows Graphics Capture · system audio without extra drivers",
- shape: "plate",
- media: {
- image: `${IMG}/01-record-a.jpg`,
- imageSm: `${IMG}/01-record-sm-a.jpg`,
- // 820 wide rather than the section's usual 960: this band's evidence is
- // a column of five small rows, and any crop tight enough to read them
- // without upscaling comes out narrower. It renders into the same box.
- width: 820,
- height: 461,
- widthSm: 640,
- heightSm: 360,
- alt: "The recorder's settings, with Rec selected in the mode switch above them. Five rows: the source, set to a named window; system audio, on; the microphone, off; the camera, off; and cursor highlighting, on.",
- },
- },
- {
- id: "band-timeline",
- index: "02",
- kicker: "timeline",
- claim: "A zoom is a region, not a keyframe.",
- body: "Press Z and a block appears on the timeline. Drag its edges to change when it happens, pick a depth, scrub back and watch it. T trims, S changes speed, A annotates, C cuts to full camera. Nothing is baked into the pixels until you export, so every block stays a block.",
- fact: "Z zoom · T trim · S speed · A annotate · C full camera",
- shape: "letterbox",
- media: {
- image: `${IMG}/02-timeline-a.jpg`,
- imageSm: `${IMG}/02-timeline-sm-a.jpg`,
- width: 1560,
- height: 288,
- widthSm: 640,
- heightSm: 118,
- alt: "The OpenScreen timeline: a ruler in minutes and seconds, then prompts reading “Press A to add annotation” and “Press S to add speed” on empty lanes, then two red trim blocks at the far ends of their own lane labelled 0:02.2 and 0:04.9 — the silences the agent cut — then three green zoom blocks labelled 1.80x, 2.20x and 1.80x sharing the lane below, then “Press C to add a Full Camera segment”, and one audio clip drawn as a waveform along the bottom.",
- },
- },
- {
- id: "band-captions",
- index: "03",
- kicker: "captions",
- claim: "Transcription runs on your machine.",
- body: "whisper.cpp ships with the app, and the model downloads once on first use — after that it works with the network off. The audio never leaves the laptop, and what comes back is editable text — set the typeface, the size, the colour, the position, then burn it into the render. Delete a word from the transcript and that span is cut from the video too.",
- fact: "whisper.cpp · offline after first run · Metal, Vulkan or CPU",
- shape: "plate",
- media: {
- image: `${IMG}/03-captions-a.jpg`,
- imageSm: `${IMG}/03-captions-sm-a.jpg`,
- width: 960,
- height: 540,
- widthSm: 640,
- heightSm: 360,
- alt: "A caption line reading “amber day on the validator, and it” rendered large over the video, with the Captions panel open beside it: captions switched on, a note that fifteen caption lines were derived live from the transcript, a language row offering the original transcript or a translation, and the type controls — typeface, bold, size, colour — that are setting how the line above is drawn.",
- },
- },
- {
- id: "band-agent",
- index: "04",
- kicker: "agent",
- claim: "Or describe the edit instead.",
- body: "The agent reads the actual transcript and the actual timeline, so it answers with timecodes you can go and check — which spans it will cut, and how much that saves. It makes the edit, then tells you exactly what it changed — or, with Project edits switched off in Settings → AI, it describes the cut and waits for your word. Every edit it makes is an ordinary undoable one, and it needs a provider key you supply. Nothing runs until you connect one.",
- fact: "bring your own key · off by default · every edit is undoable",
- shape: "plate",
- flip: true,
- media: {
- image: `${IMG}/04-agent-a.jpg`,
- imageSm: `${IMG}/04-agent-sm-a.jpg`,
- // No scrub clip: this band is `display: none` at >=901px, where the
- // recreation tells the same claim, and scrubbing is off below it. The
- // two files could never be fetched by anyone, so they are not shipped.
- width: 960,
- height: 540,
- widthSm: 640,
- heightSm: 360,
- alt: "The agent's reply in the chat panel, quoting the transcript back with timecodes: the only silences over a second were at the two ends, 0–2.19s of dead lead-in before “Hi” and 35.12–40.03s of dead tail after “think.”, both cut, taking the video about seven seconds shorter — from 40.0s to 33.0s of playable footage — with a note that the existing zooms stay anchored to the same moments, and a green line underneath reading “applied: added 2 trims”.",
- },
- },
- {
- id: "band-export",
- index: "05",
- kicker: "export",
- claim: "Then it writes the file.",
- body: "MP4 at 720p to source, 24 or 30 or 60, H.264 or H.265 — or a GIF. The encode runs on your machine and counts frames while it does. No queue, no account, no watermark. The file is on disk when the bar fills.",
- fact: "H.264 / H.265 · 24, 30, 60 fps · no watermark",
- // A plate, not a letterbox: the export dialog is already close to 16:9,
- // and cropping it to a 3.5:1 strip cuts the format row off the top and the
- // render bar off the bottom — the two things the claim rests on.
- shape: "plate",
- media: {
- image: `${IMG}/05-export-a.jpg`,
- imageSm: `${IMG}/05-export-sm-a.jpg`,
- result: `${IMG}/05-export-b.jpg`,
- resultSm: `${IMG}/05-export-sm-b.jpg`,
- clip: `${VID}/05-export.mp4`,
- clipSm: `${VID}/05-export-sm.mp4`,
- scrub: {
- clip: `${VID}/05-export-scrub.mp4`,
- clipSm: `${VID}/05-export-sm-scrub.mp4`,
- seconds: 3.2,
- frames: 64,
- },
- width: 960,
- height: 540,
- widthSm: 640,
- heightSm: 360,
- seconds: 3.2,
- alt: "The export dialog with MP4 chosen over GIF, 720p at 1280 by 720 chosen from a row offering 1080p and Source as well, 30 chosen from a row offering 24 and 60, and H.264 chosen over H.265.",
- resultAlt:
- "The same dialog a moment into the render: a progress bar part-filled at fourteen per cent, and a line under it counting 134 of 988 frames with an estimate of eighteen seconds left.",
- },
- },
-];
diff --git a/website/src/components/Walkthrough/index.tsx b/website/src/components/Walkthrough/index.tsx
deleted file mode 100644
index 26ca93da1..000000000
--- a/website/src/components/Walkthrough/index.tsx
+++ /dev/null
@@ -1,432 +0,0 @@
-import Head from "@docusaurus/Head";
-import { useEffect, useRef, useState } from "react";
-
-import Recreation from "../Recreation";
-import { BANDS, type Band } from "./bands";
-import { PLATE } from "./plate";
-import styles from "./styles.module.css";
-import { type BandPlayback, useBandPlayback } from "./useBandPlayback";
-import { useScrub, useScrubEnabled } from "./useScrub";
-
-/**
- * Decides the layout before the first paint rather than after hydration.
- *
- * The pinned layout makes its band about two viewports tall. Switching to it
- * once React has mounted would move every section below it, which is a layout
- * shift with no user interaction to excuse it — exactly what CLS counts. An
- * attribute set from the document head costs one synchronous statement and is
- * in place before anything is painted.
- *
- * `position: sticky` is checked as well as the motion preference: it is the one
- * capability the layout cannot do without, and an engine that lacks it would
- * otherwise be handed a two-viewport-tall band with a picture stranded at the
- * top of it.
- */
-const SCRUB_GATE = `try{var m=matchMedia('(prefers-reduced-motion: reduce)').matches,
-w=matchMedia('(min-width: 901px)').matches,s=CSS.supports('position','sticky');
-document.documentElement.setAttribute('data-os-scrub',!m&&w&&s?'on':'off')}catch(e){}`;
-
-/** Both global controls are server-rendered as inert spans of identical box size
- * and upgraded after hydration, so a reader without JavaScript never meets a
- * control that looks operable and is not. Deliberately not named `use…`: it is a
- * ternary, it is called after an early return, and a hook-shaped name is how a
- * later refactor talks itself into putting state inside it. */
-function upgradedTag(hydrated: boolean) {
- return hydrated ? "button" : "span";
-}
-
-/**
- * A band the reader scrubs: the figure pins, the band is taller than the
- * viewport, and scroll position walks the clip. There is no Play control and no
- * dwell timer — the scroll *is* the transport, in both directions, and a reader
- * who stops gets a still frame rather than something that carries on without
- * them. The poster stays underneath and is what shows until the clip can seek.
- */
-function ScrubBand({ band }: { band: Band }) {
- const media = band.media!;
- const scrub = media.scrub!;
- const bandRef = useRef<HTMLElement | null>(null);
- const videoRef = useRef<HTMLVideoElement | null>(null);
- const enabled = useScrubEnabled();
- const [small, setSmall] = useState(false);
- useEffect(() => {
- const mq = window.matchMedia("(max-width: 780px)");
- const sync = () => setSmall(mq.matches);
- sync();
- mq.addEventListener("change", sync);
- return () => mq.removeEventListener("change", sync);
- }, []);
- const { progress, ready, near } = useScrub({
- band: bandRef,
- video: videoRef,
- seconds: scrub.seconds,
- enabled,
- });
-
- return (
- <article
- id={band.id}
- ref={bandRef}
- className={`${styles.band} ${styles.split} ${band.flip ? styles.flip : ""} ${styles.scrubbable}`}
- >
- <Copy band={band} />
- <figure className={styles.figure}>
- <div className={styles.frame} style={{ aspectRatio: `${media.width} / ${media.height}` }}>
- <picture>
- <source media="(max-width: 780px)" srcSet={media.imageSm} />
- <img
- className={styles.still}
- src={media.image}
- width={media.width}
- height={media.height}
- loading="lazy"
- decoding="async"
- alt={media.alt}
- />
- </picture>
- {enabled && near && (
- <video
- ref={videoRef}
- className={`${styles.clip} ${ready ? styles.clipReady : ""}`}
- src={small ? scrub.clipSm : scrub.clip}
- width={media.width}
- height={media.height}
- muted
- playsInline
- preload="auto"
- aria-hidden="true"
- tabIndex={-1}
- disableRemotePlayback
- />
- )}
- </div>
- {/* Both captions are rendered and CSS shows one, because which is true
- depends on a capability the server cannot know. Swapping the text
- after hydration would say "Scroll to run it" to a reader for whom it
- is false, for as long as the bundle takes to arrive. */}
- <figcaption className={styles.caption}>
- <span className={`${styles.captionText} ${styles.captionScrub}`}>
- Scroll to run it · {scrub.frames} frames
- </span>
- <span className={`${styles.captionText} ${styles.captionStill}`}>
- A frame of the running application
- </span>
- </figcaption>
- <span className={`${styles.rail} ${styles.railScrub}`} aria-hidden="true">
- <span
- className={styles.railFill}
- style={{ transform: `scaleX(${progress.toFixed(4)})` }}
- />
- </span>
- </figure>
- </article>
- );
-}
-
-function BandView({ band, ctl }: { band: Band; ctl: BandPlayback }) {
- const { media } = band;
- const videoRef = useRef<HTMLVideoElement | null>(null);
- const [ready, setReady] = useState(false);
- const [playing, setPlaying] = useState(false);
-
- const owns = ctl.activeId === band.id && !!media?.clip;
- const played = ctl.playedIds.has(band.id);
- const refused = ctl.refusedIds.has(band.id);
- // Depending on `ctl` itself would re-run this on every render — it is a fresh
- // object each time — and call play() again on an element already playing.
- const { markRefused, playToken, small } = ctl;
-
- useEffect(() => {
- if (!owns) {
- setReady(false);
- setPlaying(false);
- return;
- }
- const el = videoRef.current;
- if (!el) return;
- let live = true;
- // `playToken` and `small` are dependencies for the same reason: neither one
- // moves `owns`, and both mean the element has to start over. The second is
- // the less obvious one — changing `src` runs the resource-selection
- // algorithm, which rewinds to 0 and pauses without firing `pause`, so
- // nothing else on the page would ever learn that playback had stopped.
- el.currentTime = 0;
- const attempt = el.play();
- if (attempt) {
- attempt.catch((err: DOMException) => {
- // iOS in Low Power Mode refuses muted inline autoplay outright, and
- // the page cannot override it. The poster and the labelled button
- // stay; only the element goes away. An AbortError claims nothing of
- // the sort — the band lost the element, or swapped rendition, while
- // the clip was still loading — and filing it as a refusal deletes
- // the only control the section has over its own motion.
- if (live && err?.name === "NotAllowedError") markRefused(band.id);
- });
- }
- return () => {
- live = false;
- };
- }, [owns, band.id, markRefused, playToken, small]);
-
- if (!media) {
- return (
- <article
- id={band.id}
- className={`${styles.band} ${styles.statement}`}
- ref={ctl.registerBand(band.id)}
- data-band-id={band.id}
- >
- <Copy band={band} />
- </article>
- );
- }
-
- // Once a clip has finished, its band keeps showing the last frame rather than
- // snapping back to the first — so scrolling back up shows outcomes, and the
- // reduced-motion reader is shown those outcomes from the start.
- const showResult = (played || ctl.quiet) && !!media.result;
- const still = showResult ? (media.result as string) : media.image;
- const stillSm = showResult ? (media.resultSm as string) : media.imageSm;
- const alt = showResult && media.resultAlt ? media.resultAlt : media.alt;
-
- const hasClip = !!media.clip;
- const Tag = upgradedTag(ctl.hydrated);
- const label = played ? `Replay the ${band.kicker} clip` : `Play the ${band.kicker} clip`;
-
- return (
- <article
- id={band.id}
- className={`${styles.band} ${band.shape === "letterbox" ? styles.wide : styles.split} ${
- band.flip ? styles.flip : ""
- }`}
- >
- <Copy band={band} />
- {/* The observer watches the picture, not the band. A stacked band on a
- landscape phone is taller than the viewport, so its intersection
- ratio cannot reach the threshold at all and the clip never starts
- however long the reader sits on it. The figure always fits. */}
- <figure className={styles.figure} ref={ctl.registerBand(band.id)} data-band-id={band.id}>
- <div className={styles.frame} style={{ aspectRatio: `${media.width} / ${media.height}` }}>
- <picture>
- <source media="(max-width: 780px)" srcSet={stillSm} />
- <img
- className={styles.still}
- src={still}
- width={media.width}
- height={media.height}
- loading="lazy"
- decoding="async"
- alt={alt}
- />
- </picture>
- {owns && (
- <video
- ref={videoRef}
- className={`${styles.clip} ${ready ? styles.clipReady : ""}`}
- src={small ? media.clipSm : media.clip}
- width={media.width}
- height={media.height}
- muted
- playsInline
- preload="auto"
- aria-hidden="true"
- tabIndex={-1}
- disableRemotePlayback
- onLoadedData={() => setReady(true)}
- onPlaying={() => setPlaying(true)}
- onEmptied={() => {
- setReady(false);
- setPlaying(false);
- }}
- onEnded={() => {
- setPlaying(false);
- ctl.markPlayed(band.id);
- }}
- />
- )}
- </div>
- <figcaption className={styles.caption}>
- <span className={styles.captionText}>
- {hasClip
- ? `${media.seconds?.toFixed(1)}s · one take · no sound`
- : "A frame of the running application"}
- </span>
- {hasClip && !refused && (
- <Tag
- className={styles.replay}
- {...(ctl.hydrated
- ? { type: "button" as const, onClick: () => ctl.play(band.id) }
- : { "aria-hidden": true })}
- >
- {label}
- </Tag>
- )}
- </figcaption>
- {hasClip && (
- <span className={styles.rail} aria-hidden="true">
- <span
- className={`${styles.railFill} ${playing ? styles.railRunning : ""} ${
- played && !playing ? styles.railDone : ""
- }`}
- style={{ animationDuration: `${media.seconds ?? 5}s` }}
- />
- </span>
- )}
- </figure>
- </article>
- );
-}
-
-function Copy({ band }: { band: Band }) {
- return (
- <div className={styles.copy}>
- <p className={styles.kicker}>
- <span className={styles.index}>{band.index}</span>
- {band.kicker}
- </p>
- <h3 className={styles.claim}>{band.claim}</h3>
- <p className={styles.body}>{band.body}</p>
- <p className={styles.fact}>{band.fact}</p>
- </div>
- );
-}
-
-export default function Walkthrough() {
- const ctl = useBandPlayback();
- const Tag = upgradedTag(ctl.hydrated);
-
- return (
- <>
- <Head>
- <script>{SCRUB_GATE}</script>
- <link
- rel="preload"
- as="image"
- href={PLATE.src}
- imageSrcSet={PLATE.srcSet}
- imageSizes={PLATE.sizes}
- fetchPriority="high"
- />
- </Head>
-
- <section className={styles.plateSection}>
- <figure className={styles.plate}>
- <img
- className={styles.plateImage}
- src={PLATE.src}
- srcSet={PLATE.srcSet}
- sizes={PLATE.sizes}
- width={PLATE.width}
- height={PLATE.height}
- // react-dom 18 does not recognise the camelCase prop it learns in 19,
- // and logs an unknown-prop error for it on every dev load of the
- // landing page. Both spellings serialise to fetchpriority="high";
- // the spread is only what gets the lowercase one past @types/react,
- // which is already on 19.
- {...{ fetchpriority: "high" }}
- decoding="async"
- alt={PLATE.alt}
- />
- <figcaption className={styles.plateCaption}>{PLATE.caption}</figcaption>
- </figure>
- </section>
-
- <section className={styles.walkthrough} aria-labelledby="walkthrough-title">
- <div className={styles.inner}>
- <a className={styles.skip} href="#download-install">
- Skip the walkthrough — go to downloads
- </a>
-
- <div className={styles.head}>
- <p className={styles.sectionKicker}>What it does</p>
- <h2 id="walkthrough-title" className={styles.sectionTitle}>
- Recorder first. Editor second. AI only if you ask.
- </h2>
- {/* The line this replaces read "Nothing here is a drawing of the
- interface", which the recreation makes false on a wide screen —
- and a claim that is true at 900px and false at 901px is worse
- than no claim. What survives is the part that is still checkable:
- the photographs are the application, and the drawn panels quote a
- file rather than an art director. */}
- <p className={styles.deck}>
- No sound, no narration. The photographs are the running application, unretouched. The
- editor you scroll through is drawn live from the design tokens the app ships, around a
- real capture of the page it was recording — and every label, timecode, slider and pill
- in it is read out of the project file rather than typed by hand.
- </p>
-
- <div className={styles.controls}>
- <nav className={styles.chapters} aria-label="Walkthrough sections">
- {BANDS.map((band) => (
- <a key={band.id} href={`#${band.id}`}>
- {band.kicker}
- </a>
- ))}
- </nav>
- <Tag
- className={styles.toggle}
- {...(ctl.hydrated
- ? {
- type: "button" as const,
- "aria-pressed": ctl.autoplay,
- // Turning it off has to stop the clip that is running and
- // the one that is 400ms from starting, or the control
- // reports a state the page has not entered.
- onClick: () => (ctl.autoplay ? ctl.stopAutoplay() : ctl.setAutoplay(true)),
- }
- : { "aria-hidden": true })}
- >
- <span className={styles.toggleDot} aria-hidden="true" />
- Play clips as they scroll into view
- </Tag>
- </div>
- </div>
-
- {/* Which component renders a band is decided by the data, not by a
- capability — the server and the client must agree, and the pinned
- layout is turned on and off in CSS alone.
-
- The middle three bands and the recreation are the same three claims
- told twice, so exactly one of them is ever visible. Both gates are
- pure CSS and exact mirrors of each other — ≥901px and `position:
- sticky` supported and not forced-colors — so there is no width at
- which a reader gets both or neither, and nothing waits for
- hydration to decide. Record and export are not in the recreation
- (they are separate screens in the app, not part of the editor), so
- they render at every width. */}
- {BANDS.filter((b) => b.index === "01").map((band) => (
- <BandView key={band.id} band={band} ctl={ctl} />
- ))}
- </div>
-
- {/* Outside `.inner` on purpose: the recreation is the one block on
- this page that wants the whole viewport. Boxed into the 1040px
- measure it has to draw a whole editor at a third of its natural
- size, which is what made the previous cut read as a diagram of an
- application rather than a picture of one. Everything else on the
- page keeps the measure. */}
- <Recreation />
-
- <div className={styles.inner}>
- <div className={styles.superseded}>
- {BANDS.filter((b) => ["02", "03", "04"].includes(b.index)).map((band) =>
- band.media?.scrub ? (
- <ScrubBand key={band.id} band={band} />
- ) : (
- <BandView key={band.id} band={band} ctl={ctl} />
- ),
- )}
- </div>
-
- {BANDS.filter((b) => b.index === "05").map((band) =>
- band.media?.scrub ? (
- <ScrubBand key={band.id} band={band} />
- ) : (
- <BandView key={band.id} band={band} ctl={ctl} />
- ),
- )}
- </div>
- </section>
- </>
- );
-}
diff --git a/website/src/components/Walkthrough/plate.ts b/website/src/components/Walkthrough/plate.ts
deleted file mode 100644
index cd25957e2..000000000
--- a/website/src/components/Walkthrough/plate.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * The establishing plate — one photograph of the real editor, unretouched.
- *
- * It is the page's LCP element, so it is preloaded and it is a JPEG: `as="video"`
- * is not implemented in any engine, which means a poster is the only thing on a
- * media-led page that can be preloaded at all.
- *
- * Density is deliberately capped at 1.5x. A 2080-wide rendition measures ~95 KB
- * and would push the 2x critical path over the 250 KB the page is held to; the
- * 1560 asset on a 3x display is a far cheaper compromise than the alternative.
- */
-export const PLATE = {
- src: "/img/walkthrough/editor-1040.jpg",
- srcSet: "/img/walkthrough/editor-1040.jpg 1040w, /img/walkthrough/editor-1560.jpg 1560w",
- sizes: "(max-width: 1096px) calc(100vw - 56px), 1040px",
- width: 1040,
- height: 584,
- // Not "unretouched": the window's rounded corners were squared against its own
- // chrome colour so the wallpaper behind it does not bleed into the frame. That
- // is matting, but the caption should not claim more than the picture is.
- caption: "OpenScreen 1.9 · one frame of the running editor",
- alt: "The OpenScreen editor at the end of a session: the chat panel down the left holding the agent's reply and a green line confirming two trims were applied, the video canvas in the middle showing the page being demonstrated, a transcript panel on the right where the two silences it cut are struck through in red, and a timeline below holding those two trims and three zoom regions above one audio waveform.",
-} as const;
diff --git a/website/src/components/Walkthrough/styles.module.css b/website/src/components/Walkthrough/styles.module.css
deleted file mode 100644
index 56c4451df..000000000
--- a/website/src/components/Walkthrough/styles.module.css
+++ /dev/null
@@ -1,646 +0,0 @@
-/**
- * The walkthrough — one photograph of the editor, then a band per capability.
- *
- * Two rules shape everything here.
- *
- * Nothing sticks. The page's only sticky object stays the navbar. A pinned
- * stage would be at the mercy of --ifm-navbar-height, of the navbar's z-index,
- * of any future theme wrapper that creates a containing block and silently
- * kills `position: sticky`, and of 1.4.10 Reflow at 320 CSS px.
- *
- * No text ever sits on video. Contrast against footage cannot be computed, and
- * this footage runs from a near-black chrome to a white page inside the canvas.
- * Every label lives on a token surface instead.
- */
-
-.plateSection,
-.walkthrough {
- /* Explicit: the dark-theme document canvas resolves to Infima's own #1b1b1d,
- and `html, body { height: 100% }` means the body paints only the first
- viewport — so a section without a background sits on the wrong grey. */
- background: var(--os-bg);
- color: var(--os-fg);
-}
-
-/* ---- the establishing plate ---- */
-
-.plateSection {
- padding: 48px 28px 96px;
- display: flex;
- justify-content: center;
-}
-
-.plate {
- width: 100%;
- max-width: 1040px;
- margin: 0;
- border-radius: 16px;
- border: 1px solid var(--os-border);
- background: var(--os-surface-1);
- box-shadow: var(--os-elev-pop);
- overflow: hidden;
-}
-
-.plateImage {
- display: block;
- width: 100%;
- height: auto;
-}
-
-/* On --os-surface-1, not --os-surface-2. The tinted surface is 1.4.3-failing in
- the light theme — muted-on-#f1f3f5 measures 4.35:1 at 11px — and the rule above
- already separates the caption from the picture without it. */
-.plateCaption {
- padding: 9px 16px;
- border-top: 1px solid var(--os-border-soft);
- background: var(--os-surface-1);
- font-family: var(--ifm-font-family-monospace);
- font-size: 11px;
- color: var(--os-muted);
-}
-
-/* ---- section ---- */
-
-/* The gutter lives on `.inner`, not on the section, so the recreation — which
- is a sibling of the two `.inner` blocks rather than a child of one — can use
- the whole viewport width. A stage boxed into the 1040px measure has to draw a
- full editor at a third of its natural size, which is what made the previous
- cut read as a diagram of an application rather than a picture of one. */
-.walkthrough {
- padding: 0 0 96px;
-}
-
-.inner {
- max-width: 1096px;
- margin: 0 auto;
- padding: 0 28px;
-}
-
-/* Visible only on focus. A marketing page with five media blocks is a long way
- to tab past when all you wanted was the download. */
-.skip {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip-path: inset(50%);
- white-space: nowrap;
-}
-
-.skip:focus,
-.skip:focus-visible {
- position: static;
- width: auto;
- height: auto;
- margin: 0 0 20px;
- clip-path: none;
- display: inline-block;
- padding: 7px 14px;
- border-radius: 9px;
- background: var(--os-surface-2);
- border: 1px solid var(--os-border);
- color: var(--os-fg-2);
- font-size: 12.5px;
- text-decoration: none;
-}
-
-.head {
- max-width: 720px;
- margin: 0 auto 72px;
- text-align: center;
-}
-
-.sectionKicker {
- margin: 0;
- font-family: var(--ifm-font-family-monospace);
- font-size: 11px;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: var(--os-accent);
-}
-
-.sectionTitle {
- margin: 10px 0 0;
- font-size: clamp(26px, 3vw, 32px);
- font-weight: 700;
- letter-spacing: -0.02em;
- line-height: 1.2;
- color: var(--os-fg-emphasis);
-}
-
-.deck {
- margin: 16px auto 0;
- max-width: 620px;
- font-size: 14.5px;
- line-height: 1.65;
- color: var(--os-muted);
-}
-
-.controls {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-wrap: wrap;
- gap: 10px;
- margin-top: 28px;
-}
-
-/* Wraps. Five chapter names in one row measure 334px, which is wider than the
- 320 CSS px that 1.4.10 Reflow requires the page to survive without a
- horizontal scrollbar — and a nav that scrolls sideways off a phone is a nav
- whose last two entries do not exist. */
-.chapters {
- display: inline-flex;
- flex-wrap: wrap;
- justify-content: center;
- gap: 2px;
- padding: 3px;
- border-radius: 18px;
- border: 1px solid var(--os-border);
- background: var(--os-surface-1);
-}
-
-/* --os-fg-2, not --os-muted: the pill sits on --os-surface-1, which lifts the
- backdrop enough that muted lands at 3.72:1 in the dark theme — a 1.4.3 failure
- on what is a row of navigation links. */
-.chapters a {
- padding: 5px 12px;
- border-radius: 999px;
- font-size: 12px;
- color: var(--os-fg-2);
- text-decoration: none;
- transition: background-color 0.15s ease, color 0.15s ease;
-}
-
-.chapters a:hover {
- background: var(--os-surface-2);
- color: var(--os-fg-emphasis);
-}
-
-/* Rendered as an inert <span> on the server and upgraded to a <button> after
- hydration, so the box never changes size and a no-JS reader is never offered
- a control that does nothing. */
-.toggle {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- padding: 6px 14px;
- border-radius: 999px;
- border: 1px solid var(--os-border);
- background: transparent;
- font: inherit;
- font-size: 12px;
- color: var(--os-muted);
- cursor: pointer;
-}
-
-/* The pre-hydration form, to the pixel the same box so nothing shifts when the
- real control replaces it — but visibly not a control. The border and the fill
- carry that, never the text alpha: dimming the label takes it to 2.8:1 in the
- dark theme and 2.3:1 in the light one, which trades a nit for a 1.4.3 failure. */
-span.toggle,
-span.replay {
- cursor: default;
- border-style: dashed;
- background: none;
-}
-
-.toggle[aria-pressed="true"] {
- border-color: var(--os-accent-border);
- background: var(--os-accent-wash);
- color: var(--os-fg-2);
-}
-
-.toggleDot {
- width: 7px;
- height: 7px;
- border-radius: 50%;
- background: var(--os-surface-hi);
-}
-
-.toggle[aria-pressed="true"] .toggleDot {
- background: var(--os-accent);
- box-shadow: 0 0 0 3px var(--os-accent-soft);
-}
-
-/* Forced colors paints both dots in Canvas and drops the box-shadow, so on and
- off render identically — and with the dot gone the pill does not read as a
- toggle at all. Border width is not a colour, so it survives: hollow ring off,
- filled disc on, and 3px on a 7px border-box dot fills it without reflow. */
-@media (forced-colors: active) {
- .toggleDot {
- box-sizing: border-box;
- border: 1px solid CanvasText;
- }
-
- .toggle[aria-pressed="true"] .toggleDot {
- border-width: 3px;
- }
-}
-
-/* ---- bands ---- */
-
-.band {
- /* The navbar is 60px and sticky; without this an anchor jump parks the
- band's heading underneath it. */
- scroll-margin-top: 76px;
-}
-
-.band + .band {
- margin-top: 88px;
-}
-
-.split {
- display: grid;
- grid-template-columns: 360px 1fr;
- gap: 40px;
- align-items: center;
-}
-
-/* Assigning columns, not `order`: the tracks are asymmetric (360px + 1fr), and
- reordering auto-placed items moves the plate into the narrow track instead of
- swapping the two sides. The DOM keeps the copy first either way, so the
- reading order never depends on the layout. */
-.flip {
- grid-template-columns: 1fr 360px;
-}
-
-/* The row is explicit too. With only the column pinned, grid auto-placement
- refuses to go backwards: the copy takes row 1 / column 2, and the figure —
- later in the DOM — cannot fill row 1 / column 1 behind it, so it drops to a
- second row and the band silently becomes two stacked halves. */
-.flip .copy {
- grid-column: 2;
- grid-row: 1;
-}
-
-.flip .figure {
- grid-column: 1;
- grid-row: 1;
-}
-
-.wide .copy {
- max-width: 620px;
- margin-bottom: 28px;
-}
-
-/* A band with no footage yet reads as a deliberate statement rather than as a
- hole: bordered card, same radius and elevation as the install panes. */
-.statement {
- padding: 34px;
- border-radius: 14px;
- border: 1px solid var(--os-border);
- background: var(--os-surface-1);
- box-shadow: var(--os-elev-card);
-}
-
-.statement .copy {
- max-width: 640px;
-}
-
-.kicker {
- display: flex;
- align-items: center;
- gap: 9px;
- margin: 0;
- font-family: var(--ifm-font-family-monospace);
- font-size: 11px;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: var(--os-muted);
-}
-
-.index {
- color: var(--os-accent);
-}
-
-.claim {
- margin: 14px 0 0;
- font-size: 19px;
- font-weight: 600;
- line-height: 1.35;
- letter-spacing: -0.01em;
- color: var(--os-fg-emphasis);
-}
-
-.body {
- margin: 12px 0 0;
- font-size: 13.5px;
- line-height: 1.65;
- color: var(--os-fg-2);
-}
-
-.fact {
- margin: 16px 0 0;
- font-family: var(--ifm-font-family-monospace);
- font-size: 11px;
- line-height: 1.65;
- color: var(--os-muted);
-}
-
-/* ---- the plate itself ---- */
-
-/* ---- the three bands the recreation replaces ----
- An exact mirror of the gate in Recreation/styles.module.css, and it has to
- stay one: if the two conditions ever drift apart there is a width at which a
- reader sees the same three claims twice, or neither. Both are pure CSS for
- that reason — a JavaScript gate on one side and a media query on the other
- could not be kept in step, and one of them would decide after hydration. */
-
-.superseded {
- display: contents;
-}
-
-@media (min-width: 901px) {
- @supports (position: sticky) {
- .superseded {
- display: none;
- }
- }
-}
-
-@media (forced-colors: active) {
- .superseded {
- display: contents;
- }
-}
-
-/* ---- the scrubbed bands ----
- A band with a scroll rendition becomes its own theatre: it grows to a little
- over two viewports, and both its halves pin, so scrolling through it walks the
- clip a frame at a time in whichever direction the reader is going.
-
- Every rule here hangs off one attribute set in the document head before the
- first paint. Turn it off — reduced motion, a narrow screen, no `sticky`, no
- JavaScript at all — and the band is an ordinary picture beside an ordinary
- paragraph, which is the layout the rest of the section already uses. That is
- the whole reason the pin is per band rather than one stage held across the
- page: there is no second layout to maintain and nothing to swap at runtime. */
-
-:global([data-os-scrub="on"]) .scrubbable {
- /* The clip's length in scroll. Roughly a viewport and a quarter of travel
- over a 64-frame clip puts a frame every ~15px, which is finer than a
- trackpad gesture resolves and about half what a wheel notch jumps. */
- min-height: 225vh;
- align-items: start;
-}
-
-:global([data-os-scrub="on"]) .scrubbable .copy,
-:global([data-os-scrub="on"]) .scrubbable .figure {
- position: sticky;
- /* Centred on the viewport where there is room, and never under the 60px
- navbar where there is not. */
- top: max(88px, calc(50vh - 250px));
-}
-
-:global([data-os-scrub="on"]) .captionStill,
-:global([data-os-scrub="off"]) .captionScrub,
-:global([data-os-scrub="off"]) .railScrub {
- display: none;
-}
-
-/* Before the gate script runs — and for a reader with JavaScript off, where it
- never runs — neither caption has an answer yet. Show the one that is true of a
- page nothing is driving. */
-.captionScrub {
- display: none;
-}
-
-:global([data-os-scrub="on"]) .captionScrub {
- display: inline;
-}
-
-.figure {
- margin: 0;
- min-width: 0;
-}
-
-.frame {
- position: relative;
- border-radius: 10px;
- border: 1px solid var(--os-border);
- background: var(--os-surface-2);
- box-shadow: var(--os-elev-card);
- overflow: hidden;
-}
-
-.still {
- display: block;
- width: 100%;
- height: auto;
-}
-
-/* The poster is the clip's literal first frame, so the crossfade has nothing to
- cross — it exists only to hide the one frame where the element is decoded but
- not yet painted. */
-.clip {
- position: absolute;
- inset: 0;
- width: 100%;
- height: 100%;
- object-fit: cover;
- opacity: 0;
- transition: opacity 0.18s ease;
-}
-
-/* Compound, not `.clipReady` alone, and this is not tidiness.
- `.clipReady { opacity: 1 }` and `.clip { opacity: 0 }` have equal specificity,
- so which wins is decided by source order — and the production CSS optimiser
- merges rules that share a declaration, so this one got folded in with
- Infima's `.alert .close:hover` and hoisted ABOVE `.clip`. The result was a
- clip that scrubbed perfectly at opacity 0 behind a poster that never moved:
- correct in dev, invisible in the build, and no error anywhere. Raising the
- specificity makes the outcome independent of what the optimiser does. */
-.clip.clipReady {
- opacity: 1;
-}
-
-.caption {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- margin-top: 10px;
- font-family: var(--ifm-font-family-monospace);
- font-size: 11px;
- color: var(--os-muted);
-}
-
-.captionText {
- min-width: 0;
-}
-
-.replay {
- flex: none;
- padding: 4px 11px;
- border-radius: 8px;
- border: 1px solid var(--os-border);
- background: var(--os-surface-2);
- color: var(--os-fg-2);
- font: inherit;
- cursor: pointer;
- transition: border-color 0.15s ease, color 0.15s ease;
-}
-
-span.replay {
- cursor: default;
-}
-
-.replay:hover {
- border-color: var(--os-border-hi);
- color: var(--os-fg-emphasis);
-}
-
-/* Progress, without requestVideoFrameCallback — which goes quiet whenever the
- element is not being composited, i.e. exactly when you would want to trust it. */
-.rail {
- display: block;
- height: 2px;
- margin-top: 8px;
- border-radius: 2px;
- background: var(--os-border-soft);
- overflow: hidden;
-}
-
-.railFill {
- display: block;
- height: 100%;
- background: var(--os-accent);
- transform: scaleX(0);
- transform-origin: left center;
-}
-
-.railRunning {
- animation-name: sweep;
- animation-timing-function: linear;
- animation-fill-mode: forwards;
-}
-
-/* Compound for the same reason as `.clip.clipReady` above: `transform` is a
- common declaration, and a same-specificity rule that the optimiser is free to
- reorder is not a rule, it is a coin toss. */
-.railFill.railDone {
- transform: scaleX(1);
-}
-
-@keyframes sweep {
- from {
- transform: scaleX(0);
- }
- to {
- transform: scaleX(1);
- }
-}
-
-/* ---- entry motion ----
- Fourteen lines, no JavaScript, transform and opacity only — the two
- properties Chromium runs off the main thread.
-
- The nesting is load-bearing, not defensive. Because the `opacity: 0` start
- state only exists inside `prefers-reduced-motion: no-preference` and inside
- `@supports`, an engine without scroll-driven animations and a reader who has
- asked for stillness never see it at all. The usual bug in this pattern —
- `animation: none` under reduce, leaving the content stranded at opacity 0 —
- is designed out rather than patched. */
-
-@media (prefers-reduced-motion: no-preference) {
- @supports (animation-timeline: view()) {
- .band {
- view-timeline-name: --band;
- }
-
- .copy,
- .figure {
- animation-name: rise;
- animation-timing-function: linear;
- animation-fill-mode: both;
- animation-timeline: --band;
- }
-
- .copy {
- animation-range: entry 8% cover 26%;
- }
-
- .figure {
- animation-range: entry 14% cover 32%;
- }
- }
-}
-
-@keyframes rise {
- from {
- opacity: 0;
- transform: translateY(8px);
- }
- to {
- opacity: 1;
- transform: none;
- }
-}
-
-/* ---- narrow ---- */
-
-@media (max-width: 900px) {
- .split {
- grid-template-columns: 1fr;
- gap: 24px;
- }
-
- .flip {
- grid-template-columns: 1fr;
- }
-
- .flip .copy,
- .flip .figure {
- grid-column: 1;
- grid-row: auto;
- }
-
- .band + .band {
- margin-top: 64px;
- }
-
- .head {
- margin-bottom: 48px;
- }
-}
-
-@media (max-width: 600px) {
- .plateSection {
- padding: 32px 16px 64px;
- }
-
- .walkthrough {
- padding: 0 20px 72px;
- }
-
- .statement {
- padding: 24px;
- }
-
- .caption {
- flex-wrap: wrap;
- gap: 8px;
- }
-}
-
-@media print {
- .toggle,
- .chapters,
- .replay,
- .rail,
- .clip {
- display: none !important;
- }
-
- .band {
- break-inside: avoid;
- }
-
- .plate,
- .frame {
- box-shadow: none;
- }
-}
diff --git a/website/src/components/Walkthrough/useBandPlayback.ts b/website/src/components/Walkthrough/useBandPlayback.ts
deleted file mode 100644
index af902c03c..000000000
--- a/website/src/components/Walkthrough/useBandPlayback.ts
+++ /dev/null
@@ -1,248 +0,0 @@
-import { useCallback, useEffect, useRef, useState } from "react";
-
-import useIsBrowser from "@docusaurus/useIsBrowser";
-
-/**
- * One video element on the page, ever.
- *
- * Not a stylistic choice: two H.264 elements decoding at once measured
- * 120.9 -> 30.8 fps on Apple Silicon with hardware decode, which is the best
- * case any visitor gets. So instead of mounting a <video> per band and pausing
- * the ones offscreen, exactly one band at a time owns the element, and the
- * others are their own poster. `content-visibility` is not a lever here — a
- * video 8,000px offscreen under `content-visibility: auto` decoded at full
- * speed in testing, the same as the onscreen one.
- *
- * A band that has finished keeps showing its *last* frame rather than reverting
- * to its first, so scrolling back up shows outcomes: captions rendered, the file
- * saved. That is also exactly what a reduced-motion reader is shown from the
- * start, which is why the reduced experience is a designed one rather than a
- * page with the motion subtracted.
- */
-
-const DWELL_MS = 400; // a fast scroll to the footer must not request five clips
-const VISIBLE = 0.55;
-
-export type BandPlayback = {
- /** The band that currently owns the single <video>, if any. */
- activeId: string | null;
- /** Bumped by every play() call. Ownership alone cannot express "start again",
- * because the band asking is usually the band that already owns the element. */
- playToken: number;
- /** Bands that have played to the end, and now show their result frame. */
- playedIds: ReadonlySet<string>;
- /** Whether clips start on their own when scrolled to. */
- autoplay: boolean;
- setAutoplay: (on: boolean) => void;
- /** Turns autoplay off, cancels the dwell timers already counting down, and
- * gives up the element — so the control stops what is running, not only what
- * would have run next. */
- stopAutoplay: () => void;
- /** True once the browser has taken over — controls stay inert before that. */
- hydrated: boolean;
- /** True where motion is unwelcome: reduced motion, or a metered connection. */
- quiet: boolean;
- /** Narrow viewport, so the small renditions are the ones to load. */
- small: boolean;
- registerBand: (id: string) => (node: HTMLElement | null) => void;
- play: (id: string) => void;
- markPlayed: (id: string) => void;
- /** Set by a band whose play() was refused, so its control can stop lying. */
- markRefused: (id: string) => void;
- refusedIds: ReadonlySet<string>;
-};
-
-export function useBandPlayback(): BandPlayback {
- const hydrated = useIsBrowser();
- const [activeId, setActiveId] = useState<string | null>(null);
- const [playToken, setPlayToken] = useState(0);
- const [playedIds, setPlayedIds] = useState<ReadonlySet<string>>(new Set());
- const [refusedIds, setRefusedIds] = useState<ReadonlySet<string>>(new Set());
- const [autoplay, setAutoplay] = useState(true);
- const [quiet, setQuiet] = useState(false);
- const [small, setSmall] = useState(false);
-
- const nodes = useRef(new Map<string, HTMLElement>());
- const timers = useRef(new Map<string, ReturnType<typeof setTimeout>>());
- // Set the moment the reader works the toggle. The environment supplies the
- // default; after that the choice is theirs and nothing may recompute it.
- const chosen = useRef(false);
- // Read inside the observer callback, and inside stopAutoplay — both of which
- // are created once and must not see a stale render's values.
- const state = useRef({ autoplay, activeId, refusedIds });
- state.current = { autoplay, activeId, refusedIds };
-
- useEffect(() => {
- if (!hydrated) return;
-
- const motion = window.matchMedia("(prefers-reduced-motion: reduce)");
- const narrow = window.matchMedia("(max-width: 780px)");
-
- // `prefers-reduced-data` has no implementation to speak of and GitHub Pages
- // is static, so it cannot vary a response on the Save-Data header either.
- // This client-side probe is the only signal that exists; where it is absent
- // the default path is already the light one.
- const conn = (
- navigator as Navigator & {
- connection?: { saveData?: boolean; effectiveType?: string };
- }
- ).connection;
- const thin = conn?.saveData === true || /^(slow-)?2g$/.test(conn?.effectiveType ?? "");
-
- // Two queries, two callbacks. Width decides which rendition to load and
- // nothing else; reading it in the same callback as the motion default is
- // what let a phone rotation, or a zoom past 200%, put autoplay back on
- // after the reader had turned it off.
- const syncMotion = () => {
- const q = motion.matches || thin;
- setQuiet(q);
- // An explicit choice outranks the default, but asking the OS for
- // stillness outranks the choice: it withdraws consent rather than
- // merely suggesting one. The toggle is still there to opt back in.
- if (q) chosen.current = false;
- if (!chosen.current) setAutoplay(!q);
- };
- const syncNarrow = () => setSmall(narrow.matches);
- syncMotion();
- syncNarrow();
-
- motion.addEventListener("change", syncMotion);
- narrow.addEventListener("change", syncNarrow);
- return () => {
- motion.removeEventListener("change", syncMotion);
- narrow.removeEventListener("change", syncNarrow);
- };
- }, [hydrated]);
-
- useEffect(() => {
- if (!hydrated) return;
- if (typeof IntersectionObserver === "undefined") return;
-
- const clearTimer = (id: string) => {
- const t = timers.current.get(id);
- if (t) {
- clearTimeout(t);
- timers.current.delete(id);
- }
- };
-
- const observer = new IntersectionObserver(
- (entries) => {
- for (const entry of entries) {
- const id = (entry.target as HTMLElement).dataset.bandId;
- if (!id) continue;
- if (!entry.isIntersecting) {
- clearTimer(id);
- continue;
- }
- // `quiet` is not consulted here. It has already set the default
- // this gate reads, and consulting it twice made the toggle
- // unable to do anything at all for a reduced-motion reader.
- if (!state.current.autoplay) continue;
- // A band whose play() the browser actually refused has lost its
- // control; handing it the element again would leave the page
- // playing a clip with nothing beside it to stop.
- if (state.current.refusedIds.has(id)) continue;
- if (timers.current.has(id)) continue;
- timers.current.set(
- id,
- setTimeout(() => {
- timers.current.delete(id);
- setActiveId((current) => (current === id ? current : id));
- }, DWELL_MS),
- );
- }
- },
- { threshold: VISIBLE },
- );
-
- for (const node of nodes.current.values()) observer.observe(node);
- const timersAtCleanup = timers.current;
- return () => {
- observer.disconnect();
- for (const t of timersAtCleanup.values()) clearTimeout(t);
- timersAtCleanup.clear();
- };
- }, [hydrated]);
-
- // One ref callback per band id, cached. Returning a fresh closure each render
- // makes React detach and re-attach every ref on every render, which empties
- // and refills the map the observer was set up from.
- const refCallbacks = useRef(new Map<string, (node: HTMLElement | null) => void>());
- const registerBand = useCallback((id: string) => {
- let cb = refCallbacks.current.get(id);
- if (!cb) {
- cb = (node: HTMLElement | null) => {
- if (node) nodes.current.set(id, node);
- else nodes.current.delete(id);
- };
- refCallbacks.current.set(id, cb);
- }
- return cb;
- }, []);
-
- // Ownership is a claim on the element, not an instruction to start. Asking the
- // band that already holds it to play writes its own id back over itself, React
- // bails out of the render, and nothing downstream ever hears about it — which
- // is why the token exists and why every caller must go through here.
- const play = useCallback((id: string) => {
- setActiveId(id);
- setPlayToken((n) => n + 1);
- }, []);
-
- const markPlayed = useCallback((id: string) => {
- setPlayedIds((prev) => {
- if (prev.has(id)) return prev;
- const next = new Set(prev);
- next.add(id);
- return next;
- });
- }, []);
-
- const markRefused = useCallback((id: string) => {
- setActiveId((current) => (current === id ? null : current));
- setRefusedIds((prev) => {
- if (prev.has(id)) return prev;
- const next = new Set(prev);
- next.add(id);
- return next;
- });
- }, []);
-
- const chooseAutoplay = useCallback((on: boolean) => {
- chosen.current = true;
- setAutoplay(on);
- }, []);
-
- const stopAutoplay = useCallback(() => {
- chosen.current = true;
- setAutoplay(false);
- // Clearing the timers is the half that matters: a dwell scheduled a moment
- // before the click would otherwise mount a clip after the control already
- // reads off.
- for (const t of timers.current.values()) clearTimeout(t);
- timers.current.clear();
- // Marking it played first — the band it stops is a band the reader has seen
- // motion from, and releasing the element must not snap the picture back to
- // the opening frame.
- if (state.current.activeId) markPlayed(state.current.activeId);
- setActiveId(null);
- }, [markPlayed]);
-
- return {
- activeId,
- playToken,
- playedIds,
- autoplay,
- setAutoplay: chooseAutoplay,
- stopAutoplay,
- hydrated,
- quiet,
- small,
- registerBand,
- play,
- markPlayed,
- markRefused,
- refusedIds,
- };
-}
diff --git a/website/src/components/Walkthrough/useScrub.ts b/website/src/components/Walkthrough/useScrub.ts
deleted file mode 100644
index 65d71eabf..000000000
--- a/website/src/components/Walkthrough/useScrub.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-import { useEffect, useRef, useState } from "react";
-
-/**
- * Scroll drives the picture.
- *
- * A band that has a scrub rendition gets taller than the viewport and pins its
- * figure, so scrolling through the band walks the clip frame by frame: the zoom
- * lands, the reply types itself, the render bar fills, all at the reader's own
- * pace and in either direction. Apple's product pages do the same thing per
- * section rather than as one pinned stage held across the page, which is also
- * what makes it degrade cleanly — take away two CSS rules and the band is an
- * ordinary picture beside an ordinary paragraph.
- *
- * Three things this does NOT do, each learned the expensive way:
- *
- * It does not scrub with `requestVideoFrameCallback`. That callback stops firing
- * whenever the element is not being composited, which is precisely the state you
- * would be trying to observe.
- *
- * It does not wait on `seeked` to pace itself. `seeked` fires at a p50 of 0.0 ms
- * — before any frame has been presented — so pacing on it means racing ahead of
- * the picture. The in-flight guard here is a plain boolean cleared by the same
- * event, used only to avoid queueing seeks, never to decide what is on screen.
- *
- * It does not touch the DOM on `scroll`. Every read happens once per animation
- * frame, and only while the band is on screen; a scroll listener that measures
- * layout is how a page that looks fine on a desktop turns to treacle on a phone.
- */
-
-const ATTR = "data-os-scrub";
-
-/** Set before first paint by the inline script in the section's <Head>, so the
- * tall pinned layout is never a post-hydration reflow. */
-export function useScrubEnabled(): boolean {
- const [on, setOn] = useState(false);
- useEffect(() => {
- // Narrow viewports are excluded on purpose, not by omission. A seek per
- // animation frame is the most expensive thing on the page, phones are where
- // it costs most and where the battery pays for it, and a pinned band on a
- // short screen leaves the copy nowhere to go. Below 901px the band is an
- // ordinary picture beside an ordinary paragraph, which is a fine thing to be.
- const motion = window.matchMedia("(prefers-reduced-motion: reduce)");
- const wide = window.matchMedia("(min-width: 901px)");
- const sync = () => {
- const ok = !motion.matches && wide.matches && CSS.supports("position", "sticky");
- document.documentElement.setAttribute(ATTR, ok ? "on" : "off");
- setOn(ok);
- };
- sync();
- motion.addEventListener("change", sync);
- wide.addEventListener("change", sync);
- return () => {
- motion.removeEventListener("change", sync);
- wide.removeEventListener("change", sync);
- };
- }, []);
- return on;
-}
-
-type Options = {
- /** The element whose scroll range maps to the clip. */
- band: React.RefObject<HTMLElement | null>;
- video: React.RefObject<HTMLVideoElement | null>;
- seconds: number;
- enabled: boolean;
-};
-
-export function useScrub({ band, video, seconds, enabled }: Options): {
- /** 0-1, for the progress rail. Updated on the same frame as the picture. */
- progress: number;
- /** True once enough of the clip has arrived to seek anywhere in it. */
- ready: boolean;
- /** True while the band's scroll range is on screen — the clip only mounts then. */
- near: boolean;
-} {
- const [progress, setProgress] = useState(0);
- const [ready, setReady] = useState(false);
- const [near, setNear] = useState(false);
- const seeking = useRef(false);
- const shown = useRef(-1);
-
- useEffect(() => {
- const el = band.current;
- if (!enabled || !el || typeof IntersectionObserver === "undefined") return;
- // A viewport of margin on each side: the clip has to be decodable by the
- // time its first frame is asked for, and a 268 KB file on a slow link is
- // not instant. Nothing is fetched for a band the reader never reaches.
- const io = new IntersectionObserver((entries) => setNear(entries[0].isIntersecting), {
- rootMargin: "100% 0px",
- });
- io.observe(el);
- return () => io.disconnect();
- }, [band, enabled]);
-
- useEffect(() => {
- if (!enabled || !near) return;
- const el = band.current;
- if (!el) return;
-
- let frame = 0;
- const tick = () => {
- frame = requestAnimationFrame(tick);
- const rect = el.getBoundingClientRect();
- const travel = rect.height - window.innerHeight;
- if (travel <= 0) return;
- const p = Math.min(1, Math.max(0, -rect.top / travel));
- setProgress(p);
-
- const v = video.current;
- if (!v || !v.duration || seeking.current) return;
- // Quantised to the clip's own frames: without this every rAF asks for a
- // new sub-frame time, the decoder never finishes one seek before the
- // next arrives, and the picture lags the scroll by a growing margin.
- const target = Math.min(seconds - 0.001, p * seconds);
- const step = Math.round((target * v.duration) / seconds / (1 / 20));
- if (step === shown.current) return;
- shown.current = step;
- seeking.current = true;
- v.currentTime = target;
- };
- frame = requestAnimationFrame(tick);
- return () => cancelAnimationFrame(frame);
- }, [band, video, seconds, enabled, near]);
-
- useEffect(() => {
- const v = video.current;
- if (!v || !near) return;
- const done = () => {
- seeking.current = false;
- };
- const loaded = () => setReady(true);
- // The state is read as well as subscribed to. `loadeddata` fires once, and
- // an element whose file is already in the HTTP cache reaches HAVE_CURRENT_DATA
- // before an effect can attach anything — so on a warm load the event is
- // simply gone, `ready` never turns true, and the clip scrubs correctly at
- // opacity 0 behind a poster that never changes. It looks exactly like a
- // feature that does not work, and only on the second visit.
- if (v.readyState >= 2) setReady(true);
- v.addEventListener("seeked", done);
- v.addEventListener("error", done);
- v.addEventListener("loadeddata", loaded);
- return () => {
- v.removeEventListener("seeked", done);
- v.removeEventListener("error", done);
- v.removeEventListener("loadeddata", loaded);
- };
- }, [video, near]);
-
- return { progress, ready, near };
-}
diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx
index c1e556233..cfb6c3588 100644
--- a/website/src/pages/index.tsx
+++ b/website/src/pages/index.tsx
@@ -2,9 +2,18 @@ import Head from "@docusaurus/Head";
import Link from "@docusaurus/Link";
import Heading from "@theme/Heading";
import Layout from "@theme/Layout";
-import { Apple, AppWindow, Cpu, Download, HeartHandshake, Monitor, TerminalSquare } from "lucide-react";
+import {
+ Apple,
+ AppWindow,
+ Cpu,
+ Download,
+ HeartHandshake,
+ Monitor,
+ TerminalSquare,
+} from "lucide-react";
-import Walkthrough from "../components/Walkthrough";
+import Editor from "../components/Editor";
+import Showcase from "../components/Showcase";
import { jsonLd, softwareApplicationLd } from "../lib/structured-data";
import styles from "./index.module.css";
@@ -49,13 +58,19 @@ export default function Home() {
</div>
</header>
- <Walkthrough />
+ {/* The argument, immediately after the hero. */}
+ <Editor />
+
+ {/* The claims the editor cannot make on its own. */}
+ <Showcase />
<section className={styles.features}>
<div className={styles.featuresInner}>
<div className={styles.sectionKicker}>Also true</div>
+ {/* Capabilities are the section above; these three are properties,
+ and no screenshot of the application can establish any of them. */}
<Heading as="h2" className={styles.sectionTitle}>
- Three things a clip can&apos;t show.
+ Three things a screenshot can&apos;t show.
</Heading>
<div className={styles.bento}>
diff --git a/website/static/img/walkthrough/01-record-a.jpg b/website/static/img/walkthrough/01-record-a.jpg
deleted file mode 100644
index 2514d89c5..000000000
Binary files a/website/static/img/walkthrough/01-record-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/01-record-sm-a.jpg b/website/static/img/walkthrough/01-record-sm-a.jpg
deleted file mode 100644
index 89b74c6f2..000000000
Binary files a/website/static/img/walkthrough/01-record-sm-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/02-timeline-a.jpg b/website/static/img/walkthrough/02-timeline-a.jpg
deleted file mode 100644
index 9069a19fd..000000000
Binary files a/website/static/img/walkthrough/02-timeline-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/02-timeline-sm-a.jpg b/website/static/img/walkthrough/02-timeline-sm-a.jpg
deleted file mode 100644
index 8f885aefe..000000000
Binary files a/website/static/img/walkthrough/02-timeline-sm-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/05-export-a.jpg b/website/static/img/walkthrough/05-export-a.jpg
deleted file mode 100644
index 3286a0863..000000000
Binary files a/website/static/img/walkthrough/05-export-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/05-export-b.jpg b/website/static/img/walkthrough/05-export-b.jpg
deleted file mode 100644
index 627683220..000000000
Binary files a/website/static/img/walkthrough/05-export-b.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/05-export-sm-a.jpg b/website/static/img/walkthrough/05-export-sm-a.jpg
deleted file mode 100644
index d18759f04..000000000
Binary files a/website/static/img/walkthrough/05-export-sm-a.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/05-export-sm-b.jpg b/website/static/img/walkthrough/05-export-sm-b.jpg
deleted file mode 100644
index 3aacc8d29..000000000
Binary files a/website/static/img/walkthrough/05-export-sm-b.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/editor-1040.avif b/website/static/img/walkthrough/editor-1040.avif
deleted file mode 100644
index 56a3457a1..000000000
Binary files a/website/static/img/walkthrough/editor-1040.avif and /dev/null differ
diff --git a/website/static/img/walkthrough/editor-1040.jpg b/website/static/img/walkthrough/editor-1040.jpg
deleted file mode 100644
index 31bb43f99..000000000
Binary files a/website/static/img/walkthrough/editor-1040.jpg and /dev/null differ
diff --git a/website/static/img/walkthrough/editor-1560.avif b/website/static/img/walkthrough/editor-1560.avif
deleted file mode 100644
index 531259964..000000000
Binary files a/website/static/img/walkthrough/editor-1560.avif and /dev/null differ
diff --git a/website/static/img/walkthrough/editor-1560.jpg b/website/static/img/walkthrough/editor-1560.jpg
deleted file mode 100644
index 7bfd6e929..000000000
Binary files a/website/static/img/walkthrough/editor-1560.jpg and /dev/null differ
diff --git a/website/static/video/05-export-scrub.mp4 b/website/static/video/05-export-scrub.mp4
deleted file mode 100644
index 999215dbb..000000000
Binary files a/website/static/video/05-export-scrub.mp4 and /dev/null differ
diff --git a/website/static/video/05-export-sm-scrub.mp4 b/website/static/video/05-export-sm-scrub.mp4
deleted file mode 100644
index 558d17296..000000000
Binary files a/website/static/video/05-export-sm-scrub.mp4 and /dev/null differ
diff --git a/website/static/video/05-export-sm.mp4 b/website/static/video/05-export-sm.mp4
deleted file mode 100644
index b0415b552..000000000
Binary files a/website/static/video/05-export-sm.mp4 and /dev/null differ
diff --git a/website/static/video/05-export.mp4 b/website/static/video/05-export.mp4
deleted file mode 100644
index 9fe755cc7..000000000
Binary files a/website/static/video/05-export.mp4 and /dev/null differ