{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"changelog-feed","type":"registry:block","title":"Changelog feed","description":"Release notes you can filter, open in place, and scroll through month by month.","categories":["blocks"],"dependencies":["lucide-react","motion"],"registryDependencies":["https://ui.teamofsilicons.com/r/silicon-motion-tokens.json","https://ui.teamofsilicons.com/r/copy-button.json"],"files":[{"path":"registry/blocks/changelog-feed/changelog-feed.tsx","type":"registry:component","target":"@components/silicon-ui/blocks/changelog-feed/changelog-feed.tsx","content":"\"use client\";\n\nimport { useCallback, useEffect, useId, useMemo, useRef, useState, type FocusEvent, type FormEvent, type KeyboardEvent } from \"react\";\nimport Image, { type StaticImageData } from \"next/image\";\nimport { AnimatePresence, motion, useAnimate, useReducedMotion, type Transition, type Variants } from \"motion/react\";\nimport { ArrowRight, Bell, Check, ChevronDown } from \"lucide-react\";\nimport { CopyButton } from \"../../copy-button/copy-button\";\nimport { motionTokens } from \"../../lib/motion-tokens\";\nimport { photo } from \"../../lib/media\";\nimport styles from \"./changelog-feed.module.css\";\n\nexport type ChangelogKind = \"new\" | \"improved\" | \"fixed\";\ntype Kind = ChangelogKind;\nexport type ChangelogMedia =\n  | { type: \"photo\"; src: StaticImageData | string; alt: string; caption: string; /** Pixel size, needed when `src` is a URL rather than an imported image. */ width?: number; height?: number }\n  | { type: \"code\"; file: string; code: string };\ntype Media = ChangelogMedia;\nexport type ChangelogEntry = { id: string; month: string; date: string; iso: string; version: string; kind: Kind; title: string; summary: string; details: string[]; media?: Media };\nexport type ChangelogMonth = { key: string; label: string; short: string };\ntype Entry = ChangelogEntry;\ntype Month = ChangelogMonth;\n\nconst kinds: { id: Kind; label: string }[] = [\n  { id: \"new\", label: \"New\" },\n  { id: \"improved\", label: \"Improved\" },\n  { id: \"fixed\", label: \"Fixed\" },\n];\n\n/** Sample photos load by URL from public/media, so the block installs without binary imports. */\nconst ceramics = photo(\"terracotta-waves\"), journal = photo(\"alpine-lake\"), bottle = photo(\"wine-bar\"), interior = photo(\"living-room\"), seaAtDusk = photo(\"sea-at-dusk\");\n\nconst exampleMonths: Month[] = [\n  { key: \"2026-09\", label: \"September 2026\", short: \"Sep\" },\n  { key: \"2026-08\", label: \"August 2026\", short: \"Aug\" },\n  { key: \"2026-07\", label: \"July 2026\", short: \"Jul\" },\n  { key: \"2026-06\", label: \"June 2026\", short: \"Jun\" },\n];\n\nconst webhookSnippet = `import { verifyWebhook } from \"@halden/node\";\n\nconst event = verifyWebhook(body, headers, secret);\n\nif (event.type === \"order.paid\") {\n  await fulfil(event.data.order); // ord_7Hq2Lx\n}`;\n\nconst dnsSnippet = `Type    Name       Value\nCNAME   shop       edge.halden.example\nTXT     _halden    verify=hd_4f81c2`;\n\nconst exampleEntries: Entry[] = [\n  { id: \"masonry\", month: \"2026-09\", date: \"Sep 18\", iso: \"2026-09-18\", version: \"4.12.0\", kind: \"new\", title: \"Masonry gallery layout\", summary: \"Mix portrait and landscape work without cropping a single frame.\", details: [\"Choose two to five columns for each breakpoint.\", \"Drag an image and the columns rebalance while you move it.\", \"Captions fall back to the image alt text.\"], media: { type: \"photo\", src: ceramics.src, width: ceramics.width, height: ceramics.height, alt: \"Wavy terracotta walls rising toward a blue sky\", caption: \"Gallery by Oda Lindqvist Ceramics, Bergen\" } },\n  { id: \"resumable\", month: \"2026-09\", date: \"Sep 18\", iso: \"2026-09-18\", version: \"4.12.0\", kind: \"improved\", title: \"Uploads resume after a dropped connection\", summary: \"Large uploads continue from the last finished chunk instead of starting over.\", details: [\"Files upload in 8 MB chunks, each retried up to five times.\", \"The upload queue survives a page reload.\"] },\n  { id: \"currency\", month: \"2026-09\", date: \"Sep 9\", iso: \"2026-09-09\", version: \"4.11.2\", kind: \"fixed\", title: \"Discount codes stay applied after a currency switch\", summary: \"Switching from EUR to CHF at checkout no longer clears an applied code.\", details: [\"Affected 0.4% of checkouts since 4.11.0.\", \"Totals are now recalculated on the server after every switch.\"] },\n  { id: \"webhooks\", month: \"2026-09\", date: \"Sep 2\", iso: \"2026-09-02\", version: \"4.11.0\", kind: \"new\", title: \"Order webhooks\", summary: \"Receive a signed request when an order is paid, refunded, or shipped.\", details: [\"Every request carries a timestamped signature.\", \"Failed deliveries retry with backoff for 72 hours.\"], media: { type: \"code\", file: \"webhooks.ts\", code: webhookSnippet } },\n  { id: \"covers\", month: \"2026-08\", date: \"Aug 26\", iso: \"2026-08-26\", version: \"4.10.0\", kind: \"new\", title: \"Journal posts with full-bleed covers\", summary: \"Open a story with one photograph that runs edge to edge on every screen.\", details: [\"Set a focal point so the crop holds on narrow phones.\", \"Covers load a blurred preview first, then the full image.\"], media: { type: \"photo\", src: journal.src, width: journal.width, height: journal.height, alt: \"A calm alpine lake reflecting a rocky peak at golden hour\", caption: \"Journal cover from Studio Varga, Budapest\" } },\n  { id: \"avif\", month: \"2026-08\", date: \"Aug 26\", iso: \"2026-08-26\", version: \"4.10.0\", kind: \"improved\", title: \"Product pages load 38% faster on mobile\", summary: \"Images now ship as AVIF with responsive sizes for each device.\", details: [\"Median largest paint dropped from 2.9 s to 1.8 s.\", \"Older browsers still receive WebP or JPEG.\"] },\n  { id: \"inventory\", month: \"2026-08\", date: \"Aug 14\", iso: \"2026-08-14\", version: \"4.9.3\", kind: \"fixed\", title: \"Stock no longer goes negative during a sale\", summary: \"Concurrent checkouts now reserve inventory in a single step.\", details: [\"Two buyers can no longer purchase the last item at the same moment.\", \"Oversold orders from August 9 to 13 were refunded automatically.\"] },\n  { id: \"shortcuts\", month: \"2026-08\", date: \"Aug 5\", iso: \"2026-08-05\", version: \"4.9.0\", kind: \"improved\", title: \"Keyboard shortcuts in the editor\", summary: \"Move, duplicate, and publish blocks without reaching for the mouse.\", details: [\"Press ⌘K to open the command menu from anywhere.\", \"Press ⌘D to duplicate the selected block.\", \"Press ⇧⌘P to publish the current page.\"] },\n  { id: \"variants\", month: \"2026-07\", date: \"Jul 22\", iso: \"2026-07-22\", version: \"4.8.0\", kind: \"new\", title: \"Variants with their own photos\", summary: \"Each colour or size can show its own gallery on the product page.\", details: [\"The page switches photos when a buyer picks a variant.\", \"Variants without photos fall back to the product gallery.\"], media: { type: \"photo\", src: bottle.src, width: bottle.width, height: bottle.height, alt: \"A carafe of red wine on a bar table in evening light\", caption: \"Carafe, 500 ml from Ferment Lab, Lyon\" } },\n  { id: \"timezone\", month: \"2026-07\", date: \"Jul 10\", iso: \"2026-07-10\", version: \"4.7.1\", kind: \"fixed\", title: \"Scheduled posts respect the studio time zone\", summary: \"A post scheduled for 09:00 in Zurich no longer goes live at 09:00 UTC.\", details: [\"Existing schedules were corrected on July 10.\", \"The scheduler now shows the time zone next to every slot.\"] },\n  { id: \"domains\", month: \"2026-07\", date: \"Jul 3\", iso: \"2026-07-03\", version: \"4.7.0\", kind: \"improved\", title: \"Custom domains verify in under a minute\", summary: \"Add two DNS records and Halden checks them every few seconds.\", details: [\"Certificates are issued as soon as the records resolve.\", \"Verification used to take up to an hour.\"], media: { type: \"code\", file: \"DNS records\", code: dnsSnippet } },\n  { id: \"rooms\", month: \"2026-06\", date: \"Jun 24\", iso: \"2026-06-24\", version: \"4.6.0\", kind: \"new\", title: \"Shoppable room photos\", summary: \"Tag products directly on an interior photo and link each tag to checkout.\", details: [\"Tags follow the photo when it is cropped or resized.\", \"Up to twelve products per photo.\"], media: { type: \"photo\", src: interior.src, width: interior.width, height: interior.height, alt: \"A bright living room with timber beams, arched windows, and cream sofas\", caption: \"Room by Maison Aubert, Montréal\" } },\n  { id: \"csv\", month: \"2026-06\", date: \"Jun 12\", iso: \"2026-06-12\", version: \"4.5.2\", kind: \"fixed\", title: \"CSV exports keep accented names\", summary: \"Names like Zoë and Håkon now open correctly in every spreadsheet app.\", details: [\"Exports are written as UTF-8 with a byte order mark.\", \"Re-export any file created since 4.5.0.\"] },\n  { id: \"search\", month: \"2026-06\", date: \"Jun 3\", iso: \"2026-06-03\", version: \"4.5.0\", kind: \"improved\", title: \"Media search understands subject and colour\", summary: \"Type what is in the picture and the library finds it.\", details: [\"Search works across 40,000 images in under 200 ms.\", \"Results group near-duplicates so each shot appears once.\"], media: { type: \"photo\", src: seaAtDusk.src, width: seaAtDusk.width, height: seaAtDusk.height, alt: \"A calm sea at dusk with a low island on the horizon\", caption: \"Result for “sea at dusk” in the media library\" } },\n];\n\n\nconst blurSoft = `blur(${motionTokens.blur.soft}px)`;\nconst blurSubtle = `blur(${motionTokens.blur.subtle}px)`;\nconst none = \"blur(0px)\";\nconst instant: Transition = { duration: 0 };\nconst exitSpring: Transition = { type: \"spring\", visualDuration: motionTokens.spring.moderate.visualDuration, bounce: 0 };\n\n/** Values rise when they grow and fall when they shrink; the outgoing value leaves the opposite way. */\nconst roll: Variants = {\n  enter: (direction: number) => ({ opacity: 0, y: `${direction * 55}%`, filter: blurSubtle }),\n  center: { opacity: 1, y: \"0%\", filter: none },\n  exit: (direction: number) => ({ opacity: 0, y: `${direction * -55}%`, filter: blurSubtle }),\n};\nconst rise: Variants = {\n  enter: (direction: number) => ({ opacity: 0, y: direction * 14, filter: blurSoft }),\n  center: { opacity: 1, y: 0, filter: none },\n  exit: (direction: number) => ({ opacity: 0, y: direction * -14, filter: blurSoft, transition: { duration: motionTokens.duration.exit, ease: [...motionTokens.ease.standard] } }),\n};\n\nfunction RollingNumber({ value, reduce }: { value: number; reduce: boolean }) {\n  const [state, setState] = useState({ value, direction: 1 });\n  if (state.value !== value) setState({ value, direction: value > state.value ? 1 : -1 });\n  return <span className={styles.roll}>\n    <AnimatePresence mode=\"popLayout\" initial={false} custom={state.direction}>\n      <motion.span key={value} custom={state.direction} variants={roll} initial=\"enter\" animate=\"center\" exit=\"exit\" transition={reduce ? instant : motionTokens.spring.snappy}>{value}</motion.span>\n    </AnimatePresence>\n  </span>;\n}\n\nconst emailPattern = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;\ntype SubscribeState = \"idle\" | \"editing\" | \"done\";\n\n/** One pill that becomes a field, then a confirmation. The shell morphs its width; the content swaps a beat later inside it. */\nfunction SubscribeControl({ reduce }: { reduce: boolean }) {\n  const inputId = useId();\n  const [state, setState] = useState<SubscribeState>(\"idle\");\n  const [email, setEmail] = useState(\"\");\n  const [error, setError] = useState(false);\n  const [width, setWidth] = useState<number | null>(null);\n  const innerRef = useRef<HTMLDivElement>(null);\n  const inputRef = useRef<HTMLInputElement>(null);\n  const idleRef = useRef<HTMLButtonElement>(null);\n  const undoRef = useRef<HTMLButtonElement>(null);\n  const focusNext = useRef(false);\n  const [shakeScope, animate] = useAnimate<HTMLDivElement>();\n\n  useEffect(() => {\n    const element = innerRef.current;\n    if (!element) return;\n    const observer = new ResizeObserver(() => setWidth(element.offsetWidth));\n    observer.observe(element);\n    return () => observer.disconnect();\n  }, []);\n\n  useEffect(() => {\n    if (!focusNext.current) return;\n    focusNext.current = false;\n    const target = state === \"editing\" ? inputRef.current : state === \"done\" ? undoRef.current : idleRef.current;\n    target?.focus({ preventScroll: true });\n  }, [state]);\n\n  function go(next: SubscribeState, focus = true) { focusNext.current = focus; setState(next); }\n  function submit(event: FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (!emailPattern.test(email.trim())) {\n      setError(true);\n      if (!reduce && shakeScope.current) animate(shakeScope.current, { x: [0, -6, 5, -3, 2, 0] }, { duration: motionTokens.duration.expressive, ease: [...motionTokens.ease.standard] });\n      inputRef.current?.focus();\n      return;\n    }\n    setError(false);\n    go(\"done\");\n  }\n  function onKeyDown(event: KeyboardEvent<HTMLFormElement>) { if (event.key === \"Escape\") { setError(false); go(\"idle\"); } }\n  function onBlur(event: FocusEvent<HTMLFormElement>) { if (!event.currentTarget.contains(event.relatedTarget) && !email.trim()) { setError(false); go(\"idle\", false); } }\n  function undo() { setEmail(\"\"); go(\"idle\"); }\n\n  const swap: Transition = reduce ? { duration: motionTokens.duration.instant } : { opacity: { duration: motionTokens.duration.fast, delay: 0.05 }, filter: { duration: motionTokens.duration.fast, delay: 0.05 }, scale: { ...motionTokens.spring.morph, delay: 0.03 } };\n  const leave = { opacity: 0, scale: 0.96, filter: blurSubtle, transition: { duration: motionTokens.duration.instant } };\n  const note = error ? \"Enter a valid email address\" : state === \"done\" ? \"Subscribed.\" : \"\";\n\n  return <div className={styles.subscribeWrap}>\n    <div ref={shakeScope}>\n      <motion.div className={styles.subscribe} data-state={state} data-error={error || undefined} initial={false} animate={{ width: width ?? \"auto\" }} transition={reduce ? instant : motionTokens.spring.morph}>\n        <div ref={innerRef} className={styles.subscribeInner}>\n          <AnimatePresence mode=\"popLayout\" initial={false}>\n            {state === \"idle\" && <motion.button key=\"idle\" ref={idleRef} type=\"button\" className={styles.subscribeIdle} onClick={() => go(\"editing\")} initial={{ opacity: 0, scale: 0.96, filter: blurSubtle }} animate={{ opacity: 1, scale: 1, filter: none }} exit={leave} transition={swap}>\n              <Bell size={14} aria-hidden=\"true\" />Subscribe\n            </motion.button>}\n            {state === \"editing\" && <motion.form key=\"form\" className={styles.subscribeForm} noValidate onSubmit={submit} onKeyDown={onKeyDown} onBlur={onBlur} initial={{ opacity: 0, scale: 0.96, filter: blurSubtle }} animate={{ opacity: 1, scale: 1, filter: none }} exit={leave} transition={swap}>\n              <label className={styles.srOnly} htmlFor={inputId}>Email address</label>\n              <input ref={inputRef} id={inputId} type=\"email\" inputMode=\"email\" autoComplete=\"email\" placeholder=\"you@example.com\" value={email} aria-invalid={error || undefined} onChange={(event) => { setEmail(event.target.value); if (error) setError(false); }} />\n              <button type=\"submit\" className={styles.subscribeSubmit} aria-label=\"Subscribe to release notes\"><ArrowRight size={14} /></button>\n            </motion.form>}\n            {state === \"done\" && <motion.div key=\"done\" className={styles.subscribeDone} initial={{ opacity: 0, scale: 0.96, filter: blurSubtle }} animate={{ opacity: 1, scale: 1, filter: none }} exit={leave} transition={swap}>\n              <svg className={styles.drawnCheck} width={15} height={15} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                <motion.path d=\"M4 12.5l5 5L20 6.5\" initial={{ pathLength: 0 }} animate={{ pathLength: 1 }} transition={reduce ? instant : { duration: 0.42, ease: [...motionTokens.ease.standard], delay: 0.12 }} />\n              </svg>\n              <span>Subscribed</span>\n              <button ref={undoRef} type=\"button\" className={styles.subscribeUndo} onClick={undo} aria-label={`Undo subscription for ${email.trim()}`}>Undo</button>\n            </motion.div>}\n          </AnimatePresence>\n        </div>\n      </motion.div>\n    </div>\n    <p className={styles.subscribeNote} data-error={error || undefined} role=\"status\" aria-live=\"polite\">\n      <AnimatePresence mode=\"popLayout\" initial={false}>\n        {note && <motion.span key={note} initial={{ opacity: 0, y: -4, filter: blurSubtle }} animate={{ opacity: 1, y: 0, filter: none }} exit={{ opacity: 0, transition: { duration: motionTokens.duration.instant } }} transition={reduce ? instant : { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.enter] }}>{note}</motion.span>}\n      </AnimatePresence>\n    </p>\n  </div>;\n}\n\nfunction EntryMedia({ media }: { media: Media }) {\n  if (media.type === \"photo\") {\n    return <figure className={styles.photo}>\n      <div className={styles.photoFrame}>{typeof media.src === \"string\"\n        ? <Image src={media.src} alt={media.alt} width={media.width ?? 1600} height={media.height ?? 1067} sizes=\"(max-width: 700px) 100vw, 560px\" />\n        : <Image src={media.src} alt={media.alt} placeholder=\"blur\" sizes=\"(max-width: 700px) 100vw, 560px\" />}</div>\n      <figcaption>{media.caption}</figcaption>\n    </figure>;\n  }\n  return <div className={styles.code}>\n    <div className={styles.codeHead}><span>{media.file}</span><CopyButton value={media.code} label={`Copy ${media.file}`} iconOnly variant=\"plain\" /></div>\n    <pre><code>{media.code}</code></pre>\n  </div>;\n}\n\nfunction EntryRow({ entry, open, onToggle, reduce }: { entry: Entry; open: boolean; onToggle: () => void; reduce: boolean }) {\n  const panelId = useId();\n  const kind = kinds.find((item) => item.id === entry.kind)!;\n  const layout: Transition = reduce ? instant : motionTokens.spring.smooth;\n  return <motion.li\n    layout=\"position\"\n    className={styles.entry}\n    data-open={open || undefined}\n    initial={reduce ? { opacity: 0 } : { opacity: 0, filter: blurSubtle }}\n    animate={{ opacity: 1, filter: none }}\n    exit={reduce ? { opacity: 0, transition: { duration: motionTokens.duration.instant } } : { opacity: 0, scale: 0.98, filter: blurSubtle, transition: { duration: motionTokens.duration.exit, ease: [...motionTokens.ease.standard] } }}\n    transition={reduce ? { duration: 0, opacity: { duration: motionTokens.duration.instant } } : { opacity: { duration: motionTokens.duration.standard }, filter: { duration: motionTokens.duration.standard }, layout }}\n  >\n    <button type=\"button\" className={styles.row} aria-expanded={open} aria-controls={panelId} onClick={onToggle}>\n      <span className={styles.meta}>\n        <time dateTime={entry.iso}>{entry.date}</time>\n        <span className={styles.version}>v{entry.version}</span>\n      </span>\n      <span className={styles.body}>\n        <span className={styles.kind} data-kind={entry.kind}><i aria-hidden=\"true\" />{kind.label}</span>\n        <span className={styles.title}>{entry.title}</span>\n        <span className={styles.summary}>{entry.summary}</span>\n      </span>\n      <motion.span className={styles.chevron} aria-hidden=\"true\" initial={false} animate={{ rotate: open ? 180 : 0 }} transition={reduce ? instant : motionTokens.spring.snappy}><ChevronDown size={16} /></motion.span>\n    </button>\n    <AnimatePresence initial={false}>\n      {open && <motion.div key=\"panel\" id={panelId} className={styles.panel} initial={{ height: 0 }} animate={{ height: \"auto\" }} exit={{ height: 0, transition: reduce ? instant : exitSpring }} transition={reduce ? instant : motionTokens.spring.smooth}>\n        <motion.div\n          className={styles.panelInner}\n          initial={{ opacity: 0, y: 8, filter: blurSoft }}\n          animate={{ opacity: 1, y: 0, filter: none }}\n          exit={{ opacity: 0, transition: { duration: motionTokens.duration.instant } }}\n          transition={reduce ? { duration: 0, opacity: { duration: motionTokens.duration.instant } } : { y: { ...motionTokens.spring.smooth, delay: 0.06 }, opacity: { duration: motionTokens.duration.standard, delay: 0.06 }, filter: { duration: motionTokens.duration.standard, delay: 0.06 } }}\n        >\n          <ul className={styles.details}>{entry.details.map((detail) => <li key={detail}>{detail}</li>)}</ul>\n          {entry.media && <EntryMedia media={entry.media} />}\n        </motion.div>\n      </motion.div>}\n    </AnimatePresence>\n  </motion.li>;\n}\n\nexport interface ChangelogFeedProps {\n  /** Release notes, newest first. Each entry belongs to one of `months` by key. */\n  entries?: ChangelogEntry[];\n  /** Months shown in the month bar, newest first. */\n  months?: ChangelogMonth[];\n  title?: string;\n  /** One line under the title, such as the latest release. */\n  subtitle?: string;\n  /** Closing line at the end of the list. */\n  endNote?: string;\n  /** Entry ids open on first render. Defaults to the newest entry. */\n  defaultOpen?: string[];\n  className?: string;\n}\n\nexport function ChangelogFeed({\n  entries = exampleEntries,\n  months = exampleMonths,\n  title = \"Changelog\",\n  subtitle = \"Halden 4.12 shipped on September 18, 2026\",\n  endNote = \"That is everything since Halden 4.5 in June.\",\n  defaultOpen,\n  className,\n}: ChangelogFeedProps = {}) {\n  const uid = useId();\n  const totalCount = entries.length;\n  const kindCounts = useMemo(() => kinds.reduce<Record<Kind, number>>((counts, kind) => ({ ...counts, [kind.id]: entries.filter((entry) => entry.kind === kind.id).length }), { new: 0, improved: 0, fixed: 0 }), [entries]);\n  const monthOrder = useCallback((key: string) => months.findIndex((month) => month.key === key), [months]);\n  const reduce = useReducedMotion() ?? false;\n  const [filters, setFilters] = useState<Kind[]>([]);\n  const [open, setOpen] = useState<string[]>(() => defaultOpen ?? (entries[0] ? [entries[0].id] : []));\n  const [active, setActive] = useState({ key: months[0]?.key ?? \"\", direction: 1 });\n  const scrollRef = useRef<HTMLDivElement>(null);\n  const listRef = useRef<HTMLDivElement>(null);\n  const groupRefs = useRef(new Map<string, HTMLElement>());\n  const frame = useRef(0);\n\n  const visible = useMemo(() => entries.filter((entry) => filters.length === 0 || filters.includes(entry.kind)), [entries, filters]);\n  const groups = useMemo(() => months.map((month) => ({ ...month, items: visible.filter((entry) => entry.month === month.key) })).filter((group) => group.items.length > 0), [months, visible]);\n  const current = groups.find((group) => group.key === active.key) ?? groups[0];\n\n  const sync = useCallback(() => {\n    const scroller = scrollRef.current;\n    if (!scroller || groups.length === 0) return;\n    const line = scroller.getBoundingClientRect().top + 28;\n    let key = groups[0]!.key;\n    for (const group of groups) {\n      const element = groupRefs.current.get(group.key);\n      if (element && element.getBoundingClientRect().top <= line) key = group.key;\n    }\n    if (scroller.scrollTop > 0 && scroller.scrollTop + scroller.clientHeight >= scroller.scrollHeight - 2) key = groups[groups.length - 1]!.key;\n    setActive((previous) => previous.key === key ? previous : { key, direction: monthOrder(key) > monthOrder(previous.key) ? 1 : -1 });\n  }, [groups, monthOrder]);\n\n  const onScroll = useCallback(() => {\n    if (frame.current) return;\n    frame.current = requestAnimationFrame(() => { frame.current = 0; sync(); });\n  }, [sync]);\n\n  useEffect(() => {\n    const list = listRef.current;\n    if (!list) return;\n    const observer = new ResizeObserver(() => onScroll());\n    observer.observe(list);\n    return () => observer.disconnect();\n  }, [onScroll]);\n  useEffect(() => () => cancelAnimationFrame(frame.current), []);\n\n  function toggleFilter(kind: Kind) { setFilters((previous) => previous.includes(kind) ? previous.filter((item) => item !== kind) : [...previous, kind]); }\n  function toggleEntry(id: string) { setOpen((previous) => previous.includes(id) ? previous.filter((item) => item !== id) : [...previous, id]); }\n  function jumpTo(key: string) {\n    const scroller = scrollRef.current;\n    const element = groupRefs.current.get(key);\n    if (!scroller || !element) return;\n    const top = scroller.scrollTop + element.getBoundingClientRect().top - scroller.getBoundingClientRect().top;\n    scroller.scrollTo({ top: Math.max(0, top - 1), behavior: reduce ? \"auto\" : \"smooth\" });\n  }\n\n  const shownLabel = filters.length === 0 ? `${totalCount} updates` : `${visible.length} of ${totalCount} updates`;\n  const layout: Transition = reduce ? instant : motionTokens.spring.smooth;\n\n  return <section className={[styles.feed, className].filter(Boolean).join(\" \")} aria-labelledby={`${uid}-title`}>\n    <header className={styles.header}>\n      <div className={styles.heading}>\n        <h2 id={`${uid}-title`}>{title}</h2>\n        {subtitle && <p>{subtitle}</p>}\n      </div>\n      <SubscribeControl reduce={reduce} />\n    </header>\n\n    <div className={styles.toolbar}>\n      <div className={styles.chips} role=\"group\" aria-label=\"Filter by type\">\n        {kinds.map((kind) => {\n          const on = filters.includes(kind.id);\n          return <button key={kind.id} type=\"button\" className={styles.chip} data-kind={kind.id} aria-pressed={on} onClick={() => toggleFilter(kind.id)}>\n            <motion.span className={styles.chipMark} aria-hidden=\"true\" initial={false} animate={{ width: on ? 16 : 7, height: on ? 16 : 7 }} transition={reduce ? instant : motionTokens.spring.morph}>\n              <motion.span className={styles.chipTick} initial={false} animate={{ opacity: on ? 1 : 0, scale: on ? 1 : 0.4 }} transition={reduce ? instant : { ...motionTokens.spring.snappy, delay: on ? 0.05 : 0 }}><Check size={11} strokeWidth={2.6} /></motion.span>\n            </motion.span>\n            <span>{kind.label}</span>\n            <span className={styles.chipCount}>{kindCounts[kind.id]}</span>\n          </button>;\n        })}\n        <AnimatePresence initial={false}>\n          {filters.length > 0 && <motion.button key=\"clear\" type=\"button\" className={styles.clear} onClick={() => setFilters([])} initial={{ opacity: 0, x: -6, filter: blurSubtle }} animate={{ opacity: 1, x: 0, filter: none }} exit={{ opacity: 0, x: -4, filter: blurSubtle, transition: { duration: motionTokens.duration.instant } }} transition={reduce ? instant : motionTokens.spring.snappy}>Show all</motion.button>}\n        </AnimatePresence>\n      </div>\n      <p className={styles.shown} aria-hidden=\"true\">\n        <motion.span className={styles.shownCount} layout=\"position\" transition={layout}><RollingNumber value={visible.length} reduce={reduce} /></motion.span>\n        <AnimatePresence mode=\"popLayout\" initial={false}>\n          <motion.span key={filters.length === 0 ? \"all\" : \"some\"} initial={{ opacity: 0, filter: blurSubtle }} animate={{ opacity: 1, filter: none }} exit={{ opacity: 0, transition: { duration: motionTokens.duration.instant } }} transition={reduce ? instant : { duration: motionTokens.duration.standard }}>{filters.length === 0 ? \"updates\" : `of ${totalCount} updates`}</motion.span>\n        </AnimatePresence>\n      </p>\n      <p className={styles.srOnly} role=\"status\" aria-live=\"polite\">{`Showing ${shownLabel}`}</p>\n    </div>\n\n    <div className={styles.monthBar}>\n      <div className={styles.monthLabel} aria-hidden=\"true\">\n        <span className={styles.monthText}>\n          <AnimatePresence mode=\"popLayout\" initial={false} custom={active.direction}>\n            <motion.span key={current?.key ?? \"none\"} custom={active.direction} variants={rise} initial=\"enter\" animate=\"center\" exit=\"exit\" transition={reduce ? instant : motionTokens.spring.morph}>{current ? <>{current.label.split(\" \")[0]}<span className={styles.monthYear}> {current.label.split(\" \")[1]}</span></> : \"No updates\"}</motion.span>\n          </AnimatePresence>\n        </span>\n        <motion.span className={styles.monthCount} layout=\"position\" transition={layout}><RollingNumber value={current?.items.length ?? 0} reduce={reduce} />{current?.items.length === 1 ? \"update\" : \"updates\"}</motion.span>\n      </div>\n      <nav className={styles.monthNav} aria-label=\"Jump to month\">\n        {groups.map((group) => {\n          const selected = group.key === current?.key;\n          return <button key={group.key} type=\"button\" aria-label={`Jump to ${group.label}`} aria-current={selected ? \"true\" : undefined} onClick={() => jumpTo(group.key)}>\n            {selected && <motion.span layoutId={`${uid}-month`} className={styles.monthPill} transition={reduce ? instant : motionTokens.spring.morph} />}\n            <span className={styles.monthShort}>{group.short}</span>\n          </button>;\n        })}\n      </nav>\n    </div>\n\n    <motion.div layoutScroll ref={scrollRef} className={styles.scroller} onScroll={onScroll} tabIndex={0} aria-label=\"Release notes\">\n      <div ref={listRef} className={styles.list}>\n        <AnimatePresence mode=\"popLayout\" initial={false}>\n          {groups.map((group, index) => <motion.section\n            key={group.key}\n            layout=\"position\"\n            className={styles.group}\n            aria-labelledby={`${uid}-${group.key}`}\n            ref={(element: HTMLElement | null) => { if (element) groupRefs.current.set(group.key, element); else groupRefs.current.delete(group.key); }}\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0, transition: { duration: motionTokens.duration.exit } }}\n            transition={{ layout, opacity: { duration: reduce ? motionTokens.duration.instant : motionTokens.duration.standard } }}\n          >\n            <h3 id={`${uid}-${group.key}`} className={index === 0 ? styles.srOnly : styles.groupTitle}>{group.label}</h3>\n            <ul className={styles.entries}>\n              <AnimatePresence mode=\"popLayout\" initial={false}>\n                {group.items.map((entry) => <EntryRow key={entry.id} entry={entry} open={open.includes(entry.id)} onToggle={() => toggleEntry(entry.id)} reduce={reduce} />)}\n              </AnimatePresence>\n            </ul>\n          </motion.section>)}\n        </AnimatePresence>\n        <motion.p layout=\"position\" transition={{ layout }} className={styles.endCap}>{endNote}</motion.p>\n      </div>\n    </motion.div>\n  </section>;\n}\n\nexport default ChangelogFeed;\n"},{"path":"registry/blocks/changelog-feed/changelog-feed.module.css","type":"registry:component","target":"@components/silicon-ui/blocks/changelog-feed/changelog-feed.module.css","content":".feed { box-sizing: border-box; width: min(100%, 920px); margin-inline: auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface); color: var(--foreground); font-family: var(--font-body); letter-spacing: var(--tracking-body); }\n.feed *, .feed *::before, .feed *::after { box-sizing: border-box; }\n.srOnly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n\n/* Header */\n.header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-inset) var(--space-section); padding: var(--space-block) var(--space-block) var(--space-comfort); }\n.heading { min-width: 0; }\n.heading h2 { margin: 0; font: 400 var(--text-3xl)/var(--leading-display) var(--font-display); letter-spacing: var(--tracking-display); }\n.heading p { margin: var(--space-related) 0 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }\n\n/* Subscribe */\n.subscribeWrap { position: relative; flex: none; padding-top: var(--space-hair); }\n.subscribe { height: 38px; overflow: hidden; border: 1px solid var(--foreground); border-radius: var(--radius-full); corner-shape: round; background: var(--foreground); color: var(--background); transition: background-color var(--duration-standard) var(--ease-standard), border-color var(--duration-standard) var(--ease-standard), color var(--duration-standard) var(--ease-standard); }\n.subscribe[data-state=\"editing\"] { border-color: var(--border-strong); background: var(--surface); color: var(--foreground); }\n.subscribe[data-state=\"done\"] { border-color: var(--border); background: var(--surface-muted); color: var(--foreground); }\n.subscribe[data-error] { border-color: var(--danger); }\n.subscribeInner { position: relative; display: flex; width: max-content; height: 100%; }\n.subscribeIdle { display: inline-flex; align-items: center; gap: var(--space-related); height: 100%; padding: 0 var(--space-inset) 0 var(--space-inset); border: 0; background: transparent; color: inherit; font: 500 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; outline: none; }\n.subscribeForm { display: flex; align-items: center; gap: var(--space-related); height: 100%; padding: 0 var(--space-tight) 0 var(--space-inset); }\n.subscribeForm input { width: 188px; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--foreground); font: var(--text-sm)/1 var(--font-body); outline: none; }\n.subscribeForm input::placeholder { color: var(--text-muted); }\n.subscribeSubmit { display: grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; corner-shape: round; background: var(--foreground); color: var(--background); cursor: pointer; outline: none; transition: transform var(--duration-instant) var(--ease-standard); }\n.subscribeSubmit:active { transform: scale(.94); }\n.subscribeDone { display: inline-flex; align-items: center; gap: var(--space-related); height: 100%; padding: 0 var(--space-tight) 0 var(--space-group); font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; }\n.drawnCheck { flex: none; color: var(--success); }\n.subscribeUndo { height: 26px; margin-left: var(--space-tight); padding: 0 var(--space-group); border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); font: 500 var(--text-xs)/1 var(--font-body); cursor: pointer; outline: none; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }\n.subscribeNote { position: absolute; top: calc(100% + var(--space-related)); right: var(--space-related); margin: 0; color: var(--text-muted); font-size: var(--text-xs); line-height: 16px; white-space: nowrap; }\n.subscribeNote[data-error] { color: var(--danger); }\n.subscribeNote span { display: inline-block; }\n\n/* Filters */\n.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-group) var(--space-inset); padding: var(--space-related) var(--space-block) var(--space-comfort); }\n.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-related); }\n.chip { display: inline-flex; align-items: center; gap: var(--space-related); height: 34px; padding: 0 var(--space-group) 0 var(--space-group); border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: background-color var(--duration-standard) var(--ease-standard), border-color var(--duration-standard) var(--ease-standard), color var(--duration-standard) var(--ease-standard), transform var(--duration-instant) var(--ease-standard); }\n.chip:active { transform: scale(.97); }\n.chip[aria-pressed=\"true\"] { border-color: var(--foreground); background: var(--foreground); color: var(--background); }\n.chipMark { display: grid; flex: none; place-items: center; overflow: hidden; border-radius: 50%; corner-shape: round; background: var(--kind); transition: background-color var(--duration-standard) var(--ease-standard); }\n.chip[aria-pressed=\"true\"] .chipMark { background: var(--mark); }\n.chipTick { display: grid; place-items: center; color: var(--tick); }\n.chipCount { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; transition: color var(--duration-standard) var(--ease-standard); }\n.chip[aria-pressed=\"true\"] .chipCount { color: color-mix(in srgb, var(--background) 62%, transparent); }\n.clear { height: 34px; padding: 0 var(--space-related); border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; }\n.shown { display: inline-flex; align-items: baseline; gap: var(--space-tight); margin: 0; color: var(--text-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }\n.shown > span:last-child { display: inline-block; }\n.shownCount { display: inline-flex; }\n\n.chip[data-kind=\"new\"], .kind[data-kind=\"new\"] { --kind: var(--accent); --mark: var(--accent); --tick: var(--accent-foreground); }\n.chip[data-kind=\"improved\"], .kind[data-kind=\"improved\"] { --kind: var(--text-muted); --mark: var(--background); --tick: var(--foreground); }\n.chip[data-kind=\"fixed\"], .kind[data-kind=\"fixed\"] { --kind: var(--success); --mark: var(--success); --tick: var(--background); }\n\n/* Rolling numbers */\n.roll { position: relative; display: inline-flex; overflow: hidden; font-variant-numeric: tabular-nums; }\n.roll > span { display: inline-block; }\n\n/* Month bar */\n.monthBar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-inset); min-height: 60px; padding: var(--space-group) var(--space-block); border-block: 1px solid var(--border); }\n.monthLabel { display: flex; align-items: baseline; gap: var(--space-group); min-width: 0; }\n.monthText { position: relative; display: inline-flex; font: 500 var(--text-lg)/var(--leading-body) var(--font-body); letter-spacing: var(--tracking-body); white-space: nowrap; }\n.monthText > span { display: inline-block; }\n.monthYear { display: inline; }\n.monthCount { display: inline-flex; align-items: baseline; gap: var(--space-tight); color: var(--text-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }\n.monthNav { display: flex; flex: none; gap: var(--space-hair); padding: var(--space-tight); border-radius: var(--radius-full); corner-shape: round; background: var(--surface-muted); }\n.monthNav button { position: relative; min-width: 42px; height: 28px; padding: 0 var(--space-group); border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); font: 500 var(--text-xs)/1 var(--font-body); cursor: pointer; transition: color var(--duration-standard) var(--ease-standard); }\n.monthNav button[aria-current=\"true\"] { color: var(--foreground); }\n.monthPill { position: absolute; inset: 0; border-radius: var(--radius-full); corner-shape: round; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-resting); }\n.monthShort { position: relative; z-index: 1; }\n\n/* Feed */\n.scroller { position: relative; height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; outline: none; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }\n.list { position: relative; }\n.group { position: relative; }\n.groupTitle { margin: 0; padding: var(--space-block) var(--space-block) var(--space-group); border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); }\n.entries { position: relative; margin: 0; padding: 0; list-style: none; }\n.entry { position: relative; border-bottom: 1px solid var(--border-subtle); background: var(--surface); }\n.entries > .entry:last-child { border-bottom: 0; }\n.row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 20px; align-items: start; gap: var(--space-tight) var(--space-section); width: 100%; padding: var(--space-section) var(--space-block); border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; transition: background-color var(--duration-standard) var(--ease-standard); }\n.meta { display: grid; justify-items: start; gap: var(--space-related); padding-top: 1px; }\n.meta time { color: var(--text-secondary); font-size: var(--text-sm); line-height: 20px; font-variant-numeric: tabular-nums; }\n.version { padding: 1px var(--space-related); border: 1px solid var(--border); border-radius: var(--radius-detail); corner-shape: var(--corner-shape); color: var(--text-secondary); font: 500 var(--text-xs)/18px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }\n.body { display: grid; gap: var(--space-related); min-width: 0; }\n.kind { display: inline-flex; align-items: center; gap: var(--space-related); color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-medium); line-height: 20px; }\n.kind i { width: 7px; height: 7px; border-radius: 50%; corner-shape: round; background: var(--kind); }\n.title { color: var(--foreground); font-size: var(--text-base); font-weight: var(--weight-medium); line-height: var(--leading-body); }\n.summary { max-width: 62ch; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }\n.chevron { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; color: var(--text-muted); transition: color var(--duration-standard) var(--ease-standard); }\n.entry[data-open] .chevron { color: var(--foreground); }\n.panel { overflow: hidden; }\n.panelInner { padding: 0 var(--space-screen) var(--space-block) calc(var(--space-screen) + var(--space-screen)); }\n.details { display: grid; gap: var(--space-related); max-width: 62ch; margin: 0; padding: 0; list-style: none; }\n.details li { position: relative; padding-left: var(--space-inset); color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }\n.details li::before { position: absolute; top: .75em; left: 1px; width: 6px; height: 1px; content: \"\"; background: var(--text-muted); }\n.photo { max-width: 560px; margin: var(--space-comfort) 0 0; }\n.photoFrame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--surface-muted); }\n.photoFrame img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.photoFrame::after { position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; content: \"\"; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground) 8%, transparent); pointer-events: none; }\n.photo figcaption { margin-top: var(--space-related); color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }\n.code { max-width: 560px; margin-top: var(--space-comfort); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--surface-muted); }\n.codeHead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-group); height: 40px; padding: 0 var(--space-related) 0 var(--space-inset); border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: var(--text-xs); }\n.code pre { margin: 0; padding: var(--space-inset) var(--space-inset) var(--space-inset); overflow-x: auto; color: var(--foreground); font: var(--text-xs)/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; tab-size: 2; scrollbar-width: thin; }\n.endCap { margin: 0; padding: var(--space-block) var(--space-block) var(--space-stage); color: var(--text-muted); font-size: var(--text-sm); text-align: center; }\n\n\n@media (hover: hover) and (pointer: fine) {\n  .chip:not([aria-pressed=\"true\"]):hover { border-color: var(--border-strong); color: var(--foreground); }\n  .clear:hover, .monthNav button:hover, .subscribeUndo:hover { color: var(--foreground); }\n  .subscribeUndo:hover { background: var(--surface); }\n  .row:hover { background: color-mix(in srgb, var(--surface-muted) 60%, transparent); }\n  .row:hover .chevron { color: var(--foreground); }\n}\n\n@media (max-width: 640px) {\n  .feed { border-radius: var(--radius-container); corner-shape: var(--corner-shape); }\n  .header { flex-direction: column; gap: var(--space-comfort); padding: var(--space-section) var(--space-comfort) var(--space-section); }\n  .subscribeNote { right: auto; left: var(--space-related); }\n  .subscribeForm input { width: 172px; font-size: var(--text-base); }\n  .toolbar { padding: var(--space-tight) var(--space-comfort) var(--space-comfort); }\n  .monthBar { padding-inline: var(--space-comfort); }\n  .scroller { height: 520px; }\n  .groupTitle { padding-inline: var(--space-comfort); }\n  .row { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: \"meta chevron\" \"body body\"; gap: var(--space-group) var(--space-group); padding: var(--space-comfort) var(--space-comfort); }\n  .meta { display: flex; grid-area: meta; align-items: center; gap: var(--space-group); padding-top: 0; }\n  .body { grid-area: body; }\n  .chevron { grid-area: chevron; margin-top: 0; }\n  .panelInner { padding: 0 var(--space-comfort) var(--space-section); }\n}\n\n@media (max-width: 480px) {\n  .monthCount, .monthYear { display: none; }\n  .monthText { font-size: var(--text-base); }\n  .monthNav button { min-width: 0; padding: 0 var(--space-related); }\n  .shown { display: none; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .feed *, .feed *::before, .feed *::after { transition-duration: 0ms !important; }\n  .chip:active, .subscribeSubmit:active { transform: none; }\n}\n\n"},{"path":"lib/media.ts","type":"registry:lib","target":"@components/silicon-ui/lib/media.ts","content":"/**\n * Shared demo media. Files live in `public/media/`, credits in `public/media/CREDITS.md`.\n * Portraits are 400 px squares; photos are 1600 px on the long side.\n */\n\nexport interface MediaPerson {\n  id: string;\n  name: string;\n  role?: string;\n  src: string;\n}\n\nexport interface MediaPhoto {\n  id: string;\n  alt: string;\n  src: string;\n  width: number;\n  height: number;\n}\n\nexport const people = [\n  { id: \"emma-collins\", name: \"Emma Collins\", role: \"Product designer\", src: \"/media/people/emma-collins.jpg\" },\n  { id: \"marcus-johnson\", name: \"Marcus Johnson\", role: \"Frontend engineer\", src: \"/media/people/marcus-johnson.jpg\" },\n  { id: \"jasmine-brooks\", name: \"Jasmine Brooks\", role: \"Design lead\", src: \"/media/people/jasmine-brooks.jpg\" },\n  { id: \"olivia-bennett\", name: \"Olivia Bennett\", role: \"Platform engineer\", src: \"/media/people/olivia-bennett.jpg\" },\n  { id: \"sofia-ramirez\", name: \"Sofia Ramirez\", role: \"Operations lead\", src: \"/media/people/sofia-ramirez.jpg\" },\n  { id: \"ryan-sullivan\", name: \"Ryan Sullivan\", role: \"Account executive\", src: \"/media/people/ryan-sullivan.jpg\" },\n  { id: \"hannah-walsh\", name: \"Hannah Walsh\", role: \"Customer success\", src: \"/media/people/hannah-walsh.jpg\" },\n  { id: \"chloe-nguyen\", name: \"Chloe Nguyen\", role: \"Data analyst\", src: \"/media/people/chloe-nguyen.jpg\" },\n  { id: \"ava-mitchell\", name: \"Ava Mitchell\", role: \"Marketing manager\", src: \"/media/people/ava-mitchell.jpg\" },\n  { id: \"daniel-kim\", name: \"Daniel Kim\", role: \"Backend engineer\", src: \"/media/people/daniel-kim.jpg\" },\n  { id: \"jordan-reyes\", name: \"Jordan Reyes\", role: \"Support specialist\", src: \"/media/people/jordan-reyes.jpg\" },\n  { id: \"mateo-alvarez\", name: \"Mateo Alvarez\", role: \"Mobile engineer\", src: \"/media/people/mateo-alvarez.jpg\" },\n  { id: \"tyler-hayes\", name: \"Tyler Hayes\", role: \"Sales lead\", src: \"/media/people/tyler-hayes.jpg\" },\n  { id: \"andre-williams\", name: \"Andre Williams\", role: \"Finance partner\", src: \"/media/people/andre-williams.jpg\" },\n  { id: \"nathan-cole\", name: \"Nathan Cole\", role: \"Engineering manager\", src: \"/media/people/nathan-cole.jpg\" },\n  { id: \"diane-foster\", name: \"Diane Foster\", role: \"Chief operating officer\", src: \"/media/people/diane-foster.jpg\" },\n] as const satisfies readonly MediaPerson[];\n\nexport const photos = [\n  { id: \"lounge-chair\", alt: \"A woven oak lounge chair with a sheepskin and linen cushion on a concrete floor\", src: \"/media/photos/lounge-chair.jpg\", width: 1280, height: 1600 },\n  { id: \"table-lamp\", alt: \"A white mushroom table lamp glowing beside books and a small vase\", src: \"/media/photos/table-lamp.jpg\", width: 1600, height: 900 },\n  { id: \"linen-throw\", alt: \"Folded natural linen throws with fringed edges in soft window light\", src: \"/media/photos/linen-throw.jpg\", width: 1067, height: 1600 },\n  { id: \"glass-carafe\", alt: \"A hand pouring water from a ribbed glass carafe into tumblers\", src: \"/media/photos/glass-carafe.jpg\", width: 1280, height: 1600 },\n  { id: \"stoneware-cups\", alt: \"Two speckled stoneware cups with a lid on a pale table\", src: \"/media/photos/stoneware-cups.jpg\", width: 1067, height: 1600 },\n  { id: \"stacked-bowls\", alt: \"Two stacked speckled ceramic bowls against a dark wall\", src: \"/media/photos/stacked-bowls.jpg\", width: 1600, height: 1067 },\n  { id: \"ceramic-lamp\", alt: \"A sculptural ceramic lamp with a linen shade on a walnut sideboard\", src: \"/media/photos/ceramic-lamp.jpg\", width: 1067, height: 1600 },\n  { id: \"living-room\", alt: \"A bright living room with timber beams, arched windows, and cream sofas\", src: \"/media/photos/living-room.jpg\", width: 1200, height: 1600 },\n  { id: \"sunroom\", alt: \"A sunroom with a round dining table, plants, and windows on three sides\", src: \"/media/photos/sunroom.jpg\", width: 1600, height: 1067 },\n  { id: \"home-office\", alt: \"A home office with a wooden desk and deep green walls\", src: \"/media/photos/home-office.jpg\", width: 1600, height: 1200 },\n  { id: \"reading-chair\", alt: \"A grey armchair and ottoman with a knit throw in a dark green room\", src: \"/media/photos/reading-chair.jpg\", width: 1600, height: 900 },\n  { id: \"bedroom\", alt: \"A made bed with striped linen pillows against an oak headboard\", src: \"/media/photos/bedroom.jpg\", width: 1067, height: 1600 },\n  { id: \"restaurant\", alt: \"A warm restaurant dining room with woven pendant lights and a tree\", src: \"/media/photos/restaurant.jpg\", width: 1067, height: 1600 },\n  { id: \"wine-bar\", alt: \"A glass carafe of red wine on a bar table in low evening light\", src: \"/media/photos/wine-bar.jpg\", width: 1600, height: 1067 },\n  { id: \"concert-hall\", alt: \"Curved stainless steel panels of the Walt Disney Concert Hall against a blue sky\", src: \"/media/photos/concert-hall.jpg\", width: 1600, height: 1143 },\n  { id: \"curved-facade\", alt: \"A white tiled building facade with curved balconies\", src: \"/media/photos/curved-facade.jpg\", width: 1600, height: 1067 },\n  { id: \"pool-house\", alt: \"A modern glass house beside a long pool under a clear sky\", src: \"/media/photos/pool-house.jpg\", width: 1600, height: 900 },\n  { id: \"terracotta-waves\", alt: \"Wavy terracotta walls rising toward a blue sky\", src: \"/media/photos/terracotta-waves.jpg\", width: 1067, height: 1600 },\n  { id: \"mountain-ridges\", alt: \"Layered mountain ridges under a warm evening sky\", src: \"/media/photos/mountain-ridges.jpg\", width: 1600, height: 1068 },\n  { id: \"alpine-lake\", alt: \"A calm alpine lake reflecting a rocky peak at golden hour\", src: \"/media/photos/alpine-lake.jpg\", width: 1067, height: 1600 },\n  { id: \"coastline\", alt: \"A long coastline with waves rolling onto a beach below green cliffs\", src: \"/media/photos/coastline.jpg\", width: 1200, height: 1600 },\n  { id: \"sea-at-dusk\", alt: \"A calm sea at dusk with a low island on the horizon\", src: \"/media/photos/sea-at-dusk.jpg\", width: 1067, height: 1600 },\n  { id: \"lisbon-tram\", alt: \"A yellow tram on a street lined with historic buildings in Lisbon\", src: \"/media/photos/lisbon-tram.jpg\", width: 1600, height: 1064 },\n  { id: \"lisbon-bridge\", alt: \"The 25 de Abril Bridge crossing the Tagus in Lisbon\", src: \"/media/photos/lisbon-bridge.jpg\", width: 1600, height: 1166 },\n  { id: \"lisbon-rooftops\", alt: \"Terracotta rooftops of Lisbon running down to the river\", src: \"/media/photos/lisbon-rooftops.jpg\", width: 1280, height: 1600 },\n  { id: \"salmon-dinner\", alt: \"Seared salmon with a bright herb salsa and a glass of red wine\", src: \"/media/photos/salmon-dinner.jpg\", width: 1067, height: 1600 },\n  { id: \"chef-plating\", alt: \"A chef spooning sauce onto a plated dish in a dark kitchen\", src: \"/media/photos/chef-plating.jpg\", width: 1600, height: 1600 },\n] as const satisfies readonly MediaPhoto[];\n\nexport type PersonId = (typeof people)[number][\"id\"];\nexport type PhotoId = (typeof photos)[number][\"id\"];\n\n/** Looks up a person by id. */\nexport function person(id: PersonId): MediaPerson {\n  return people.find(entry => entry.id === id)!;\n}\n\n/** Looks up a photo by id. */\nexport function photo(id: PhotoId): MediaPhoto {\n  return photos.find(entry => entry.id === id)!;\n}\n\n/** Square 400 px avatar path for a person id, for `src` props. */\nexport const avatar = (id: PersonId) => person(id).src;\n\n/** 800 × 1000 portrait crop of the same photo, for image-led layouts. */\nexport const portrait = (id: PersonId) => `/media/people/portrait/${id}.jpg`;\n\n/** The first `count` people, for avatar stacks and lists. */\nexport const peopleSample = (count: number) => people.slice(0, count);\n"},{"path":"registry/components/copy-button/copy-button.tsx","type":"registry:component","target":"@components/silicon-ui/copy-button/copy-button.tsx","content":"\"use client\";\n\nimport { useState } from \"react\";\nimport { AnimatePresence, motion, useReducedMotion, type TargetAndTransition, type Transition } from \"motion/react\";\nimport { CircleAlert, Copy } from \"lucide-react\";\nimport { motionTokens } from \"../lib/motion-tokens\";\nimport { useCopyFeedback } from \"../lib/use-copy-feedback\";\nimport styles from \"./copy-button.module.css\";\n\nexport interface CopyButtonProps {\n  value: string;\n  label?: string;\n  className?: string;\n  iconOnly?: boolean;\n  variant?: \"outline\" | \"plain\";\n  disabled?: boolean;\n  onCopied?: () => void;\n}\n\n/** Copy feedback is deliberately unhurried: a slow, almost critically damped spring and long, soft crossfades read as calm, never busy.\n *  The same motion plays in reverse when the confirmation hands back to idle, so nothing ever snaps. */\nconst settle = { type: \"spring\", visualDuration: motionTokens.spring.slow.visualDuration, bounce: .06 } as const;\nconst enter = { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.enter] } as const;\nconst leave = { duration: motionTokens.duration.exit, ease: [...motionTokens.ease.standard] } as const;\nconst instant = { duration: motionTokens.duration.instant } as const;\nconst soft = `blur(${motionTokens.blur.soft}px)`;\nconst rest: TargetAndTransition = { opacity: 1, y: 0, scale: 1, filter: \"blur(0px)\" };\nconst fadeIn: TargetAndTransition = { ...rest, opacity: 0 };\nconst fadeOut: TargetAndTransition = { opacity: 0, transition: instant };\n/** Icons trade places in one soft breath: the old glyph shrinks into a blur while the new one grows out of it on the slow spring. */\nconst iconIn: TargetAndTransition = { opacity: 0, scale: .6, filter: soft };\nconst iconOut: TargetAndTransition = { opacity: 0, scale: .6, filter: soft, transition: { duration: motionTokens.duration.exit, ease: [...motionTokens.ease.standard] } };\nconst iconEnter: Transition = { scale: settle, opacity: { ...enter, delay: .03 }, filter: { ...enter, delay: .03 } };\n/** Letters rise about .3em out of a soft blur; the outgoing ones lift away a little faster. */\nconst glyphIn: TargetAndTransition = { opacity: 0, y: 4, filter: soft };\nconst glyphOut: TargetAndTransition = { opacity: 0, y: -3, filter: soft, transition: leave };\n\n/** The success tick draws itself from its short stroke, the way a hand would write it: quick to start, then easing into place while the icon settles. */\nfunction DrawnCheck({ reduced }: { reduced: boolean }) {\n  return <svg width={16} height={16} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n    <motion.path d=\"M4 12l5 5L20 6\" initial={reduced ? false : { pathLength: 0, opacity: 0 }} animate={{ pathLength: 1, opacity: 1 }} transition={{ pathLength: { duration: .5, ease: [...motionTokens.ease.standard], delay: .05 }, opacity: { duration: .01, delay: .05 } }} />\n  </svg>;\n}\n\ntype Glyph = { id: string; char: string; order: number };\nconst toGlyphs = (chars: string[], seq: number): Glyph[] => chars.map((char, order) => ({ id: `${seq}:${order}`, char, order }));\n\n/** Shared leading and trailing characters keep their identity, so \"Copy\" to \"Copied\" only replaces the changed letters. */\nfunction useGlyphs(text: string) {\n  const [state, setState] = useState(() => ({ text, seq: 0, glyphs: toGlyphs([...text], 0) }));\n  if (state.text === text) return state.glyphs;\n  const prev = [...state.text], next = [...text];\n  let start = 0, end = 0;\n  while (start < prev.length && start < next.length && prev[start] === next[start]) start++;\n  while (end < prev.length - start && end < next.length - start && prev[prev.length - 1 - end] === next[next.length - 1 - end]) end++;\n  if (start < 2) start = 0;\n  if (end < 2) end = 0;\n  const seq = state.seq + 1;\n  const glyphs = [...state.glyphs.slice(0, start), ...toGlyphs(next.slice(start, next.length - end), seq), ...state.glyphs.slice(state.glyphs.length - end)];\n  setState({ text, seq, glyphs });\n  return glyphs;\n}\n\n/**\n * The label cell already reserves its widest state, so the row stays put and only the letters move. It is a layout root:\n * the letters measure their glide inside the label only, so when the button itself moves (a page entering, a panel\n * sliding, a list reflowing) they ride along instead of flying in from where the button used to be.\n */\nfunction MorphText({ text, reduced }: { text: string; reduced: boolean }) {\n  const glyphs = useGlyphs(text);\n  return <motion.span className={styles.glyphs} layoutRoot>\n    <AnimatePresence mode=\"popLayout\" initial={false}>\n      {glyphs.map(glyph => <motion.span key={glyph.id} className={styles.glyph} layout={reduced ? false : \"position\"} layoutDependency={text} initial={reduced ? fadeIn : glyphIn} animate={rest} exit={reduced ? fadeOut : glyphOut} transition={reduced ? instant : { ...enter, delay: Math.min(glyph.order * .02, .12), layout: settle }}>{glyph.char}</motion.span>)}\n    </AnimatePresence>\n  </motion.span>;\n}\n\nexport function CopyButton({ value, label = \"Copy\", className, iconOnly = false, variant = \"outline\", disabled, onCopied }: CopyButtonProps) {\n  const { state, copy } = useCopyFeedback();\n  const reduced = useReducedMotion() ?? false;\n  const text = state === \"copied\" ? \"Copied\" : state === \"error\" ? \"Failed\" : label;\n\n  async function handleCopy() {\n    if (await copy(value)) onCopied?.();\n  }\n\n  return <><button\n    type=\"button\"\n    className={[styles.button, iconOnly && styles.iconOnly, variant === \"plain\" && styles.plain, className].filter(Boolean).join(\" \")}\n    onClick={() => void handleCopy()}\n    aria-label={label}\n    data-copy-state={state}\n    disabled={disabled}\n  >\n    <span className={styles.icon} aria-hidden=\"true\">\n      <AnimatePresence initial={false}>\n        <motion.span key={state} className={styles.iconInner} data-state={state} initial={reduced ? fadeIn : iconIn} animate={rest} exit={reduced ? fadeOut : iconOut} transition={reduced ? instant : iconEnter}>\n          {state === \"copied\" ? <DrawnCheck reduced={reduced} /> : state === \"error\" ? <CircleAlert size={16} strokeWidth={1.75} /> : <Copy size={16} strokeWidth={1.75} />}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n    {!iconOnly && <span className={styles.label} aria-hidden=\"true\">\n      <span className={styles.measure}>{label}</span><span className={styles.measure}>Copied</span><span className={styles.measure}>Failed</span>\n      <MorphText text={text} reduced={reduced} />\n    </span>}\n  </button><span className={styles.srOnly} role=\"status\" aria-live=\"polite\">{state === \"idle\" ? \"\" : state === \"error\" ? `${label}: Could not copy` : `${label}: Copied`}</span></>;\n}\n"},{"path":"registry/components/copy-button/copy-button.module.css","type":"registry:component","target":"@components/silicon-ui/copy-button/copy-button.module.css","content":"/* Width never changes: the label cell reserves its widest state while icon and letters crossfade inside it. Press releases on the spring curve. */\n.button { display: inline-flex; width: max-content; max-width: 100%; min-height: var(--control-height-sm); align-items: center; justify-content: center; gap: var(--space-related); border: 1px solid var(--border); border-radius: var(--radius-control); padding: 0 var(--space-group); background: var(--surface); color: var(--foreground); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), transform var(--duration-spring) var(--ease-spring); }\n.button:active:not(:disabled) { transform: scale(.97); transition-duration: var(--duration-fast), var(--duration-fast), var(--duration-fast), var(--duration-instant); transition-timing-function: var(--ease-standard); }\n.iconOnly:active:not(:disabled) { transform: scale(.96); }\n@media (hover: hover) and (pointer: fine) { .button:hover:not(:disabled) { background: var(--surface-muted); border-color: var(--border-strong); } .plain:hover:not(:disabled) { border-color: transparent; background: var(--surface-muted); color: var(--foreground); } }\n.button:disabled { cursor: not-allowed; opacity: .5; }\n/* Each icon carries its own color, so the outgoing glyph never tints on its way out. */\n.icon { position: relative; display: grid; width: 16px; height: 16px; flex: none; }\n.iconInner { position: absolute; inset: 0; display: grid; place-items: center; }\n.iconInner[data-state=\"copied\"] { color: var(--success); }\n.iconInner[data-state=\"error\"] { color: var(--danger); }\n/* The inline padding gives blurred edge letters room before the horizontal clip; the negative margin keeps the box the same size. */\n.label { display: grid; min-width: 0; margin-inline: calc(var(--space-tight) * -1); padding-inline: var(--space-tight); overflow-x: clip; text-align: left; white-space: nowrap; }\n.measure, .glyphs { grid-area: 1 / 1; }\n.measure { visibility: hidden; }\n.glyphs { position: relative; display: inline-flex; justify-self: start; white-space: pre; }\n.glyph { display: inline-block; }\n.iconOnly { width: var(--control-height-sm); padding: 0; }\n.plain { border-color: transparent; background: transparent; color: var(--text-secondary); }\n.srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }\n@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:active:not(:disabled) { transform: none; } }\n"},{"path":"lib/use-copy-feedback.ts","type":"registry:lib","target":"@components/silicon-ui/lib/use-copy-feedback.ts","content":"\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport type CopyFeedbackState = \"idle\" | \"copied\" | \"error\";\n\n/** Shared clipboard state for actions that render their own button or menu. */\nexport function useCopyFeedback(duration = 1900) {\n  const [state, setState] = useState<CopyFeedbackState>(\"idle\");\n  const [activeKey, setActiveKey] = useState<string | null>(null);\n  const timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n  const reset = useCallback(() => {\n    if (timeout.current) clearTimeout(timeout.current);\n    timeout.current = null;\n    setState(\"idle\");\n    setActiveKey(null);\n  }, []);\n\n  useEffect(() => () => {\n    if (timeout.current) clearTimeout(timeout.current);\n  }, []);\n\n  const copy = useCallback(async (value: string, key = \"default\") => {\n    if (timeout.current) clearTimeout(timeout.current);\n    setActiveKey(key);\n    try {\n      await navigator.clipboard.writeText(value);\n      setState(\"copied\");\n      timeout.current = setTimeout(reset, duration);\n      return true;\n    } catch {\n      setState(\"error\");\n      timeout.current = setTimeout(reset, duration);\n      return false;\n    }\n  }, [duration, reset]);\n\n  return { state, activeKey, copy, reset };\n}\n"}],"docs":"Docs and live preview: https://ui.teamofsilicons.com/changelog-feed","meta":{"tier":"free","kind":"block","docs":"https://ui.teamofsilicons.com/changelog-feed","markdown":"https://ui.teamofsilicons.com/changelog-feed.md","status":"stable"}}