{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pixel-snail",
  "title": "Pixel snail",
  "author": "Tori Bryan",
  "description": "A one-color pixel snail that crawls on a loop while something loads.",
  "dependencies": [],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/pixel-snail.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { mergeRefs } from \"@/lib/merge-refs\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\nimport { cn } from \"@/lib/utils\"\n\ntype Pixel = [x: number, y: number]\n\n/*\n * One step of the crawl, in shell-anchored columns. `shift` is how far the\n * shell has moved since the cycle began; a cycle moves the snail forward by\n * CYCLE_SHIFT columns. Head, shell and tail each move on a different frame,\n * so the body stretches and gathers like a real foot instead of sliding.\n */\ntype Frame = {\n  tail: number\n  head: number\n  /** Stalk tips: back, upright or forward. */\n  lean: -1 | 0 | 1\n  shift: number\n  /** Eyes shut. */\n  blink?: boolean\n  /** Nudges the whole snail sideways, for shuffling while it rests. */\n  dx?: number\n  /** Lifts the shell off the foot, for a hop. */\n  bob?: number\n  /** Where the eyes look: up on raised stalks, level, or down on lowered ones. */\n  gaze?: -1 | 0 | 1\n  /** Stretches the neck up a row, or ducks the head down one. */\n  raise?: -1 | 0 | 1\n}\n\nconst FRAMES: Frame[] = [\n  { tail: 0, head: 16, lean: 0, shift: 0 },\n  { tail: 0, head: 17, lean: 1, shift: 0 },\n  { tail: -1, head: 17, lean: 1, shift: 1 },\n  { tail: -1, head: 16, lean: 0, shift: 2 },\n]\nconst CYCLE_SHIFT = 2\n\nconst REST: Frame = FRAMES[0]!\n\n/*\n * What a resting snail does: looks about, blinks, reaches, and shuffles a\n * pixel forward and back again, so it never ends where it began. The holds\n * are uneven on purpose; an even beat reads as a machine.\n */\nconst IDLE: [frame: Frame, ms: number][] = [\n  [REST, 1800],\n  [{ ...REST, lean: 1 }, 700],\n  [REST, 900],\n  [{ ...REST, blink: true }, 140],\n  [REST, 1500],\n  [{ ...REST, head: 17, lean: 1 }, 600],\n  [{ ...REST, dx: 1 }, 1600],\n  [{ ...REST, dx: 1, lean: -1 }, 900],\n  [{ ...REST, dx: 1 }, 700],\n  [{ ...REST, dx: 1, blink: true }, 140],\n  [{ ...REST, dx: 1 }, 1200],\n  [{ ...REST, tail: -1, head: 16, dx: 0 }, 500],\n]\n\n/*\n * A little dance: the stalks sway on the beat while the shell hops, then a\n * shuffle to one side and back, then a breather so it never turns frantic.\n */\nconst SWAY: [frame: Frame, ms: number][] = [\n  [{ ...REST, lean: -1 }, 280],\n  [{ ...REST, lean: 1, head: 17, bob: 1, gaze: -1 }, 280],\n]\nconst DANCE: [frame: Frame, ms: number][] = [\n  ...SWAY,\n  ...SWAY,\n  ...SWAY,\n  [REST, 500],\n  [{ ...REST, blink: true }, 140],\n  [REST, 400],\n  [{ ...REST, lean: 1, dx: 1 }, 260],\n  [{ ...REST, lean: -1, dx: 1, bob: 1 }, 260],\n  [{ ...REST, lean: 1, dx: 1 }, 260],\n  [{ ...REST, lean: -1, bob: 1 }, 260],\n  [REST, 1600],\n]\n\nconst SHELL = [\n  \"...#####...\",\n  \".###.#.###.\",\n  \".#.##..#.#.\",\n  \"####....###\",\n  \"#.#..##...#\",\n  \"#.##..#...#\",\n  \"##.####..##\",\n  \".#.......#.\",\n  \".###...###.\",\n  \"...#####...\",\n]\n// The shell's top row; it stands a row taller than the head.\nconst SHELL_TOP = -1\n\n/*\n * The drawing spans columns -1 to 22 and rows -4 to 12: room for the shell\n * to hop a row and the eyes to rise on stretched stalks. The ground is row\n * 12, and the foot's middle, where a sprite is anchored, is column 9.\n */\nconst MIN_X = -1\nconst MIN_Y = -4\nconst COLS = 24\nconst ROWS = 17\nconst FOOT_MIDDLE = 9\nconst GROUND_ROW = 12\nconst GROUND_PITCH = 4\n\nconst SCALE = { sm: 2, default: 3, lg: 4 } as const\nconst FRAME_MS = { slow: 260, default: 180, fast: 110 } as const\n\nfunction row(y: number, from: number, to: number): Pixel[] {\n  return Array.from({ length: to - from + 1 }, (_, i) => [from + i, y])\n}\n\ntype Drawing = { ink: Pixel[]; whites: Pixel[] }\n\nconst EYE_RIM: Pixel[] = [\n  [1, 0],\n  [2, 0],\n  [0, 1],\n  [3, 1],\n  [0, 2],\n  [3, 2],\n  [1, 3],\n  [2, 3],\n]\nconst EYE_WHITE: Pixel[] = [\n  [1, 1],\n  [2, 1],\n  [1, 2],\n  [2, 2],\n]\n\n/*\n * A googly eye, four pixels square: a rim round a two-by-two white, with a\n * one-pixel pupil in the corner it looks toward. Shut, it is a line along\n * the bottom.\n */\nfunction eyeball(\n  left: number,\n  top: number,\n  look: { x: number; y: number },\n  shut: boolean\n): Drawing {\n  const at = ([x, y]: Pixel): Pixel => [left + x, top + y]\n  if (shut) return { ink: row(top + 3, left, left + 3), whites: [] }\n  const pupil: Pixel = [look.x < 0 ? 1 : 2, look.y < 0 ? 1 : 2]\n  return {\n    ink: [...EYE_RIM, pupil].map(at),\n    whites: EYE_WHITE.filter(([x, y]) => x !== pupil[0] || y !== pupil[1]).map(\n      at\n    ),\n  }\n}\n\nfunction snailPixels({\n  tail,\n  head,\n  lean,\n  blink = false,\n  dx = 0,\n  bob = 0,\n  gaze = 0,\n  raise = 0,\n}: Frame): Drawing {\n  const shell = SHELL.flatMap((line, y) =>\n    [...line].flatMap((cell, x): Pixel[] =>\n      cell === \"#\" ? [[x + 1, y + SHELL_TOP - bob]] : []\n    )\n  )\n  /*\n   * Two stalks splay into a V with an eye on each. The eyes nod forward as\n   * the head reaches, and ride higher on longer stalks to look up or sink\n   * onto the head to look down.\n   */\n  const eyeTop = -2 + gaze\n  const side = (splay: -1 | 1): Drawing => {\n    const base = head + splay\n    const stalk: Pixel[] = [[base, 3]]\n    for (let y = 2; y > eyeTop + 3; y--)\n      stalk.push([base + splay + (y === eyeTop + 4 ? lean : 0), y])\n    const left = splay < 0 ? head - 4 + lean : head + 1 + lean\n    const eye = eyeball(left, eyeTop, { x: lean, y: gaze }, blink)\n    return { ink: [...stalk, ...eye.ink], whites: eye.whites }\n  }\n  const back = side(-1)\n  const front = side(1)\n  // The head rides on the neck: raised, the neck fills in under it; ducked,\n  // it sinks into the neck.\n  const lift = ([x, y]: Pixel): Pixel => [x, y - raise]\n  const ink: Pixel[] = [\n    ...shell,\n    ...[\n      ...back.ink,\n      ...front.ink,\n      ...row(4, head - 1, head + 1),\n      ...row(5, head - 2, head + 1),\n      ...row(6, head - 2, head + 1),\n      ...row(7, head - 2, head),\n    ].map(lift),\n    ...(raise > 0 ? row(7, head - 2, head) : []),\n    ...row(8, head - 3, head),\n    ...row(9, tail + 1, head + 1),\n    ...row(10, tail, head + 2),\n  ]\n  const whites = [...back.whites, ...front.whites].map(lift)\n  const shift = ([x, y]: Pixel): Pixel => [x + dx, y]\n  return { ink: ink.map(shift), whites: whites.map(shift) }\n}\n\nfunction groundPixels(distance: number): Pixel[] {\n  const offset = distance % GROUND_PITCH\n  return Array.from(\n    { length: Math.ceil(COLS / GROUND_PITCH) + 1 },\n    (_, i): Pixel => [MIN_X + i * GROUND_PITCH - offset, GROUND_ROW]\n  ).filter(([x]) => x >= MIN_X)\n}\n\n// Parts overlap where they meet, such as a ducked head sinking into the\n// neck, so a pixel can be listed twice; each is drawn once.\nfunction Pixels({ pixels }: { pixels: Pixel[] }) {\n  const unique = new Map(pixels.map(([x, y]) => [`${x}:${y}`, [x, y]]))\n  return [...unique].map(([key, [x, y]]) => (\n    <rect key={key} x={x} y={y} width={1} height={1} />\n  ))\n}\n\n// The whites of the eyes take the page color, so the pupils read in either\n// theme.\nfunction Drawn({ ink, whites }: Drawing) {\n  return (\n    <>\n      <g className=\"fill-background\">\n        <Pixels pixels={whites} />\n      </g>\n      <Pixels pixels={ink} />\n    </>\n  )\n}\n\ntype Pace = keyof typeof FRAME_MS\n\nfunction useCrawl(pace: Pace, paused: boolean) {\n  const [step, setStep] = React.useState(0)\n  React.useEffect(() => {\n    if (paused) return\n    const id = window.setInterval(() => setStep((s) => s + 1), FRAME_MS[pace])\n    return () => window.clearInterval(id)\n  }, [pace, paused])\n  return step\n}\n\n// The crawl and the loops tick forever, so they rest while off screen.\nfunction useInView(ref: React.RefObject<Element | null>) {\n  const [inView, setInView] = React.useState(false)\n  React.useEffect(() => {\n    const node = ref.current\n    if (!node) return\n    const observer = new IntersectionObserver(([entry]) =>\n      setInView(Boolean(entry?.isIntersecting))\n    )\n    observer.observe(node)\n    return () => observer.disconnect()\n  }, [ref])\n  return inView\n}\n\nfunction useLoop(script: [frame: Frame, ms: number][], paused: boolean) {\n  const [beat, setBeat] = React.useState(0)\n  const index = beat % script.length\n  React.useEffect(() => {\n    if (paused) return\n    const id = window.setTimeout(() => setBeat((b) => b + 1), script[index]![1])\n    return () => window.clearTimeout(id)\n  }, [script, index, paused])\n  return script[index]![0]\n}\n\nconst ASSEMBLE_TICK_MS = 40\n// Time spent at each stage: coarse blocks arriving, then holding, then\n// halving, until the art is whole.\nconst ASSEMBLE_STAGES = [\n  { block: 4, ms: 400, reveal: true },\n  { block: 4, ms: 120, reveal: false },\n  { block: 2, ms: 160, reveal: false },\n] as const\nconst ASSEMBLE_MS = ASSEMBLE_STAGES.reduce((sum, s) => sum + s.ms, 0)\n\ntype Assembly = { block: number; shown: number } | \"hidden\" | \"whole\"\n\n/*\n * The stage comes from the time since mount rather than a count of ticks,\n * so a throttled background tab skips ahead instead of dragging it out.\n */\nfunction useAssemble(delay: number | undefined, skip: boolean): Assembly {\n  const [elapsed, setElapsed] = React.useState(-1)\n  const active = delay !== undefined && !skip\n  React.useEffect(() => {\n    if (!active) return\n    const start = performance.now() + delay\n    let id: number | undefined\n    // Nothing changes while the snail is hidden, so ticking waits for it.\n    const wait = window.setTimeout(() => {\n      id = window.setInterval(() => {\n        const since = performance.now() - start\n        setElapsed(since)\n        if (since >= ASSEMBLE_MS) window.clearInterval(id)\n      }, ASSEMBLE_TICK_MS)\n    }, delay)\n    return () => {\n      window.clearTimeout(wait)\n      window.clearInterval(id)\n    }\n  }, [active, delay])\n  if (!active || elapsed >= ASSEMBLE_MS) return \"whole\"\n  if (elapsed < 0) return \"hidden\"\n  let rest = elapsed\n  for (const stage of ASSEMBLE_STAGES) {\n    if (rest < stage.ms)\n      return {\n        block: stage.block,\n        shown: stage.reveal ? rest / stage.ms : 1,\n      }\n    rest -= stage.ms\n  }\n  return \"whole\"\n}\n\n// How finely the build-up's progress is reported.\nconst ASSEMBLE_STEPS = 10\n\n/*\n * Reports each step of the build-up once: a new share of blocks, a split to\n * smaller blocks, and the finish. A snail shown whole from the start reports\n * nothing.\n */\nfunction useAssembleSteps(\n  assembly: Assembly,\n  onAssemble: PixelSnailSpriteProps[\"onAssemble\"]\n) {\n  const report = React.useRef(onAssemble)\n  React.useEffect(() => {\n    report.current = onAssemble\n  })\n  const built = React.useRef(false)\n  const building = typeof assembly === \"object\"\n  const block = building ? assembly.block : 0\n  const shown = building ? Math.round(assembly.shown * ASSEMBLE_STEPS) : 0\n  const whole = assembly === \"whole\"\n  React.useEffect(() => {\n    if (building) {\n      built.current = true\n      report.current?.({ block, shown: shown / ASSEMBLE_STEPS })\n    } else if (whole && built.current) {\n      built.current = false\n      report.current?.(\"whole\")\n    }\n  }, [building, whole, block, shown])\n}\n\n/*\n * The art at a coarser grid: a block is filled when enough of its pixels\n * are. Blocks arrive in a scattered but fixed order, so the snail builds up\n * like a picture loading rather than wiping in from one side.\n */\nfunction Mosaic({\n  pixels,\n  block,\n  shown,\n}: {\n  pixels: Pixel[]\n  block: number\n  shown: number\n}) {\n  const counts = new Map<string, [number, number, number]>()\n  for (const [x, y] of pixels) {\n    const bx = Math.floor((x - MIN_X) / block)\n    const by = Math.floor((y - MIN_Y) / block)\n    const key = `${bx}:${by}`\n    const count = counts.get(key)?.[2] ?? 0\n    counts.set(key, [bx, by, count + 1])\n  }\n  const threshold = Math.max(1, (block * block) / 4)\n  const blocks = [...counts.values()]\n    .filter(([, , count]) => count >= threshold)\n    .sort(([ax, ay], [bx, by]) => scatter(ax, ay) - scatter(bx, by))\n  return blocks\n    .slice(0, Math.ceil(blocks.length * shown))\n    .map(([bx, by]) => (\n      <rect\n        key={`${bx}:${by}`}\n        x={MIN_X + bx * block}\n        y={MIN_Y + by * block}\n        width={block}\n        height={block}\n      />\n    ))\n}\n\nfunction scatter(x: number, y: number) {\n  return ((x * 73856093) ^ (y * 19349663)) % 97\n}\n\ntype Look = {\n  /** Behind, level or ahead, from where the snail faces. */\n  x: -1 | 0 | 1\n  /** Up, level or down. */\n  y: -1 | 0 | 1\n  /** Which way the snail faces: `1` right, as drawn, or `-1` turned round. */\n  facing?: -1 | 1\n}\n\ntype PixelSnailSpriteProps = Omit<React.ComponentProps<\"g\">, \"children\"> & {\n  /** Size of one art pixel, in the parent SVG's user units. */\n  pixel?: number\n  /** How long each frame of the crawl holds. */\n  pace?: Pace\n  /**\n   * `crawl` walks in place, for riding a path. `rest` idles on the spot,\n   * looking about and shuffling. `dance` sways and hops on a loop.\n   */\n  mode?: \"crawl\" | \"rest\" | \"dance\"\n  /**\n   * Holds still and turns toward a point: the eyes lean, the head reaches or\n   * pulls back, the neck stretches up or ducks, and `facing` turns the whole\n   * snail round. Pass `null` to let the mode play.\n   */\n  look?: Look | null\n  /**\n   * Builds the snail up from coarse blocks after this many milliseconds,\n   * instead of showing it at once.\n   */\n  assembleDelay?: number\n  /**\n   * Called as the build-up moves on: with the block size and the share of\n   * blocks shown each time more arrive or the blocks split, then with\n   * `\"whole\"` once the art is complete. For syncing sound to the pixels.\n   */\n  onAssemble?: (step: { block: number; shown: number } | \"whole\") => void\n}\n\n/**\n * The snail as a bare SVG group for use inside another drawing, such as one\n * riding a path with `animateMotion`. Its origin is under the middle of the\n * foot, so it sits on the path rather than straddling it.\n */\nfunction PixelSnailSprite({\n  pixel = 1,\n  pace = \"default\",\n  mode = \"crawl\",\n  look = null,\n  assembleDelay,\n  onAssemble,\n  transform,\n  ref,\n  ...props\n}: PixelSnailSpriteProps) {\n  const reduceMotion = useMediaQuery(\"(prefers-reduced-motion: reduce)\")\n  const sprite = React.useRef<SVGGElement>(null)\n  // A caller's ref would otherwise replace the one that pauses it off screen.\n  const spriteRef = React.useMemo(() => mergeRefs(sprite, ref), [ref])\n  const inView = useInView(sprite)\n  const still = reduceMotion || look !== null || !inView\n  const step = useCrawl(pace, still || mode !== \"crawl\")\n  const idle = useLoop(IDLE, still || mode !== \"rest\")\n  const dance = useLoop(DANCE, still || mode !== \"dance\")\n  const assembly = useAssemble(assembleDelay, reduceMotion)\n  useAssembleSteps(assembly, onAssemble)\n\n  const frame: Frame = look\n    ? {\n        ...REST,\n        head: REST.head + look.x,\n        lean: look.x,\n        gaze: look.y,\n        raise: look.y === 0 ? 0 : look.y === -1 ? 1 : -1,\n      }\n    : reduceMotion\n      ? REST\n      : { crawl: FRAMES[step % FRAMES.length]!, rest: idle, dance }[mode]\n  const { ink, whites } = snailPixels(frame)\n  const flip = look?.facing === -1 ? -1 : 1\n  const origin = `scale(${pixel * flip} ${pixel}) translate(${-FOOT_MIDDLE} -11)`\n  return (\n    <g\n      ref={spriteRef}\n      data-slot=\"pixel-snail-sprite\"\n      fill=\"currentColor\"\n      shapeRendering=\"crispEdges\"\n      transform={transform ? `${transform} ${origin}` : origin}\n      {...props}\n    >\n      {assembly === \"hidden\" ? null : assembly === \"whole\" ? (\n        <Drawn ink={ink} whites={whites} />\n      ) : (\n        <Mosaic pixels={ink} {...assembly} />\n      )}\n    </g>\n  )\n}\n\ntype PixelSnailProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n  /** Size of one art pixel: 2, 3 or 4 screen pixels. */\n  size?: keyof typeof SCALE\n  /** How long each frame of the crawl holds. */\n  pace?: Pace\n  /**\n   * Crawl across the full width of the container and wrap around, instead\n   * of crawling in place while the ground slides past.\n   */\n  travel?: boolean\n  /** A dotted line under the snail that shows it moving. */\n  ground?: boolean\n  /** Announced to assistive technology while the snail is shown. */\n  label?: string\n}\n\n/**\n * A one-color pixel snail that crawls on a loop, for loading states. It\n * draws in `currentColor`, so a text color class recolors it.\n */\nfunction PixelSnail({\n  size = \"default\",\n  pace = \"default\",\n  travel = false,\n  ground = true,\n  label = \"Loading\",\n  className,\n  ref,\n  ...props\n}: PixelSnailProps) {\n  const reduceMotion = useMediaQuery(\"(prefers-reduced-motion: reduce)\")\n  const root = React.useRef<HTMLDivElement>(null)\n  // A caller's ref would otherwise replace the one that pauses it off screen.\n  const rootRef = React.useMemo(() => mergeRefs(root, ref), [ref])\n  const inView = useInView(root)\n  const step = useCrawl(pace, reduceMotion || !inView)\n  const [trackWidth, setTrackWidth] = React.useState(0)\n  const trackRef = React.useRef<HTMLDivElement>(null)\n\n  React.useEffect(() => {\n    const track = trackRef.current\n    if (!travel || !track) return\n    const observer = new ResizeObserver(([entry]) =>\n      setTrackWidth(entry?.contentRect.width ?? 0)\n    )\n    observer.observe(track)\n    return () => observer.disconnect()\n  }, [travel])\n\n  const frame = FRAMES[step % FRAMES.length]!\n  const distance = Math.floor(step / FRAMES.length) * CYCLE_SHIFT + frame.shift\n  const scale = SCALE[size]\n  const width = COLS * scale\n  const height = ROWS * scale\n\n  const snail = (\n    <svg\n      aria-hidden=\"true\"\n      width={width}\n      height={height}\n      viewBox={`${MIN_X} ${MIN_Y} ${COLS} ${ROWS}`}\n      shapeRendering=\"crispEdges\"\n      fill=\"currentColor\"\n      className=\"block shrink-0\"\n    >\n      <Drawn {...snailPixels(frame)} />\n      {ground && !travel ? <Pixels pixels={groundPixels(distance)} /> : null}\n    </svg>\n  )\n\n  // The snail enters from past the left edge and leaves past the right one,\n  // stepping a whole art pixel at a time so it never blurs between pixels.\n  const lap = trackWidth + width\n  const x =\n    reduceMotion || lap <= width ? 0 : ((distance * scale) % lap) - width\n\n  return (\n    <div\n      ref={rootRef}\n      data-slot=\"pixel-snail\"\n      data-travel={travel || undefined}\n      role=\"status\"\n      className={cn(\n        \"text-foreground\",\n        travel ? \"relative w-full overflow-hidden\" : \"inline-flex\",\n        className\n      )}\n      style={travel ? { height } : undefined}\n      {...props}\n    >\n      {/* Text, not aria-label: screen readers read a status region's\n      content and often skip its name. */}\n      <span className=\"sr-only\">{label}</span>\n      {travel ? (\n        <div ref={trackRef} className=\"absolute inset-0\">\n          {ground ? (\n            <div\n              data-slot=\"pixel-snail-ground\"\n              aria-hidden=\"true\"\n              className=\"absolute inset-x-0\"\n              style={{\n                top: (GROUND_ROW - MIN_Y) * scale,\n                height: scale,\n                backgroundImage: `linear-gradient(to right, currentColor ${scale}px, transparent ${scale}px)`,\n                backgroundSize: `${GROUND_PITCH * scale}px ${scale}px`,\n              }}\n            />\n          ) : null}\n          <div\n            className=\"absolute top-0 left-0\"\n            style={{ transform: `translateX(${x}px)` }}\n          >\n            {snail}\n          </div>\n        </div>\n      ) : (\n        snail\n      )}\n    </div>\n  )\n}\n\nexport { PixelSnail, PixelSnailSprite }\nexport type { PixelSnailProps, PixelSnailSpriteProps, Look as PixelSnailLook }\n",
      "type": "registry:ui"
    },
    {
      "path": "registry/lib/merge-refs.ts",
      "content": "import * as React from \"react\"\n\n/**\n * One callback ref that sets every ref given, so a part can keep its own\n * ref on an element and still hand the element to a caller's `ref`. Undo\n * runs through React 19's ref cleanup, which calls a function ref with\n * null and empties an object ref.\n */\nexport function mergeRefs<T>(\n  ...refs: (React.Ref<T> | undefined)[]\n): React.RefCallback<T> {\n  return (node) => {\n    const cleanups = refs.map((ref) => {\n      if (typeof ref === \"function\") {\n        const cleanup = ref(node)\n        return typeof cleanup === \"function\" ? cleanup : () => ref(null)\n      }\n      if (ref) {\n        ref.current = node\n        return () => {\n          ref.current = null\n        }\n      }\n      return undefined\n    })\n    return () => {\n      for (const cleanup of cleanups) cleanup?.()\n    }\n  }\n}\n",
      "type": "registry:lib"
    },
    {
      "path": "registry/lib/use-media-query.ts",
      "content": "import * as React from \"react\"\n\n/**\n * Whether a media query matches, kept in step as it changes. False on the\n * server and during hydration, so server markup never depends on it.\n */\nexport function useMediaQuery(query: string) {\n  const subscribe = React.useCallback(\n    (onChange: () => void) => {\n      const list = window.matchMedia(query)\n      list.addEventListener(\"change\", onChange)\n      return () => list.removeEventListener(\"change\", onChange)\n    },\n    [query]\n  )\n  return React.useSyncExternalStore(\n    subscribe,\n    () => window.matchMedia(query).matches,\n    () => false\n  )\n}\n",
      "type": "registry:lib"
    }
  ],
  "meta": {
    "tier": "special-components",
    "group": "Feedback",
    "docs": "https://fibo.toribryan.com/?path=/docs/special-components-pixel-snail--docs"
  },
  "docs": "Docs and live examples: https://fibo.toribryan.com/?path=/docs/special-components-pixel-snail--docs",
  "categories": [
    "special-components",
    "feedback"
  ],
  "type": "registry:ui"
}