An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
chore(icons): redraw the extension icon
Shahriar8234960c24b4
diff --git a/public/icon/128.png b/public/icon/128.pngindex 6012199..ad3a249 100644Binary files a/public/icon/128.png and b/public/icon/128.png differdiff --git a/public/icon/16.png b/public/icon/16.pngindex 4efcbe0..2e2879a 100644Binary files a/public/icon/16.png and b/public/icon/16.png differdiff --git a/public/icon/32.png b/public/icon/32.pngindex 5447030..a550acc 100644Binary files a/public/icon/32.png and b/public/icon/32.png differdiff --git a/public/icon/48.png b/public/icon/48.pngindex 6194f61..8b7f9b5 100644Binary files a/public/icon/48.png and b/public/icon/48.png differdiff --git a/public/icon/96.png b/public/icon/96.pngindex 09c0ad6..c90423e 100644Binary files a/public/icon/96.png and b/public/icon/96.png differdiff --git a/scripts/generate-icons.mjs b/scripts/generate-icons.mjsindex 7c56c01..6fbd649 100644--- a/scripts/generate-icons.mjs+++ b/scripts/generate-icons.mjs@@ -1,3 +1,4 @@+// Renders public/icon/{16,32,48,96,128}.png — the extension icon and the site favicon.import { deflateSync } from 'node:zlib';import { mkdirSync, writeFileSync } from 'node:fs';import { dirname, join } from 'node:path';@@ -54,103 +55,207 @@ function png(size, pixelAt) {const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));const lerp = (a, b, t) => a + (b - a) * t;-const VIOLET = [139, 92, 246];-const INDIGO = [79, 70, 229];--const CORNER = 0.22;-const STRIP_H = 0.26;-const DOTS = { y: 0.135, r: 0.036, x: [0.135, 0.225, 0.315] };-const CENTER_Y = 0.62;-const BARS_FULL = [- { x: 0.215, half: 0.07 },- { x: 0.3, half: 0.14 },- { x: 0.7, half: 0.14 },- { x: 0.785, half: 0.07 },++function oklch(L, C, hDeg) {+ const h = (hDeg * Math.PI) / 180;+ const a = C * Math.cos(h);+ const bb = C * Math.sin(h);++ const l_ = L + 0.3963377774 * a + 0.2158037573 * bb;+ const m_ = L - 0.1055613458 * a - 0.0638541728 * bb;+ const s_ = L - 0.0894841775 * a - 1.291485548 * bb;+ const l = l_ * l_ * l_;+ const m = m_ * m_ * m_;+ const s = s_ * s_ * s_;++ const lin = [+ 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,+ -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,+ -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,+ ];++ return lin.map((v) => {+ const c = clamp(v, 0, 1);+ const enc = c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;+ return enc * 255;+ });+}++const BG_TOP = oklch(0.208, 0.021, 50);+const BG_BOTTOM = oklch(0.138, 0.014, 52);+const BRAND = oklch(0.83, 0.13, 195);++const FRAME = { x0: 2.25, y0: 4.25, x1: 29.75, y1: 27.75, r: 6, stroke: 1.5, alpha: 0.55 };+const TITLEBAR = { y: 10.5, x0: 2.5, x1: 29.5, stroke: 1.25, alpha: 0.35 };+const CHROME_DOTS = [+ { x: 6.4, y: 7.4, r: 1, alpha: 0.5 },+ { x: 9.8, y: 7.4, r: 1, alpha: 0.35 },+];++// The two cubics of `M9 22.2 c2.4 0 2.4-6.4 6.9-6.4 s4.6 6.4 7 6.4`, expanded.+const CURVE = [+ [+ [9, 22.2],+ [11.4, 22.2],+ [11.4, 15.8],+ [15.9, 15.8],+ ],+ [+ [15.9, 15.8],+ [20.4, 15.8],+ [20.5, 22.2],+ [22.9, 22.2],+ ],];-const BARS_PLAIN = [- { x: 0.32, half: 0.1 },- { x: 0.5, half: 0.19 },- { x: 0.68, half: 0.1 },+const CURVE_STROKE = 1.75;++const NODES = [+ { x: 9, y: 22.2, r: 2.35, filled: false },+ { x: 15.9, y: 15.8, r: 2.55, filled: true },+ { x: 22.9, y: 22.2, r: 2.35, filled: false },];-const CHAIN = { off: 0.059, r: 0.075, halfW: 0.021 };+const NODE_STROKE = 1.6;-function detailFor(size) {- return { rings: size >= 48, dots: size >= 32, barHalfW: size >= 48 ? 0.026 : 0.06 };+const CLUSTER = { x: 15.95, y: 19.4 };++const CURVE_POINTS = (() => {+ const pts = [];+ for (const [p0, p1, p2, p3] of CURVE) {+ const steps = 48;+ for (let i = 0; i <= steps; i++) {+ const t = i / steps;+ const u = 1 - t;+ pts.push([+ u * u * u * p0[0] + 3 * u * u * t * p1[0] + 3 * u * t * t * p2[0] + t * t * t * p3[0],+ u * u * u * p0[1] + 3 * u * u * t * p1[1] + 3 * u * t * t * p2[1] + t * t * t * p3[1],+ ]);+ }+ }+ return pts;+})();++function rrectSdf(px, py, cx, cy, hw, hh, r) {+ const qx = Math.abs(px - cx) - (hw - r);+ const qy = Math.abs(py - cy) - (hh - r);+ return (+ Math.hypot(Math.max(qx, 0), Math.max(qy, 0)) + Math.min(Math.max(qx, qy), 0) - r+ );}-const snapEdge = (v, on) => (on ? Math.round(v) : v);-const snapMid = (v, on) => (on ? Math.floor(v) + 0.5 : v);+function segDist(px, py, ax, ay, bx, by) {+ const dx = bx - ax;+ const dy = by - ay;+ const len2 = dx * dx + dy * dy;+ const t = len2 === 0 ? 0 : clamp(((px - ax) * dx + (py - ay) * dy) / len2, 0, 1);+ return Math.hypot(px - (ax + t * dx), py - (ay + t * dy));+}-function distToVSegment(px, py, x, y1, y2) {- const cy = clamp(py, y1, y2);- return Math.hypot(px - x, py - cy);+function polylineDist(px, py, pts) {+ let best = Infinity;+ for (let i = 1; i < pts.length; i++) {+ const d = segDist(px, py, pts[i - 1][0], pts[i - 1][1], pts[i][0], pts[i][1]);+ if (d < best) best = d;+ }+ return best;+}++function detailFor(size) {+ if (size >= 96) return { frame: true, titlebar: true, dots: true, scale: 1, boost: 1, curveBoost: 1, solidNodes: false };+ if (size >= 48) return { frame: true, titlebar: true, dots: false, scale: 1, boost: 1.1, curveBoost: 1.1, solidNodes: false };+ if (size >= 32) return { frame: true, titlebar: false, dots: false, scale: 1, boost: 1.25, curveBoost: 1.15, solidNodes: false };+ // 16px: ring interiors fall under a pixel, so nodes go solid; scale is capped by+ // the outer node edge, 16 - (6.95 + 2.35) * scale, staying inside the tile.+ return { frame: false, titlebar: false, dots: false, scale: 1.45, boost: 1.5, curveBoost: 0.8, solidNodes: true };}function makePixelFn(size) {- const { rings, dots, barHalfW: barHalfWFrac } = detailFor(size);- const snap = !rings;- const corner = size * CORNER;- const barHalfW = snap ? Math.max(1, Math.round(size * barHalfWFrac)) : size * barHalfWFrac;- const bars = rings ? BARS_FULL : BARS_PLAIN;- const cy = snapEdge(size * CENTER_Y, snap);- const stripY = snapEdge(size * STRIP_H, snap);- const ringR = size * CHAIN.r;- const ringHalfW = size * CHAIN.halfW;- const ringGap = Math.max(1, size * 0.014);- const ringOff = (size * CHAIN.off) / Math.SQRT2;- const backX = size * 0.5 - ringOff;- const backY = cy + ringOff;- const frontX = size * 0.5 + ringOff;- const frontY = cy - ringOff;+ const d = detailFor(size);+ const unit = size / 32;++ const tx = (x) => (d.scale === 1 ? x : (x - CLUSTER.x) * d.scale + 16) * unit;+ const ty = (y) => (d.scale === 1 ? y : (y - CLUSTER.y) * d.scale + 16) * unit;+ const ts = (v) => v * d.scale * unit;++ const curvePts = CURVE_POINTS.map(([x, y]) => [tx(x), ty(y)]);+ const nodes = NODES.map((n) => ({+ x: tx(n.x),+ y: ty(n.y),+ r: ts(n.r),+ filled: n.filled || d.solidNodes,+ }));+ const curveHalf = (ts(CURVE_STROKE) * d.curveBoost) / 2;+ const nodeHalf = (ts(NODE_STROKE) * d.boost) / 2;+ const bgCorner = size * 0.22;return (ix, iy) => {const x = ix + 0.5;const y = iy + 0.5;- const dx = Math.max(corner - x, x - (size - corner), 0);- const dy = Math.max(corner - y, y - (size - corner), 0);- const bg = clamp(corner + 0.5 - Math.hypot(dx, dy), 0, 1);- if (bg === 0) return [0, 0, 0, 0];++ const tile = clamp(+ 0.5 - rrectSdf(x, y, size / 2, size / 2, size / 2, size / 2, bgCorner),+ 0,+ 1,+ );+ if (tile === 0) return [0, 0, 0, 0];const t = (x + y) / (2 * size);- let r = lerp(VIOLET[0], INDIGO[0], t);- let g = lerp(VIOLET[1], INDIGO[1], t);- let b = lerp(VIOLET[2], INDIGO[2], t);-- let white = 0.18 * clamp(stripY + 0.5 - y, 0, 1);- if (dots) {- const dotR = snap ? Math.max(1, Math.round(DOTS.r * size)) : DOTS.r * size;- const dotY = snapMid(DOTS.y * size, snap);- for (const dotX of DOTS.x) {- const d = Math.hypot(x - snapMid(dotX * size, snap), y - dotY);- white = Math.max(white, 0.75 * clamp(dotR + 0.5 - d, 0, 1));+ let r = lerp(BG_TOP[0], BG_BOTTOM[0], t);+ let g = lerp(BG_TOP[1], BG_BOTTOM[1], t);+ let b = lerp(BG_TOP[2], BG_BOTTOM[2], t);++ const paint = (alpha) => {+ if (alpha <= 0) return;+ const a = clamp(alpha, 0, 1);+ r = lerp(r, BRAND[0], a);+ g = lerp(g, BRAND[1], a);+ b = lerp(b, BRAND[2], a);+ };++ if (d.frame) {+ const half = (FRAME.stroke * unit * d.boost) / 2;+ const sdf = rrectSdf(+ x,+ y,+ ((FRAME.x0 + FRAME.x1) / 2) * unit,+ ((FRAME.y0 + FRAME.y1) / 2) * unit,+ ((FRAME.x1 - FRAME.x0) / 2) * unit,+ ((FRAME.y1 - FRAME.y0) / 2) * unit,+ FRAME.r * unit,+ );+ paint(FRAME.alpha * clamp(half + 0.5 - Math.abs(sdf), 0, 1));+ }++ if (d.titlebar) {+ const half = (TITLEBAR.stroke * unit) / 2;+ const dist = segDist(x, y, TITLEBAR.x0 * unit, TITLEBAR.y * unit, TITLEBAR.x1 * unit, TITLEBAR.y * unit);+ paint(TITLEBAR.alpha * clamp(half + 0.5 - dist, 0, 1));+ }++ if (d.dots) {+ for (const dot of CHROME_DOTS) {+ const dist = Math.hypot(x - dot.x * unit, y - dot.y * unit);+ paint(dot.alpha * clamp(dot.r * unit + 0.5 - dist, 0, 1));}}- let ink = 0;- for (const bar of bars) {- const halfH = Math.max(snapEdge(bar.half * size, snap) - barHalfW, 0);- const d = distToVSegment(x, y, snapEdge(bar.x * size, snap), cy - halfH, cy + halfH);- ink = Math.max(ink, clamp(barHalfW + 0.5 - d, 0, 1));+ // The connector runs behind the outlined nodes; their interiors punch it back out.+ let occlusion = 1;+ for (const n of nodes) {+ if (n.filled) continue;+ occlusion *= 1 - clamp(n.r - nodeHalf + 0.5 - Math.hypot(x - n.x, y - n.y), 0, 1);}+ paint(clamp(curveHalf + 0.5 - polylineDist(x, y, curvePts), 0, 1) * occlusion);- if (rings) {- const toFront = Math.hypot(x - frontX, y - frontY);- const back = Math.abs(Math.hypot(x - backX, y - backY) - ringR);- const front = Math.abs(toFront - ringR);- const occluded = clamp(toFront - (ringR + ringHalfW + ringGap) + 0.5, 0, 1);- ink = Math.max(- ink,- clamp(ringHalfW + 0.5 - back, 0, 1) * occluded,- clamp(ringHalfW + 0.5 - front, 0, 1),+ for (const n of nodes) {+ const dist = Math.hypot(x - n.x, y - n.y);+ paint(+ n.filled+ ? clamp(n.r + 0.5 - dist, 0, 1)+ : clamp(nodeHalf + 0.5 - Math.abs(dist - n.r), 0, 1),);}- white = Math.max(white, ink);- r = lerp(r, 255, white);- g = lerp(g, 255, white);- b = lerp(b, 255, white);-- return [Math.round(r), Math.round(g), Math.round(b), Math.round(bg * 255)];+ return [Math.round(r), Math.round(g), Math.round(b), Math.round(tile * 255)];};}