{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "marquee-strip",
  "type": "registry:item",
  "title": "Marquee Strip",
  "description": "A strip that scrolls its content sideways without end, for logos or testimonials. Seamless (a hidden copy), pauses on hover and focus, `controls` adds a pause button, and it stands still and scrolls by hand for visitors who asked for less motion.",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "motion"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/marquee-strip.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/marquee-strip.js",
      "content": "// Generated by zubra from marquee-strip.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\nimport { onMount } from '@zubra/runtime';\nimport { state as __zubraState, computed as __zubraComputed } from \"@zubra/runtime\";\n\nexport const tag = \"marquee-strip\";\n\nexport default $define(tag, {\n  props: {\n    \"duration\": { attribute: \"duration\", default: 30, required: false },\n    \"gap\": { attribute: \"gap\", default: \"2.5rem\", required: false },\n    \"reverse\": { attribute: \"reverse\", default: false, required: false },\n    \"controls\": { attribute: \"controls\", default: false, required: false },\n    \"label\": { attribute: \"label\", default: \"\", required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [\"default\"],\n  events: [],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (marquee-strip) to ([data-zb-slotted=\\\"marquee-strip\\\"]) {\\n  :scope { display: block; }\\n  .marquee { position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 var(--marquee-fade, 3rem), #000 calc(100% - var(--marquee-fade, 3rem)), transparent); }\\n  .marquee-row { display: flex; width: max-content; animation: marquee-scroll calc(var(--marquee-duration) * 1s) linear infinite; }\\n  .marquee-reverse .marquee-row { animation-direction: reverse; }\\n  .marquee:hover .marquee-row, .marquee:focus-within .marquee-row, .marquee-stopped .marquee-row { animation-play-state: paused; }\\n  .marquee-track { display: flex; align-items: center; gap: var(--marquee-gap); padding-inline-end: var(--marquee-gap); }\\n  @keyframes marquee-scroll { to { translate: -50% 0; } }\\n  .marquee-toggle { position: absolute; inset-block-start: 50%; inset-inline-end: 0.25rem; translate: 0 -50%; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--border, #e4e4e7); border-radius: 50%; background: var(--background, #fff); color: var(--foreground, #18181b); font: inherit; font-size: 0.7rem; cursor: pointer; }\\n  .marquee-toggle:focus-visible { outline: 2px solid var(--ring, #a1a1aa); outline-offset: 2px; }\\n  @media (prefers-reduced-motion: reduce) {\\n    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }\\n    .marquee { overflow-x: auto; mask-image: none; }\\n    .marquee-row { animation: none; }\\n    .marquee-copy, .marquee-toggle { display: none; }\\n  }\\n}\\n}\\n\",\n  template: \"\\n  <div class=\\\"marquee\\\">\\n    <div class=\\\"marquee-row\\\">\\n      <div class=\\\"marquee-track\\\"><!--[--><!--]--></div>\\n      <div class=\\\"marquee-track marquee-copy\\\" aria-hidden=\\\"true\\\" inert></div>\\n    </div>\\n    <!--[--><!--]-->\\n  </div>\\n\",\n  setup($p, $emit) {\nfunction __zubraAssign(signal, value) { signal.set(value); return value }\nfunction __zubraUpdate(signal, delta, prefix) { const old = signal.get(); signal.set(old + delta); return prefix ? old + delta : old }\n                                          \n\n  const original = __zubraState(null)\n  const copy = __zubraState(null)\n  const stopped = __zubraState(false)\n\n  onMount(() => {\n    // The copy follows the items: cloned again whenever they change.\n    const mirror = () => copy.get().replaceChildren(...[...original.get().childNodes].filter((node) => node.nodeType === 1 || node.nodeType === 3).map((node) => node.cloneNode(true)))\n    mirror()\n    const changes = new MutationObserver(mirror)\n    changes.observe(original.get(), { childList: true, subtree: true, characterData: true, attributes: true })\n    return () => changes.disconnect()\n  })\n    return [\n      { path: [0], toggle: \"marquee-reverse\", value: () => $p.reverse },\n      { path: [0], toggle: \"marquee-stopped\", value: () => $r(stopped) },\n      { path: [0], style: \"--marquee-duration\", value: () => (Math.max(1, $p.duration)) },\n      { path: [0], style: \"--marquee-gap\", value: () => $p.gap },\n      { path: [0], attribute: \"role\", value: () => ($p.label ? \"region\" : null) },\n      { path: [0], attribute: \"aria-label\", value: () => ($p.label || null) },\n      { path: [0, 0, 0], ref: () => (($el) => (__zubraAssign(original, $el))) },\n      { path: [0, 0, 0, 0], slot: \"default\", fallback: null },\n      { path: [0, 0, 1], ref: () => (($el) => (__zubraAssign(copy, $el))) },\n      { path: [0, 1], when: () => $p.controls, blocks: [{ template: \"<button type=\\\"button\\\" class=\\\"marquee-toggle\\\" aria-label=\\\"Pause scrolling\\\"></button>\", parts: () => [{ path: [0], attribute: \"aria-pressed\", value: () => ($r(stopped) ? \"true\" : \"false\") }, { path: [0], on: \"click\", handler: () => (() => (__zubraAssign(stopped, !stopped.get()))) }, { path: [0], text: () => $t(($r(stopped) ? \"▶\" : \"❚❚\")) }] }, null] },\n    ];\n  },\n});\n"
    }
  ]
}
