{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "sticky-cta-reading-progress",
  "title": "Sticky CTA — Reading Progress",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/sticky-cta-reading-progress/StickyCtaReadingProgress.vue",
      "content": "<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { ArrowRight, X } from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Progress } from '@/components/ui/progress'\nimport { Separator } from '@/components/ui/separator'\n\nconst props = withDefaults(defineProps<{ revealAt?: number }>(), { revealAt: 15 })\n\n// Both start at rest so server and first client paint agree; the scroll handler\n// is the only thing that reveals the bar or moves the progress.\nconst progress = ref(0)\nconst visible = ref(false)\nconst dismissed = ref(false)\n\nfunction onScroll() {\n  const scrollable = document.documentElement.scrollHeight - window.innerHeight\n  const percent = scrollable > 0 ? Math.min(Math.round((window.scrollY / scrollable) * 100), 100) : 0\n  progress.value = percent\n  visible.value = !dismissed.value && percent >= props.revealAt\n}\n\nonMounted(() => {\n  onScroll()\n  window.addEventListener('scroll', onScroll, { passive: true })\n  window.addEventListener('resize', onScroll)\n})\n\nonBeforeUnmount(() => {\n  window.removeEventListener('scroll', onScroll)\n  window.removeEventListener('resize', onScroll)\n})\n</script>\n\n<template>\n  <Transition\n    enter-active-class=\"transition duration-200 ease-out\"\n    enter-from-class=\"translate-y-full opacity-0\"\n    leave-active-class=\"transition duration-150 ease-in\"\n    leave-to-class=\"translate-y-full opacity-0\"\n  >\n    <div\n      v-show=\"visible\"\n      data-slot=\"sticky-cta-reading-progress\"\n      class=\"border-border bg-card/95 fixed inset-x-0 bottom-0 z-50 border-t backdrop-blur\"\n      role=\"region\"\n      aria-label=\"Reading progress and trial offer\"\n    >\n      <Progress :model-value=\"progress\" class=\"h-0.5 rounded-none\" aria-label=\"Reading progress\" />\n\n      <div class=\"mx-auto flex max-w-5xl flex-wrap items-center gap-x-5 gap-y-2 px-6 py-3\">\n        <Badge variant=\"secondary\" class=\"shrink-0 tabular-nums\">{{ progress }}% read</Badge>\n\n        <p class=\"min-w-0 grow text-sm\">\n          <span class=\"font-medium\">Finished the technical detail?</span>\n          <span class=\"text-muted-foreground\"> The trial runs on your real warehouse, read-only.</span>\n        </p>\n\n        <div class=\"flex shrink-0 items-center gap-2\">\n          <Button size=\"sm\">\n            Start free\n            <ArrowRight class=\"ml-1.5 size-3.5\" aria-hidden=\"true\" />\n          </Button>\n          <Separator orientation=\"vertical\" class=\"hidden h-5 sm:block\" />\n          <Button\n            size=\"icon\"\n            variant=\"ghost\"\n            class=\"size-7\"\n            aria-label=\"Dismiss\"\n            @click=\"((dismissed = true), (visible = false))\"\n          >\n            <X class=\"size-3.5\" aria-hidden=\"true\" />\n          </Button>\n        </div>\n      </div>\n    </div>\n  </Transition>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/StickyCtaReadingProgress.vue"
    }
  ],
  "dependencies": [
    "lucide-vue-next"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/progress.json",
    "https://uipkge.dev/r/vue/separator.json"
  ],
  "description": "Sticky bottom bar that doubles as a reading-progress indicator, revealing partway down a long page and reporting how much of it remains.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "sticky-cta"
}