AI media harness for planning, generating, and editing locally
TypeScript
Flatten application logo
Bitti1f5a6c5919ae
diff --git a/scripts/make-icons.mjs b/scripts/make-icons.mjsindex 6f13e8b..f5b07e5 100644--- a/scripts/make-icons.mjs+++ b/scripts/make-icons.mjs@@ -13,8 +13,8 @@* visible in the terminal instead of only in a taskbar.** The mark is the film ticket from the in-app logo (src/components/PolStudioLogo.tsx):- * a blue plate with a column of four perforations punched clean through it and a- * heavy white letter. Every size carries a single "P" — "PolS" is four letters in+ * a flat blue plate with a column of four perforations punched clean through it+ * and a heavy white letter. Every size carries a single "P" — "PolS" is four letters in* the space that fits one, and at 16px it was an illegible smudge.** The perforations are transparent, not white, at every size. They are 2x2 at@@ -32,12 +32,8 @@ const ICONS_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "src-tauri/* ---------------------------------------------------------------- geometry */-/** Gradient stops of .pol-logo__ticket: linear-gradient(145deg, ...). */-const PLATE_STOPS = [- [0.0, [0x08, 0x78, 0xf5]],- [0.48, [0x07, 0x5b, 0xe3]],- [1.0, [0x15, 0x3b, 0xc5]],-];+/** Stable brand blue shared with .pol-logo__ticket. */+const PLATE_COLOR = [0x3f, 0x64, 0xd9];/*** Layout for one canvas size, in pixel units.@@ -141,27 +137,6 @@ function inLetter(L, x, y) {return !inRoundRect(x, y, ix0, iy0, ix1, iy1, 0, rIn, rIn, 0);}-function plateColor(L, x, y) {- // linear-gradient(145deg, ...): axis points down-and-right.- const ax = Math.sin((145 * Math.PI) / 180);- const ay = -Math.cos((145 * Math.PI) / 180);- const { x0, y0, x1, y1 } = L.plate;- const proj = (px, py) => px * ax + py * ay;- const lo = Math.min(proj(x0, y0), proj(x1, y0), proj(x0, y1), proj(x1, y1));- const hi = Math.max(proj(x0, y0), proj(x1, y0), proj(x0, y1), proj(x1, y1));- const t = Math.max(0, Math.min(1, (proj(x, y) - lo) / (hi - lo || 1)));- for (let i = 1; i < PLATE_STOPS.length; i++) {- const [t1, c1] = PLATE_STOPS[i];- const [t0, c0] = PLATE_STOPS[i - 1];- if (t <= t1 || i === PLATE_STOPS.length - 1) {- const k = (t - t0) / (t1 - t0 || 1);- const kk = Math.max(0, Math.min(1, k));- return [0, 1, 2].map((j) => Math.round(c0[j] + (c1[j] - c0[j]) * kk));- }- }- return PLATE_STOPS[0][1];-}-const SS = 8; // supersampling factor per axis (64 samples/pixel)/** Rasterise one square canvas to RGBA bytes. */@@ -187,8 +162,7 @@ function render(size) {if (solid === 0) continue; // outside the plate, or entirely inside a holeconst a = solid / n;const inkShare = ink / solid;- const base = plateColor(L, px + 0.5, py + 0.5);- for (let j = 0; j < 3; j++) out[i + j] = Math.round(base[j] + (255 - base[j]) * inkShare);+ for (let j = 0; j < 3; j++) out[i + j] = Math.round(PLATE_COLOR[j] + (255 - PLATE_COLOR[j]) * inkShare);out[i + 3] = Math.round(a * 255);}}@@ -389,7 +363,7 @@ function buildICNS(images) {const RAMP = ".:-=+*#%@";/** Prints a decoded image as ASCII, ramped on the red channel: the plate is- * blue (r ~ 0x08-0x15) and the ink is white (r = 0xff), so red *is* the ink.+ * blue and the ink is white (r = 0xff), so red distinguishes the ink.* A blank is transparent — outside the plate, or one of the four perforations* punched through it, which is why the holes show as gaps in the column. */function ascii({ width, height, rgba }) {@@ -403,7 +377,7 @@ function ascii({ width, height, rgba }) {line += " ";continue;}- const ink = Math.max(0, Math.min(1, (rgba[i] - 0x18) / (0xff - 0x18)));+ const ink = Math.max(0, Math.min(1, (rgba[i] - PLATE_COLOR[0]) / (0xff - PLATE_COLOR[0])));line += RAMP[Math.min(RAMP.length - 1, Math.round(ink * (RAMP.length - 1)))];}lines.push(line);diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.pngindex 723949b..ac3dff4 100644Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differdiff --git a/src-tauri/icons/[email protected] b/src-tauri/icons/[email protected]index 717efc3..46ec043 100644Binary files a/src-tauri/icons/[email protected] and b/src-tauri/icons/[email protected] differdiff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.pngindex 1dd7383..58e3e5b 100644Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differdiff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icnsindex 03d5a0e..5c1813e 100644Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differdiff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.icoindex 80265ce..68686c9 100644Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differdiff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.pngindex a2d49a8..acedf89 100644Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differdiff --git a/src/App.test.tsx b/src/App.test.tsxindex bddab98..d143394 100644--- a/src/App.test.tsx+++ b/src/App.test.tsx@@ -91,6 +91,8 @@ describe("project library controls", () => {const { container } = render(<App />);await screen.findByText("Northern Light — Brand Film");expect(container.querySelector(".brand .pol-logo")).not.toBeNull();+ expect(container.querySelector(".brand .pol-logo__monogram")?.textContent).toBe("PolS");+ expect(container.querySelector(".brand .pol-logo__wordmark")?.textContent).toBe("tudio");expect(container.querySelector(".brand img")).toBeNull();const search = screen.getByRole("textbox", { name: "Search projects" });diff --git a/src/components/PolStudioLogo.tsx b/src/components/PolStudioLogo.tsxindex 4555178..91eca37 100644--- a/src/components/PolStudioLogo.tsx+++ b/src/components/PolStudioLogo.tsx@@ -20,12 +20,12 @@ export function PolStudioLogo({ compact = false, decorative = false, className =strip they occupy in the row, and the black fallback squares for abrowser that cannot composite the mask. See .pol-logo* in shell.css. */}<span className="pol-logo__perforations" aria-hidden="true"><i /><i /><i /><i /></span>- {/* The compact mark is the small application icon: one letter inside- the film ticket. "PolS" at icon size was four letters squeezed into- a space that fits one. */}- <span className="pol-logo__pols">{compact ? "P" : "PolS"}</span>+ {/* The full lockup keeps “PolS” inside the film badge: it is “Slop” in+ reverse and the visual idea behind the name. The compact application+ mark uses one letter so it remains legible at icon size. */}+ <span className="pol-logo__monogram">{compact ? "P" : "PolS"}</span></span>- {!compact && <span className="pol-logo__tudio">tudio</span>}+ {!compact && <span className="pol-logo__wordmark">tudio</span>}</span>);}diff --git a/src/lib/theme.test.ts b/src/lib/theme.test.tsindex 53fceaf..7a6a978 100644--- a/src/lib/theme.test.ts+++ b/src/lib/theme.test.ts@@ -441,11 +441,10 @@ const LITERALS_ALLOWED: Record<string, Record<string, string>> = {read for its ALPHA, so `fill='%23000'` means "opaque here" and nothing isever painted this colour — but it was legitimate by luck rather than byanyone's decision, which is the state the allowlist exists to end. */- ".pol-logo": "the fill of a mask image: mask-image reads alpha, so this black paints nothing",+ ".pol-logo":+ "brand mark: its fixed flat blue is shared with packaged icons; the data-URI black only supplies mask alpha",".pol-logo__ticket":"brand mark: the PolStudio ticket is one artwork, blue plate and white letter, in both themes",- ".pol-logo__ticket::before": "the ticket's blue plate, and the mask that cuts its perforations",- ".pol-logo__ticket::after": "the ticket's diamond tail, the same blue as the plate",".pol-logo__perforations i":"fallback perforations: painted black because a hole reads as a hole on any backdrop",},diff --git a/src/styles/shell.css b/src/styles/shell.cssindex 4ba8d51..f68deb5 100644--- a/src/styles/shell.css+++ b/src/styles/shell.css@@ -37,14 +37,9 @@/* --- Logo mark (decorative artwork — proportions preserved) ----------------- */-/* No plate behind the mark: it sits directly on whatever surface hosts it —- the topbar and the composer, both near-black. The wordmark therefore takes- the app's own text colour rather than the ink-on-white it used to need.-- Every horizontal size here is intrinsic. The ticket used to be a fixed 51px- while "PolS" only measures ~36px, so the mark carried ~15px of dead blue- between the S and the wordmark; the box around it was fixed too, adding more- dead space on the right. Both now size to the artwork. */+/* A flat film badge and wordmark. The badge uses one stable brand blue in every+ theme and at every size; its silhouette and punched perforations provide the+ visual character without gradients, highlights, or shadows. */.pol-logo {/* Perforation geometry, in one place. The strip in the flex row(.pol-logo__perforations) and the mask that punches the holes out of the@@ -58,61 +53,45 @@--pol-perf-gap: 1px;--pol-perf-span: calc(4 * var(--pol-perf-h) + 3 * var(--pol-perf-gap));--pol-perf-y: calc((var(--pol-ticket-h) - var(--pol-perf-span)) / 2);+ --pol-logo-blue: #3f64d9;/* One hole: a 4x3 rounded rect, used as a mask layer so a punched hole hasthe same soft corners the fallback rectangles carry. */--pol-perf-hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 3'%3E%3Crect width='4' height='3' rx='1' fill='%23000'/%3E%3C/svg%3E");- height: 39px;+ height: 36px;flex: 0 0 auto;display: inline-flex;align-items: center;overflow: hidden;- padding: 4px 5px;+ padding: 4px 3px;color: var(--text-primary);background: transparent;white-space: nowrap;}-/* The ticket is only the box now: its blue plate moved to ::before so a mask can- take bites out of it. The drop shadow stays here, where it is clipped to the- outside of the border box and so cannot leak in through a perforation. */+/* The plate lives on ::before so the perforations can be punched out without+ masking the white monogram. */.pol-logo__ticket {position: relative;z-index: 1;height: var(--pol-ticket-h);flex: 0 0 auto;- padding-right: var(--space-1);+ padding-right: 3px;display: flex;align-items: center;- border-radius: 4px 1px 1px 4px;+ border-radius: 7px;color: #fff;background: transparent;- box-shadow: 0 1px 3px #123cac55;}-/* The plate. A layer of its own purely so the perforations can be masked out of- it without the mask also eating the letter, the diamond tail or the shadow. */+/* The plate is a separate layer so its mask does not also eat the monogram. */.pol-logo__ticket::before {content: "";position: absolute;z-index: 0;inset: 0;border-radius: inherit;- background: linear-gradient(145deg, #0878f5 0%, #075be3 48%, #153bc5 100%);- box-shadow: inset 0 1px #ffffff35;-}--.pol-logo__ticket::after {- content: "";- position: absolute;- z-index: -1;- width: 13px;- height: 13px;- right: -6px;- top: 7px;- border-radius: 2px;- background: linear-gradient(135deg, #075be3, #153bc5);- transform: rotate(45deg);+ background: var(--pol-logo-blue);}/* Positioned above the plate, so the fallback squares below are not painted@@ -145,7 +124,7 @@@supports (mask-composite: exclude) {.pol-logo__ticket::before {mask-image: var(--pol-perf-hole), var(--pol-perf-hole), var(--pol-perf-hole), var(--pol-perf-hole),- linear-gradient(#000 0 0);+ linear-gradient(currentColor 0 0);mask-repeat: no-repeat;mask-size: var(--pol-perf-w) var(--pol-perf-h), var(--pol-perf-w) var(--pol-perf-h),var(--pol-perf-w) var(--pol-perf-h), var(--pol-perf-w) var(--pol-perf-h), 100% 100%;@@ -161,44 +140,43 @@}}-.pol-logo__pols {+.pol-logo__monogram {position: relative;z-index: 2;margin-left: 3px;font-size: var(--text-lg);font-weight: 800;line-height: 1;- letter-spacing: -1.5px;+ letter-spacing: -1.2px;}-.pol-logo__tudio {+.pol-logo__wordmark {position: relative;z-index: 2;- margin-left: var(--space-2);- padding-left: 1px;+ margin-left: 0;color: var(--text-primary);font-size: var(--text-xl);font-weight: var(--weight-bold);line-height: 1;- letter-spacing: -1.3px;+ letter-spacing: -0.7px;}/* Compact mark: the ticket with a single P in it. One letter has room to beread at icon size, so it takes the body size rather than the 12px floor. */.pol-logo--compact {- --pol-ticket-h: 21px;- height: 29px;- padding: 4px 5px;+ --pol-ticket-h: 22px;+ height: 30px;+ padding: 4px 3px;}-.pol-logo--compact .pol-logo__ticket::after {- top: 4px;+.pol-logo--compact .pol-logo__monogram {+ margin-left: 3px;+ font-size: var(--text-base);+ letter-spacing: -0.3px;}-.pol-logo--compact .pol-logo__pols {- margin-right: 1px;- font-size: var(--text-base);- letter-spacing: 0;+.pol-logo--compact .pol-logo__ticket {+ padding-right: 7px;}/* --- Settings launcher ------------------------------------------------------