AI media harness for planning, generating, and editing locally
TypeScript
Remove project hover play
Bitti51018c1feef0
diff --git a/src/components/ProjectCard.tsx b/src/components/ProjectCard.tsxindex ac2e7cb..ce2c9ca 100644--- a/src/components/ProjectCard.tsx+++ b/src/components/ProjectCard.tsx@@ -1,4 +1,4 @@-import { Clock3, Folder, MoreHorizontal, Play, Ratio, Sparkles, Trash2 } from "lucide-react";+import { Clock3, Folder, MoreHorizontal, Ratio, Sparkles, Trash2 } from "lucide-react";import { useEffect, useRef, useState } from "react";import { resolutionLabel, visibleClipAt } from "../lib/export";import type { ProjectRecord } from "../lib/project";@@ -83,7 +83,6 @@ export function ProjectCard({ project, index, onOpen, onDelete }: ProjectCardPro/>}<span className="project-card__format"><Ratio size={13} /> {config.settings.aspectRatio}</span><span className="project-card__quality">{resolutionLabel(config.settings.resolution, config.settings.aspectRatio)}</span>- <span className="project-card__play"><Play size={18} fill="currentColor" /></span><div className="project-card__art-copy"><Sparkles size={15} /><span>{config.brief.prompt}</span></div></div></button>diff --git a/src/lib/theme.test.ts b/src/lib/theme.test.tsindex dd3238f..53fceaf 100644--- a/src/lib/theme.test.ts+++ b/src/lib/theme.test.ts@@ -477,8 +477,6 @@ const LITERALS_ALLOWED: Record<string, Record<string, string>> = {the test instead, and the test recomputes them. */".project-card__format, .project-card__quality":"white ink on the dark plate this rule paints for itself, clearing 4.5:1 over any backdrop at all — recomputed from the two literals by the test below",- ".project-card__play":- "white ink on the dark disc this rule paints for itself, clearing 4.5:1 over any backdrop at all — recomputed from the two literals by the test below",".project-card__art-copy":"white ink on the strip this rule paints for itself, clearing 4.5:1 over any backdrop at all — recomputed from the two literals by the test below",".project-card__art-copy::before":@@ -615,12 +613,12 @@ describe("no stylesheet outside tokens.css names a colour", () => {}});-/* --- The three rules that land on a picture instead of a palette ----------- *+/* --- The two rules that land on a picture instead of a palette ------------- *Everywhere else, legibility is a property of two tokens and can be arguedabout by reading tokens.css. The library card's cover chrome is the- exception: the two badges, the play disc and the caption all print white ink- over generated artwork, and every one of them was exempted from the guard above.+ exception: the two badges and the caption print white ink over generated+ artwork, and both rules are exempted from the guard above.The caption's exemption used to read "white on a dark picture in both themes,because the picture is dark in both". Two of the four covers are not dark: it@@ -628,15 +626,15 @@ describe("no stylesheet outside tokens.css names a colour", () => {themes — with a text-shadow as the only thing standing between the user'swords and a blank strip.- The badges and the play disc then inherited a subtler version of the same- fiction: "each carries its OWN dark plate, whatever the picture under it- turns out to be", asserted in prose with nothing recomputing it. Their plates- were rgba(4,6,10,0.55) and rgba(5,7,11,0.45), which composite to mid-grey- over a pale backdrop — 3.78:1 and 3.22:1 measured over a white thumbnail,- both failing 4.5:1 over exactly the case the sentence claimed to cover.+ The badges then inherited a subtler version of the same fiction: "each+ carries its OWN dark plate, whatever the picture under it turns out to be",+ asserted in prose with nothing recomputing it. Their plate was+ rgba(4,6,10,0.55), which composites to mid-grey over a pale backdrop —+ 3.78:1 measured over a white thumbnail,+ failing 4.5:1 over exactly the case the sentence claimed to cover.`backdrop-filter: blur(8px)` does not help: it blurs without darkening.- So none of the three is trusted to prose any more. Each is recomputed here+ So neither rule is trusted to prose any more. Each is recomputed herefrom its own two literals against the worst backdrop that can physicallyexist — PURE WHITE — which is a floor rather than an average: every realcover is darker than white, so every real cover composites darker than this.@@ -694,7 +692,6 @@ function inkOnPlate(rule: string, backdrop: number[]): number {thing tying a bound to the rule it is a bound for. */const COVER_CHROME = {"\n.project-card__format,\n.project-card__quality {": "the two corner badges",- "\n.project-card__play {": "the play disc","\n.project-card__art-copy {": "the caption strip",};@@ -703,12 +700,11 @@ describe("the chrome that sits on the cover artwork", () => {it("computes a ratio it can be caught getting wrong", () => {/* The maths above is the whole assertion, so it gets its own self-check- before it is trusted with three rules. Both plates below are the ones+ before it is trusted with two rules. Both plates below are the onesthat actually shipped and actually failed; if a refactor made thisfunction optimistic, these are what would go green first. */expect(inkOnPlate("color: #fff; background: rgba(4,6,10,0.86);", WHITE)).toBeCloseTo(14.59, 1);expect(inkOnPlate("color: rgba(255,255,255,0.85); background: rgba(4,6,10,0.55);", WHITE)).toBeCloseTo(3.79, 1);- expect(inkOnPlate("color: #fff; background: rgba(5,7,11,0.45);", WHITE)).toBeCloseTo(3.22, 1);/* And that it is reading BOTH literals rather than one: opaque black plate,white ink, is 21:1 and nothing else is. */expect(inkOnPlate("color: #fff; background: rgba(0,0,0,1);", WHITE)).toBeCloseTo(21, 5);diff --git a/src/styles/library.css b/src/styles/library.cssindex 064ae36..82872bf 100644--- a/src/styles/library.css+++ b/src/styles/library.css@@ -512,8 +512,8 @@/* Generated cover artwork — decorative, sizes intentionally unchanged.THEME-INDEPENDENT ON PURPOSE. Everything from here to .project-card__body is- a picture, not a surface: four generated cover illustrations and the badges,- play button and caption that sit ON TOP of one. A cover does not become a+ a picture, not a surface: four generated cover illustrations and the badges+ and caption that sit ON TOP of one. A cover does not become alight-theme cover any more than a photograph does, and running these through--text-* would put one theme's ink on a picture that is the same in both.@@ -531,13 +531,11 @@thumbnail set through ProjectCard's inline background-image, which this filecannot see. theme.test.ts recomputes all three from the literals below.- The badges and the play button did NOT always carry that. The sentence here- used to say they did, and the numbers say otherwise: over a white thumbnail- the badges measured 3.78:1 and the play triangle 3.22:1, because a plate at- 0.55 and a disc at 0.45 composite to mid-grey over white and `backdrop-filter`- blurs without darkening. Their alphas were raised to 0.70 and 0.64, which is- what makes the paragraph above true rather than aspirational; a plate that- thin was the same defect as the caption's old text-shadow, one rule over. */+ The badges did NOT always carry that. The sentence here used to say they did,+ and the numbers say otherwise: over a white thumbnail the badges measured+ 3.78:1 because a plate at 0.55 composites to mid-grey over white and+ `backdrop-filter` blurs without darkening. Its alpha was raised to 0.70,+ which makes the paragraph above true rather than aspirational. */.project-card__art--aurora {background: linear-gradient(155deg, #101c38, #172d55 45%, #6e6d4d);}@@ -642,29 +640,6 @@right: var(--space-3);}-.project-card__play {- position: absolute;- z-index: 3;- inset: 50% auto auto 50%;- transform: translate(-50%, -50%) scale(0.8);- width: var(--control-lg);- height: var(--control-lg);- display: grid;- place-items: center;- border: 1px solid rgba(255, 255, 255, 0.35);- border-radius: 50%;- color: #fff;- background: rgba(5, 7, 11, 0.64);- opacity: 0;- transition: 0.2s;- backdrop-filter: blur(8px);-}--.project-card:hover .project-card__play {- opacity: 1;- transform: translate(-50%, -50%) scale(1);-}-/* The user's own project brief, over artwork this file cannot predict. A striprather than a fade, because a fade's alpha under the glyphs depends on wherethe line happens to land and no test could bound it: here every pixel behind