{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "browser-extension",
  "title": "Browser Extension",
  "description": "A browser extension highlights article text and saves a summary to a list.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/browser-extension/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/InstrumentSans\";\nimport { loadFont as loadSerif } from \"@remotion/google-fonts/SourceSerif4\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst { fontFamily } = loadFont(\"normal\", {\n  weights: [\"400\"],\n  subsets: [\"latin\"],\n});\nconst { fontFamily: serif } = loadSerif(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport interface BrowserExtensionProps {\n  url?: string;\n  siteName?: string;\n  kicker?: string;\n  title?: string;\n  dek?: string;\n  author?: string;\n  date?: string;\n  paragraphs?: string[];\n  highlights?: string[];\n  summary?: string[];\n  extensionName?: string;\n  collection?: string;\n  saveLabel?: string;\n  highlightColor?: string;\n  theme?: \"light\" | \"dark\";\n  accent?: string;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst DEFAULT_PARAGRAPHS = [\n  \"Every launch we studied had the same shape. The teams that shipped weekly were not the ones with the biggest roadmaps; they were the ones with the shortest distance between a decision and a deploy.\",\n  \"Small teams win because context never has to travel. When the person who talks to customers is the person who writes the code, a bug report becomes a fix before lunch. Nobody writes a ticket about a ticket.\",\n  \"That speed compounds. A team that ships twenty small releases learns twenty times; a team that ships one big release learns once, usually too late to change course.\",\n  \"The lesson is not to stay small forever. It is to protect the short loop as you grow: fewer handoffs, smaller batches, and owners who can ship without asking.\",\n];\nconst DEFAULT_HIGHLIGHTS = [\n  \"they were the ones with the shortest distance between a decision and a deploy.\",\n  \"Small teams win because context never has to travel.\",\n  \"A team that ships twenty small releases learns twenty times\",\n];\nconst DEFAULT_SUMMARY = [\n  \"Weekly shippers keep the loop from decision to deploy short.\",\n  \"Context stays with one owner, so bug reports become fixes fast.\",\n  \"Many small releases teach more than one big launch.\",\n];\n\ninterface Layout {\n  w: number;\n  h: number;\n  win: { x: number; y: number; w: number; h: number };\n  articleW: number;\n  body: number;\n  title: number;\n  padTop: number;\n  cursorFrom: { x: number; y: number };\n}\n\nconst LAYOUT_WIDE: Layout = {\n  w: 1280,\n  h: 720,\n  win: { x: 140, y: 64, w: 1000, h: 600 },\n  articleW: 492,\n  body: 17,\n  title: 40,\n  padTop: 92,\n  cursorFrom: { x: 560, y: 560 },\n};\n\nconst LAYOUT_TALL: Layout = {\n  w: 760,\n  h: 1351,\n  win: { x: 40, y: 166, w: 680, h: 1020 },\n  articleW: 560,\n  body: 19,\n  title: 44,\n  padTop: 150,\n  cursorFrom: { x: 420, y: 980 },\n};\n\nconst TABS_H = 40;\nconst BAR_H = 48;\nconst CHROME = TABS_H + BAR_H;\nconst POP_W = 372;\nconst extOf = (w: number) => ({ x: w - 112, y: TABS_H + 8, s: 32 });\nconst popOf = (w: number) => {\n  const ext = extOf(w);\n  const right = w - (ext.x + ext.s) - 8;\n  return { x: w - right - POP_W, top: CHROME + 6 };\n};\n\nconst T = {\n  click: 30,\n  read: 36,\n  hl: [54, 66, 78],\n  sum: 84,\n  toSave: 108,\n  save: 126,\n  saved: 138,\n  close: 160,\n  toast: 162,\n};\n\nconst clampX = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst enterE = Easing.bezier(0.22, 1, 0.36, 1);\nconst moveE = Easing.bezier(0.65, 0, 0.35, 1);\nconst exitE = Easing.bezier(0.55, 0, 1, 0.45);\nconst camE = Easing.bezier(0.87, 0, 0.13, 1);\nconst tween = (f: number, a: number, b: number, easing = enterE) =>\n  interpolate(f, [a, b], [0, 1], { ...clampX, easing });\n\nfunction withAlpha(hex: string, alpha: number) {\n  const h = hex.replace(\"#\", \"\");\n  const full = h.length === 3 ? h.replace(/./g, (c) => c + c) : h.slice(0, 6);\n  if (!/^[0-9a-fA-F]{6}$/.test(full)) return hex;\n  const n = Number.parseInt(full, 16);\n  return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;\n}\n\ninterface Pt {\n  x: number;\n  y: number;\n}\ninterface Key extends Pt {\n  t: number;\n}\n\nfunction pathAt(keys: Key[], f: number): Pt {\n  if (f <= keys[0].t) return keys[0];\n  for (let i = 1; i < keys.length; i++) {\n    const a = keys[i - 1];\n    const b = keys[i];\n    if (f <= b.t) {\n      const p = moveE(\n        Math.min(1, Math.max(0, (f - a.t) / Math.max(1, b.t - a.t))),\n      );\n      const dx = b.x - a.x;\n      const dy = b.y - a.y;\n      const d = Math.hypot(dx, dy) || 1;\n      const lift = Math.sin(p * Math.PI) * Math.min(36, d * 0.12);\n      return {\n        x: a.x + dx * p + (-dy / d) * lift,\n        y: a.y + dy * p + (dx / d) * lift,\n      };\n    }\n  }\n  return keys[keys.length - 1];\n}\n\ntype SpringCfg = { mass?: number; damping: number; stiffness?: number };\nconst HEAVY: SpringCfg = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD: SpringCfg = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP: SpringCfg = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH: SpringCfg = { damping: 200 };\n\ninterface Pal {\n  base: string;\n  scrim: string;\n  popShadow: string;\n  tabs: string;\n  tab: string;\n  bar: string;\n  omni: string;\n  page: string;\n  ink: string;\n  body: string;\n  muted: string;\n  faint: string;\n  line: string;\n  border: string;\n  pop: string;\n  well: string;\n  hover: string;\n  green: string;\n  shadow: string;\n  dark: boolean;\n}\n\nfunction palette(theme: \"light\" | \"dark\"): Pal {\n  return theme === \"dark\"\n    ? {\n        base: \"#07060C\",\n        scrim: \"rgba(6,5,12,0.25)\",\n        popShadow:\n          \"inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.1), 0 24px 56px -12px rgba(0,0,0,0.7)\",\n        tabs: \"#1B1C1F\",\n        tab: \"#2A2B2F\",\n        bar: \"#2A2B2F\",\n        omni: \"#1B1C1F\",\n        page: \"#151517\",\n        ink: \"#EDEDEF\",\n        body: \"#C9C9CE\",\n        muted: \"#A4A5AB\",\n        faint: \"#6E6F76\",\n        line: \"rgba(255,255,255,0.07)\",\n        border: \"rgba(255,255,255,0.1)\",\n        pop: \"#1F1F23\",\n        well: \"rgba(255,255,255,0.05)\",\n        hover: \"rgba(255,255,255,0.1)\",\n        green: \"#3DD68C\",\n        shadow:\n          \"inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.08), 0 40px 90px -24px rgba(0,0,0,0.75)\",\n        dark: true,\n      }\n    : {\n        base: \"#EEF0F6\",\n        scrim: \"rgba(246,246,250,0.2)\",\n        popShadow:\n          \"0 0 0 1px rgba(17,19,24,0.08), 0 4px 10px rgba(17,19,24,0.05), 0 24px 56px -12px rgba(17,19,24,0.25)\",\n        tabs: \"#ECEDF0\",\n        tab: \"#FFFFFF\",\n        bar: \"#FFFFFF\",\n        omni: \"#F1F3F4\",\n        page: \"#FFFFFF\",\n        ink: \"#171717\",\n        body: \"#2E2E33\",\n        muted: \"#5F6168\",\n        faint: \"#8E9096\",\n        line: \"rgba(17,19,24,0.07)\",\n        border: \"rgba(17,19,24,0.1)\",\n        pop: \"#FFFFFF\",\n        well: \"#F5F5F6\",\n        hover: \"rgba(17,19,24,0.07)\",\n        green: \"#16A34A\",\n        shadow:\n          \"0 0 0 1px rgba(17,19,24,0.07), 0 2px 4px rgba(17,19,24,0.04), 0 32px 72px -20px rgba(30,30,70,0.3)\",\n        dark: false,\n      };\n}\n\nconst ICONS = {\n  back: \"M19 12H5M11 6l-6 6 6 6\",\n  fwd: \"M5 12h14M13 6l6 6-6 6\",\n  reload: \"M20 11a8 8 0 1 0-2.3 5.7M20 4.5V11h-6.5\",\n  lock: \"M7.5 11V8a4.5 4.5 0 0 1 9 0v3M6 11h12v9.5H6z\",\n  star: \"M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z\",\n  puzzle:\n    \"M10 4.5a2 2 0 1 1 4 0V6h4v4h-1.5a2 2 0 1 0 0 4H18v4.5h-4.5V17a2 2 0 1 0-4 0v1.5H5V14h1.5a2 2 0 1 0 0-4H5V6h5z\",\n  key: \"M14.5 9.5a4.5 4.5 0 1 1-1.3-3.2M15.5 3.5l5 5M18 6l-2.5 2.5M9.6 14.4 3.5 20.5M6 18l2 2\",\n  close: \"M6 6l12 12M18 6 6 18\",\n  gear: \"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z\",\n  check: \"M20 6.5 9.5 17 4 11.5\",\n  chevDown: \"M6 9l6 6 6-6\",\n  highlighter: \"M9 11l-6 6v3h9l3-3M22 6.5 15.5 13 11 8.5 17.5 2z\",\n  list: \"M8 6h13M8 12h13M8 18h13M3.5 6h.01M3.5 12h.01M3.5 18h.01\",\n  bookmark: \"M18 21l-6-4.5L6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z\",\n  plus: \"M12 5v14M5 12h14\",\n} as const;\ntype IconName = keyof typeof ICONS;\n\nfunction Icon({\n  name,\n  color,\n  size = 16,\n  stroke = 1.75,\n  fill = \"none\",\n}: {\n  name: IconName;\n  color: string;\n  size?: number;\n  stroke?: number;\n  fill?: string;\n}) {\n  return (\n    <svg\n      width={size}\n      height={size}\n      viewBox=\"0 0 24 24\"\n      style={{ flexShrink: 0, display: \"block\" }}\n    >\n      <path\n        d={ICONS[name]}\n        fill={fill}\n        stroke={color}\n        strokeWidth={stroke}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction Spinner({\n  color,\n  size,\n  frame,\n}: {\n  color: string;\n  size: number;\n  frame: number;\n}) {\n  return (\n    <svg\n      width={size}\n      height={size}\n      viewBox=\"0 0 24 24\"\n      style={{ display: \"block\", transform: `rotate(${frame * 22}deg)` }}\n    >\n      <circle\n        cx={12}\n        cy={12}\n        r={9}\n        fill=\"none\"\n        stroke={color}\n        strokeOpacity={0.25}\n        strokeWidth={2.5}\n      />\n      <path\n        d=\"M12 3a9 9 0 0 1 9 9\"\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={2.5}\n        strokeLinecap=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction Cursor({ x, y, press }: { x: number; y: number; press: number }) {\n  return (\n    <svg\n      width={22}\n      height={26}\n      viewBox=\"0 0 20 24\"\n      style={{\n        position: \"absolute\",\n        left: x - 2,\n        top: y - 2,\n        transformOrigin: \"2px 2px\",\n        transform: `scale(${1 - 0.12 * press})`,\n        filter: \"drop-shadow(0 2px 3px rgba(0,0,0,0.28))\",\n        overflow: \"visible\",\n      }}\n    >\n      <path\n        d=\"M2 2 L2 19.5 L6.6 15.4 L9.8 22.4 L12.9 21 L9.8 14.2 L16 14.2 Z\"\n        fill=\"#FFFFFF\"\n        stroke=\"#16171A\"\n        strokeWidth={1.1}\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction ExtMark({ accent, size }: { accent: string; size: number }) {\n  return (\n    <div\n      style={{\n        width: size,\n        height: size,\n        borderRadius: size * 0.28,\n        background: accent,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.14)\",\n      }}\n    >\n      <svg width={size * 0.6} height={size * 0.6} viewBox=\"0 0 24 24\">\n        <path d=\"M7 4h10v16l-5-3.6L7 20z\" fill=\"#fff\" />\n      </svg>\n    </div>\n  );\n}\n\nfunction Paragraph({\n  text,\n  marks,\n  frame,\n  color,\n}: {\n  text: string;\n  marks: { text: string; at: number }[];\n  frame: number;\n  color: string;\n}) {\n  const parts: React.ReactNode[] = [];\n  let rest = text;\n  let k = 0;\n  for (const m of marks) {\n    const i = rest.indexOf(m.text);\n    if (i < 0) continue;\n    parts.push(rest.slice(0, i));\n    const p = tween(frame, m.at, m.at + 12, moveE);\n    parts.push(\n      <span\n        key={k++}\n        style={{\n          backgroundImage: `linear-gradient(${color}, ${color})`,\n          backgroundRepeat: \"no-repeat\",\n          backgroundSize: `${p * 100}% 100%`,\n          borderRadius: 2,\n          padding: \"1px 0\",\n        }}\n      >\n        {m.text}\n      </span>,\n    );\n    rest = rest.slice(i + m.text.length);\n  }\n  parts.push(rest);\n  return <>{parts}</>;\n}\n\nexport function BrowserExtension({\n  url = \"quarry.blog/notes/why-small-teams-ship-faster\",\n  siteName = \"Quarry Journal\",\n  kicker = \"Notes · 6 min read\",\n  title = \"Why small teams ship faster\",\n  dek = \"On the short loop between a decision and a deploy.\",\n  author = \"Priya Raman\",\n  date = \"Oct 14, 2026\",\n  paragraphs = DEFAULT_PARAGRAPHS,\n  highlights = DEFAULT_HIGHLIGHTS,\n  summary = DEFAULT_SUMMARY,\n  extensionName = \"remocn\",\n  collection = \"Reading list\",\n  saveLabel = \"Save to remocn\",\n  highlightColor,\n  theme = \"light\",\n  accent = \"#3B5BFD\",\n  speed = 1,\n  ground,\n  groundParams,\n}: BrowserExtensionProps) {\n  const frame = useCurrentFrame() * speed;\n  const { width: W, height: H, fps } = useVideoConfig();\n  const L = H > W ? LAYOUT_TALL : LAYOUT_WIDE;\n  const WIN = L.win;\n  const EXT = extOf(WIN.w);\n  const POP = popOf(WIN.w);\n  const u = W / L.w;\n  const pal = palette(theme);\n  const hlColor =\n    highlightColor ??\n    (pal.dark ? \"rgba(250,204,21,0.26)\" : \"rgba(250,204,21,0.36)\");\n  const sp = (at: number, config: SpringCfg, durationInFrames?: number) =>\n    spring({ frame: frame - at, fps, config, durationInFrames });\n  const tap = (at: number) => sp(at - 2, MORPH, 3) - sp(at + 2, CHIP);\n\n  const enter = sp(0, HEAVY);\n  const extPt = {\n    x: WIN.x + EXT.x + EXT.s / 2 + 2,\n    y: WIN.y + EXT.y + EXT.s / 2 + 3,\n  };\n  const savePt = {\n    x: WIN.x + POP.x + POP_W / 2 + 30,\n    y: WIN.y + POP.top + 404,\n  };\n  const keys: Key[] = [\n    { t: 6, ...L.cursorFrom },\n    { t: T.click - 3, ...extPt },\n    { t: T.toSave - 12, ...extPt },\n    { t: T.save - 3, ...savePt },\n    { t: T.saved + 8, ...savePt },\n    { t: T.saved + 34, x: savePt.x + 60, y: savePt.y + 150 },\n  ];\n  const cur = pathAt(keys, frame);\n  const press = Math.max(tap(T.click), tap(T.save));\n  const cursorOp =\n    tween(frame, 4, 10) * (1 - tween(frame, T.saved + 28, T.saved + 36, exitE));\n  const hoverExt =\n    tween(frame, T.click - 7, T.click - 3) *\n    (1 - tween(frame, T.toSave - 10, T.toSave - 6));\n\n  const open = sp(T.click + 1, CARD);\n  const closeP = tween(frame, T.close, T.close + 7, exitE);\n  const popOp = tween(frame, T.click + 1, T.click + 5) * (1 - closeP);\n  const reading = tween(frame, T.read, T.hl[0] - 2, moveE);\n  const hlCount = T.hl.filter((t) => frame >= t + 6).length;\n  const sumIn = (i: number) => tween(frame, T.sum + i * 3, T.sum + i * 3 + 10);\n  const saveHover = tween(frame, T.save - 6, T.save - 2);\n  const saving = frame >= T.save + 1 && frame < T.saved;\n  const saved = frame >= T.saved;\n  const savedIn = sp(T.saved, CHIP);\n  const toast = sp(T.toast, CARD);\n  const toastOp = tween(frame, T.toast, T.toast + 6);\n\n  const marks = highlights.map((h, i) => ({\n    text: h,\n    at: T.hl[i] ?? T.hl[T.hl.length - 1] + i * 10,\n  }));\n  const scroll = interpolate(frame, [T.hl[1] - 4, T.hl[2] + 6], [0, 52], {\n    ...clampX,\n    easing: moveE,\n  });\n  const cam = interpolate(frame, [0, 200], [1, 1.03], {\n    ...clampX,\n    easing: camE,\n  });\n  const ink = pal.dark ? \"#EDEDEF\" : \"#171717\";\n  const favicon = (size: number) => (\n    <div\n      style={{\n        width: size,\n        height: size,\n        borderRadius: size * 0.25,\n        background: pal.well,\n        boxShadow: `inset 0 0 0 1px ${pal.line}`,\n        color: ink,\n        fontFamily: serif,\n        fontSize: size * 0.55,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        flexShrink: 0,\n      }}\n    >\n      Q\n    </div>\n  );\n\n  return (\n    <AbsoluteFill\n      style={{\n        fontFamily,\n        overflow: \"hidden\",\n        WebkitFontSmoothing: \"antialiased\",\n        background: pal.base,\n      }}\n    >\n      <GshGround\n        preset={ground ?? (pal.dark ? \"velvet-hour\" : \"glasswork\")}\n        params={groundParams}\n        timeOffset={pal.dark ? 6 : 2}\n        timeScale={0.3}\n      />\n      <AbsoluteFill style={{ background: pal.scrim }} />\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: L.w,\n          height: L.h,\n          transformOrigin: \"0 0\",\n          transform: `scale(${u})`,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            transform: `scale(${cam})`,\n            transformOrigin: `${(extPt.x / L.w) * 100}% ${(extPt.y / L.h) * 100}%`,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: WIN.x,\n              top: WIN.y,\n              width: WIN.w,\n              height: WIN.h,\n              borderRadius: 14,\n              overflow: \"hidden\",\n              background: pal.page,\n              boxShadow: pal.shadow,\n              opacity: Math.min(1, enter * 1.6),\n              transform: `translateY(${(1 - enter) * 48}px) scale(${0.97 + 0.03 * enter})`,\n            }}\n          >\n            <div\n              style={{\n                height: TABS_H,\n                background: pal.tabs,\n                display: \"flex\",\n                alignItems: \"flex-end\",\n                padding: \"0 12px\",\n              }}\n            >\n              <div\n                style={{\n                  display: \"flex\",\n                  gap: 8,\n                  alignSelf: \"center\",\n                  marginRight: 16,\n                }}\n              >\n                {[0, 1, 2].map((c) => (\n                  <div\n                    key={c}\n                    style={{\n                      width: 12,\n                      height: 12,\n                      borderRadius: 99,\n                      boxShadow: `inset 0 0 0 1px ${pal.border}`,\n                    }}\n                  />\n                ))}\n              </div>\n              <div\n                style={{\n                  width: 280,\n                  height: 32,\n                  borderRadius: \"10px 10px 0 0\",\n                  background: pal.tab,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 8,\n                  padding: \"0 12px\",\n                  fontSize: 13,\n                  color: pal.ink,\n                }}\n              >\n                {favicon(16)}\n                <span\n                  style={{\n                    flex: 1,\n                    whiteSpace: \"nowrap\",\n                    overflow: \"hidden\",\n                    textOverflow: \"ellipsis\",\n                  }}\n                >\n                  {title}\n                </span>\n              </div>\n            </div>\n\n            <div\n              style={{\n                height: BAR_H,\n                background: pal.bar,\n                display: \"flex\",\n                alignItems: \"center\",\n                gap: 4,\n                padding: \"0 10px\",\n                borderBottom: `1px solid ${pal.line}`,\n                position: \"relative\",\n              }}\n            >\n              {([\"back\", \"fwd\", \"reload\"] as IconName[]).map((n) => (\n                <div\n                  key={n}\n                  style={{\n                    width: 32,\n                    height: 32,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                  }}\n                >\n                  <Icon\n                    name={n}\n                    color={n === \"fwd\" ? pal.faint : pal.muted}\n                    size={17}\n                    stroke={1.5}\n                  />\n                </div>\n              ))}\n              <div\n                style={{\n                  flex: 1,\n                  height: 34,\n                  borderRadius: 99,\n                  background: pal.omni,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 8,\n                  padding: \"0 14px\",\n                  fontSize: 14,\n                  color: pal.faint,\n                  marginRight: 8,\n                  whiteSpace: \"nowrap\",\n                  overflow: \"hidden\",\n                }}\n              >\n                <span style={{ color: pal.ink }}>{url.split(\"/\")[0]}</span>\n                <span style={{ marginLeft: -8 }}>\n                  /{url.split(\"/\").slice(1).join(\"/\")}\n                </span>\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: EXT.x,\n                  top: EXT.y - TABS_H,\n                  width: EXT.s,\n                  height: EXT.s,\n                  borderRadius: 8,\n                  background:\n                    open > 0.01 && popOp > 0\n                      ? pal.hover\n                      : withAlpha(\n                          pal.dark ? \"#ffffff\" : \"#111318\",\n                          (pal.dark ? 0.1 : 0.07) * hoverExt,\n                        ),\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  transform: `scale(${1 - 0.04 * tap(T.click)})`,\n                }}\n              >\n                <ExtMark accent={accent} size={18} />\n              </div>\n              <div style={{ width: EXT.s }} />\n              <div\n                style={{\n                  width: 32,\n                  height: 32,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                }}\n              >\n                <Icon name=\"puzzle\" color={pal.muted} size={17} stroke={1.5} />\n              </div>\n              <div\n                style={{\n                  width: 26,\n                  height: 26,\n                  borderRadius: 99,\n                  marginLeft: 4,\n                  background: pal.well,\n                  boxShadow: `inset 0 0 0 1px ${pal.line}`,\n                  color: pal.muted,\n                  fontSize: 11,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                }}\n              >\n                LP\n              </div>\n            </div>\n\n            <div\n              style={{\n                position: \"absolute\",\n                top: CHROME,\n                left: 0,\n                right: 0,\n                bottom: 0,\n                overflow: \"hidden\",\n              }}\n            >\n              <div\n                style={{\n                  display: \"flex\",\n                  padding: `${L.padTop}px 56px 0`,\n                  transform: `translateY(${-scroll}px)`,\n                }}\n              >\n                <article style={{ width: L.articleW }}>\n                  <div\n                    style={{\n                      fontSize: 13,\n                      color: pal.faint,\n                      fontVariantNumeric: \"tabular-nums\",\n                    }}\n                  >\n                    {kicker}\n                  </div>\n                  <div\n                    style={{\n                      fontFamily: serif,\n                      fontSize: L.title,\n                      fontWeight: 400,\n                      lineHeight: 1.08,\n                      letterSpacing: \"-0.025em\",\n                      color: pal.ink,\n                      marginTop: 10,\n                      textWrap: \"balance\",\n                    }}\n                  >\n                    {title}\n                  </div>\n                  <div\n                    style={{\n                      fontFamily: serif,\n                      fontSize: L.body + 1,\n                      fontWeight: 300,\n                      color: pal.muted,\n                      marginTop: 10,\n                      lineHeight: 1.45,\n                    }}\n                  >\n                    {dek}\n                  </div>\n                  <div\n                    style={{\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      gap: 8,\n                      marginTop: 18,\n                      fontSize: 14,\n                    }}\n                  >\n                    <span style={{ color: pal.ink }}>{author}</span>\n                    <span style={{ color: pal.faint }}>{date}</span>\n                  </div>\n                  <div\n                    style={{\n                      height: 1,\n                      background: pal.line,\n                      margin: \"22px 0 22px\",\n                    }}\n                  />\n                  {paragraphs.map((p) => (\n                    <p\n                      key={p.slice(0, 24)}\n                      style={{\n                        fontFamily: serif,\n                        fontSize: L.body,\n                        lineHeight: 1.65,\n                        color: pal.body,\n                        margin: \"0 0 18px\",\n                        textWrap: \"pretty\",\n                      }}\n                    >\n                      <Paragraph\n                        text={p}\n                        marks={marks.filter((m) => p.includes(m.text))}\n                        frame={frame}\n                        color={hlColor}\n                      />\n                    </p>\n                  ))}\n                </article>\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  top: 0,\n                  left: 0,\n                  right: 0,\n                  height: 58,\n                  background: pal.page,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  padding: \"0 56px\",\n                  borderBottom: `1px solid ${pal.line}`,\n                }}\n              >\n                <span\n                  style={{\n                    fontFamily: serif,\n                    fontSize: 21,\n                    color: pal.ink,\n                    letterSpacing: \"-0.01em\",\n                  }}\n                >\n                  {siteName}\n                </span>\n                <span\n                  style={{\n                    marginLeft: 36,\n                    display: \"flex\",\n                    gap: 22,\n                    fontSize: 14,\n                    color: pal.muted,\n                  }}\n                >\n                  <span>Essays</span>\n                  <span style={{ color: pal.ink }}>Notes</span>\n                  <span>About</span>\n                </span>\n              </div>\n            </div>\n\n            {popOp > 0 ? (\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: POP.x,\n                  top: POP.top,\n                  width: POP_W,\n                  borderRadius: 14,\n                  background: pal.pop,\n                  boxShadow: pal.popShadow,\n                  opacity: popOp,\n                  transform: `translateY(${(1 - open) * -8 - closeP * 6}px) scale(${0.94 + 0.06 * open - 0.03 * closeP})`,\n                  transformOrigin: `${EXT.x + EXT.s / 2 - POP.x}px -8px`,\n                  overflow: \"hidden\",\n                }}\n              >\n                <div\n                  style={{\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 9,\n                    padding: \"14px 16px\",\n                    borderBottom: `1px solid ${pal.line}`,\n                  }}\n                >\n                  <ExtMark accent={accent} size={20} />\n                  <span style={{ fontSize: 15, color: pal.ink }}>\n                    {extensionName}\n                  </span>\n                  <span style={{ marginLeft: \"auto\" }}>\n                    <Icon\n                      name=\"close\"\n                      color={pal.faint}\n                      size={15}\n                      stroke={1.5}\n                    />\n                  </span>\n                </div>\n\n                <div style={{ padding: \"14px 16px 16px\" }}>\n                  <div\n                    style={{ display: \"flex\", gap: 11, alignItems: \"center\" }}\n                  >\n                    {favicon(36)}\n                    <div style={{ minWidth: 0 }}>\n                      <div\n                        style={{\n                          fontSize: 15,\n                          color: pal.ink,\n                          whiteSpace: \"nowrap\",\n                          overflow: \"hidden\",\n                          textOverflow: \"ellipsis\",\n                        }}\n                      >\n                        {title}\n                      </div>\n                      <div\n                        style={{ fontSize: 13, color: pal.faint, marginTop: 2 }}\n                      >\n                        {url.split(\"/\")[0]} · {author}\n                      </div>\n                    </div>\n                  </div>\n\n                  <div\n                    style={{\n                      marginTop: 14,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      gap: 8,\n                      fontSize: 13,\n                      color: pal.muted,\n                      height: 18,\n                      fontVariantNumeric: \"tabular-nums\",\n                    }}\n                  >\n                    {reading < 1 ? (\n                      <>\n                        <Spinner color={pal.muted} size={13} frame={frame} />\n                        Reading page\n                        <span style={{ marginLeft: \"auto\" }}>\n                          {Math.round(reading * 100)}%\n                        </span>\n                      </>\n                    ) : (\n                      <>\n                        <Icon\n                          name=\"highlighter\"\n                          color={pal.muted}\n                          size={14}\n                          stroke={1.5}\n                        />\n                        <span>\n                          {hlCount} {hlCount === 1 ? \"highlight\" : \"highlights\"}\n                        </span>\n                        <span style={{ marginLeft: \"auto\", color: pal.faint }}>\n                          6 min read\n                        </span>\n                      </>\n                    )}\n                  </div>\n                  <div\n                    style={{\n                      marginTop: 8,\n                      height: 2,\n                      borderRadius: 99,\n                      background: pal.well,\n                      overflow: \"hidden\",\n                      opacity: 1 - tween(frame, T.hl[0], T.hl[0] + 6, exitE),\n                    }}\n                  >\n                    <div\n                      style={{\n                        width: \"100%\",\n                        height: \"100%\",\n                        background: ink,\n                        transformOrigin: \"0 50%\",\n                        transform: `scaleX(${reading})`,\n                      }}\n                    />\n                  </div>\n\n                  <div\n                    style={{ marginTop: 14, fontSize: 13, color: pal.faint }}\n                  >\n                    Summary\n                  </div>\n                  <div\n                    style={{\n                      marginTop: 8,\n                      minHeight: 160,\n                      position: \"relative\",\n                    }}\n                  >\n                    {summary.map((s, i) => {\n                      const a = sumIn(i);\n                      return (\n                        <div\n                          key={s}\n                          style={{\n                            display: \"flex\",\n                            gap: 10,\n                            fontSize: 14,\n                            lineHeight: 1.5,\n                            color: pal.ink,\n                            marginBottom: 10,\n                            opacity: a,\n                            transform: `translateY(${(1 - a) * 8}px)`,\n                          }}\n                        >\n                          <span\n                            style={{\n                              width: 14,\n                              color: pal.faint,\n                              fontVariantNumeric: \"tabular-nums\",\n                              flexShrink: 0,\n                            }}\n                          >\n                            {i + 1}\n                          </span>\n                          <span style={{ textWrap: \"pretty\" }}>{s}</span>\n                        </div>\n                      );\n                    })}\n                    {frame < T.sum + 6 ? (\n                      <div\n                        style={{\n                          position: \"absolute\",\n                          inset: \"4px 0 auto 24px\",\n                          display: \"flex\",\n                          flexDirection: \"column\",\n                          gap: 12,\n                          opacity:\n                            tween(frame, T.read + 4, T.read + 10) *\n                            (1 - tween(frame, T.sum - 2, T.sum + 4, exitE)),\n                        }}\n                      >\n                        {[92, 74, 86, 58].map((w) => (\n                          <div\n                            key={w}\n                            style={{\n                              width: `${w}%`,\n                              height: 10,\n                              borderRadius: 5,\n                              background: pal.well,\n                            }}\n                          />\n                        ))}\n                      </div>\n                    ) : null}\n                  </div>\n\n                  <div\n                    style={{\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      gap: 6,\n                      height: 40,\n                      borderTop: `1px solid ${pal.line}`,\n                      fontSize: 14,\n                    }}\n                  >\n                    <span style={{ color: pal.faint }}>Collection</span>\n                    <span style={{ marginLeft: \"auto\", color: pal.ink }}>\n                      {collection}\n                    </span>\n                    <Icon\n                      name=\"chevDown\"\n                      color={pal.faint}\n                      size={15}\n                      stroke={1.5}\n                    />\n                  </div>\n\n                  <div\n                    style={{\n                      marginTop: 8,\n                      height: 40,\n                      borderRadius: 8,\n                      background: saved\n                        ? withAlpha(pal.green, pal.dark ? 0.14 : 0.1)\n                        : accent,\n                      color: saved ? pal.green : \"#fff\",\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      justifyContent: \"center\",\n                      gap: 8,\n                      fontSize: 15,\n                      transform: `scale(${1 - 0.04 * tap(T.save)})`,\n                      filter: `brightness(${saved ? 1 : 1 - 0.08 * saveHover})`,\n                    }}\n                  >\n                    {saving ? (\n                      <Spinner color=\"#fff\" size={14} frame={frame} />\n                    ) : saved ? (\n                      <span\n                        style={{\n                          opacity: Math.min(1, savedIn),\n                          transform: `scale(${0.4 + 0.6 * savedIn})`,\n                        }}\n                      >\n                        <Icon\n                          name=\"check\"\n                          color={pal.green}\n                          size={16}\n                          stroke={2}\n                        />\n                      </span>\n                    ) : null}\n                    <span>\n                      {saving\n                        ? \"Saving\"\n                        : saved\n                          ? `Saved to ${collection}`\n                          : saveLabel}\n                    </span>\n                  </div>\n                </div>\n              </div>\n            ) : null}\n\n            {toastOp > 0 ? (\n              <div\n                style={{\n                  position: \"absolute\",\n                  right: 20,\n                  top: POP.top,\n                  transform: `translateY(${(1 - toast) * -18}px) scale(${0.96 + 0.04 * toast})`,\n                  transformOrigin: \"100% 0\",\n                  opacity: toastOp,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 12,\n                  height: 52,\n                  padding: \"0 8px 0 16px\",\n                  borderRadius: 12,\n                  background: pal.pop,\n                  boxShadow: pal.popShadow,\n                  color: pal.ink,\n                  fontSize: 15,\n                  whiteSpace: \"nowrap\",\n                }}\n              >\n                <Icon name=\"check\" color={pal.green} size={16} stroke={2} />\n                <span>Saved to {collection}</span>\n                <span\n                  style={{\n                    color: pal.faint,\n                    fontVariantNumeric: \"tabular-nums\",\n                  }}\n                >\n                  {highlights.length} highlights\n                </span>\n                <span\n                  style={{\n                    marginLeft: 4,\n                    height: 36,\n                    padding: \"0 14px\",\n                    borderRadius: 8,\n                    background: pal.well,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                  }}\n                >\n                  Open\n                </span>\n              </div>\n            ) : null}\n          </div>\n\n          {cursorOp > 0 ? (\n            <div style={{ opacity: cursorOp }}>\n              <Cursor x={cur.x} y={cur.y} press={press} />\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/browser-extension.tsx"
    }
  ],
  "type": "registry:component"
}
