{
  "component": {
    "id": "progress",
    "name": "Progress",
    "tier": "pro",
    "exampleId": "progress",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/progress-demo.tsx",
    "exportName": "ProgressDemo",
    "sha256": "6fda7a630793c997b74ff3166115f06ce4fcfafac426f5f6ab4faac4ce7dc662",
    "helperImports": [],
    "directComponentImports": [
      "progress",
      "tidal-button"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/progress",
    "registryUrl": "https://tidalui.com/r/pro/progress.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/progress",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/progress",
      "registryUrl": "https://tidalui.com/r/pro/progress.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/progress.tsx",
    "exports": [
      "TidalButton",
      "TidalProgress"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/progress.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "progress",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/progress.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/progress.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/progress-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { CloudUpload, FileCode2, Palette, Image, Pause, Play, RotateCcw } from \"lucide-react\";\n\nimport { TidalProgress } from \"./components/ui/progress\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\nimport \"./components/ui/progress.css\";\n\n\n\nconst tidalExampleStyles = \".progress-specimen {\\n  width: 100%;\\n  max-width: 620px;\\n  padding: 28px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-card);\\n  background: var(--t-surface);\\n  box-shadow:\\n    0 24px 40px -28px #00000035,\\n    0 2px 4px #00000008;\\n}\\n.progress-specimen > h3 {\\n  font-size: 29px;\\n  line-height: 1.08;\\n  letter-spacing: -1px;\\n  font-weight: 500;\\n  margin: 13px 0 26px;\\n}\\n.progress-specimen > h3 > em {\\n  font-family: \\\"Instrument Serif\\\", serif;\\n  font-size: 1.2em;\\n  font-weight: 400;\\n}\\n.progress-demo-package {\\n  position: relative;\\n  padding: 18px 20px 21px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 12px;\\n  background: linear-gradient(135deg, var(--t-subtle), var(--t-surface));\\n  overflow: hidden;\\n}\\n.progress-demo-package-top {\\n  display: flex;\\n  justify-content: space-between;\\n  align-items: center;\\n  gap: 12px;\\n  font-size: 11px;\\n  letter-spacing: 0.8px;\\n  color: var(--t-muted);\\n  margin-bottom: 17px;\\n}\\n.progress-demo-package-top > span:first-child {\\n  display: flex;\\n  align-items: center;\\n  gap: 8px;\\n}\\n.progress-demo-package-top > span:last-child {\\n  font-size: 11px;\\n}\\n.progress-demo-package .tidal-progress[data-variant=\\\"ring\\\"] {\\n  padding-right: 80px;\\n}\\n.progress-demo-package .tidal-progress-heading {\\n  font-size: 13px;\\n}\\n.progress-demo-package .tidal-progress-description {\\n  font-size: 11px;\\n}\\n.progress-demo-file-stack {\\n  position: absolute;\\n  right: 27px;\\n  bottom: 39px;\\n  width: 64px;\\n  height: 74px;\\n  pointer-events: none;\\n}\\n.progress-demo-file-stack > span {\\n  position: absolute;\\n  inset: 0;\\n  border: 1px solid var(--t-border);\\n  border-radius: 8px;\\n  background: var(--t-surface);\\n  box-shadow: 0 3px 6px #00000012;\\n  display: grid;\\n  place-items: center;\\n  transition:\\n    transform 420ms var(--t-ease-spring),\\n    background 240ms,\\n    color 240ms;\\n}\\n.progress-demo-file-stack > span:nth-child(1) {\\n  transform: translate(-8px, -5px);\\n}\\n.progress-demo-file-stack > span:nth-child(2) {\\n  transform: translate(0, -3px);\\n}\\n.progress-demo-file-stack > span:nth-child(3) {\\n  transform: translate(8px, 0);\\n}\\n.progress-specimen[data-phase=\\\"running\\\"]\\n  .progress-demo-file-stack\\n  > span:nth-child(1) {\\n  transform: translate(-13px, -9px);\\n}\\n.progress-specimen[data-phase=\\\"running\\\"]\\n  .progress-demo-file-stack\\n  > span:nth-child(3) {\\n  transform: translate(13px, 3px);\\n}\\n.progress-specimen[data-phase=\\\"complete\\\"]\\n  .progress-demo-file-stack\\n  > span:last-child {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  border-color: var(--t-ink);\\n  transform: translate(8px, -5px);\\n}\\n.progress-demo-files {\\n  margin-top: 21px;\\n}\\n.progress-demo-file {\\n  display: flex;\\n  gap: 13px;\\n  align-items: flex-start;\\n  border-bottom: 1px solid var(--t-border);\\n  padding: 14px 0;\\n}\\n.progress-demo-file > span {\\n  display: grid;\\n  place-items: center;\\n  flex: none;\\n  width: 34px;\\n  height: 39px;\\n  background: var(--t-subtle);\\n  border: 1px solid var(--t-border);\\n  border-radius: 7px;\\n}\\n.progress-demo-file > .tidal-progress {\\n  flex: 1;\\n  min-width: 0;\\n}\\n.progress-demo-file .tidal-progress-heading {\\n  font-size: 11px;\\n}\\n.progress-demo-file .tidal-progress-reading {\\n  font-size: 11px;\\n}\\n.progress-demo-file .tidal-progress-meter {\\n  margin-top: 9px;\\n}\\n.progress-demo-file .tidal-progress-track {\\n  height: 4px;\\n}\\n.progress-demo-file .tidal-progress-footer {\\n  margin-top: 7px;\\n  font-size: 11px;\\n}\\n.progress-demo-file .tidal-progress-icon {\\n  width: 11px;\\n  height: 11px;\\n}\\n.progress-demo-actions {\\n  display: flex;\\n  align-items: center;\\n  flex-wrap: wrap;\\n  gap: 7px;\\n  margin-top: 22px;\\n}\\n.progress-demo-actions > .tidal-button {\\n  font-size: 11px;\\n  padding-inline: 12px;\\n}\\n.progress-demo-actions > .tidal-button:last-child {\\n  min-width: 44px;\\n  padding-inline: 12px;\\n}\\n.progress-demo-message {\\n  font-size: 11px;\\n  line-height: 1.8;\\n  color: var(--t-ink);\\n  margin: 17px 0 0;\\n  min-height: 36px;\\n}\\n.progress-demo-note {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.6;\\n  margin: 9px 0 0;\\n}\\n@media (max-width: 480px) {\\n  .progress-specimen {\\n    padding: 22px;\\n  }\\n  .progress-demo-package {\\n    padding: 16px;\\n  }\\n  .progress-demo-package .tidal-progress[data-variant=\\\"ring\\\"] {\\n    padding-right: 0;\\n    grid-template-columns: 76px minmax(0, 1fr);\\n    column-gap: 13px;\\n  }\\n  .progress-demo-package\\n    .tidal-progress[data-variant=\\\"ring\\\"]\\n    .tidal-progress-meter {\\n    width: 76px;\\n    height: 76px;\\n  }\\n  .progress-demo-package .tidal-progress-heading {\\n    font-size: 11px;\\n  }\\n  .progress-demo-file-stack {\\n    display: none;\\n  }\\n  .progress-demo-package-top {\\n    font-size: 11px;\\n    gap: 8px;\\n  }\\n  .progress-demo-package-top > span:last-child {\\n    font-size: 11px;\\n  }\\n  .progress-demo-file {\\n    gap: 10px;\\n  }\\n  .progress-demo-actions > .tidal-button {\\n    font-size: 11px;\\n    padding-inline: 9px;\\n  }\\n  .progress-demo-actions > .tidal-button:last-child {\\n    padding-inline: 8px;\\n  }\\n}\\n@media (prefers-reduced-motion: reduce) {\\n  .progress-demo-file-stack > span {\\n    rotate: none;\\n    transform: none !important;\\n  }\\n}\";\n\nconst files = [\n  { name: \"Interface.tsx\", size: 1200, Icon: FileCode2 },\n  { name: \"Theme.css\", size: 800, Icon: Palette },\n  { name: \"Preview.svg\", size: 2800, Icon: Image },\n];\n\ntype Phase = \"idle\" | \"preparing\" | \"running\" | \"paused\" | \"error\" | \"complete\";\n\nexport function ProgressDemo() {\n  const [phase, setPhase] = useState<Phase>(\"idle\");\n  const [value, setValue] = useState(0);\n  const [fail, setFail] = useState(false);\n  const messageRef = useRef<HTMLParagraphElement>(null);\n  const focusOwner = useRef<HTMLElement | null>(null);\n  useEffect(() => {\n    if (phase === \"preparing\") {\n      const timer = setTimeout(() => setPhase(\"running\"), 700);\n      return () => clearTimeout(timer);\n    }\n    if (phase !== \"running\") return;\n    const timer = setTimeout(() => {\n      const next = Math.min(value + 400, 4800);\n      setValue(next);\n      if (fail && next >= 2800) setPhase(\"error\");\n      else if (next === 4800) setPhase(\"complete\");\n    }, 240);\n    return () => clearTimeout(timer);\n  }, [phase, value, fail]);\n  useLayoutEffect(() => {\n    if ((phase !== \"complete\" && phase !== \"error\") || !focusOwner.current)\n      return;\n    const active = document.activeElement;\n    if (active === document.body || active === focusOwner.current)\n      messageRef.current?.focus({ preventScroll: true });\n    focusOwner.current = null;\n  }, [phase]);\n  function start(withFailure: boolean, source: HTMLElement) {\n    focusOwner.current = source;\n    setValue(0);\n    setFail(withFailure);\n    setPhase(\"preparing\");\n  }\n  const status =\n    phase === \"paused\" ? \"paused\" : phase === \"error\" ? \"error\" : \"active\";\n  const locked =\n    phase === \"preparing\" || phase === \"running\" || phase === \"paused\";\n  const message =\n    phase === \"preparing\"\n      ? \"Checking the sample package. Its duration is unknown.\"\n      : phase === \"running\"\n        ? \"The sample is advancing in measured 400 KB chunks.\"\n        : phase === \"paused\"\n          ? \"Paused at the current amount. Resume to continue.\"\n          : phase === \"error\"\n            ? \"A simulated interruption. Retry keeps the completed work.\"\n            : phase === \"complete\"\n              ? \"All 4.8 MB of the fictional package is ready. Nothing was uploaded.\"\n              : \"A fictional package. All actions stay inside this browser.\";\n  return (\n    <div className=\"progress-specimen\" data-phase={phase}>\n      <div className=\"progress-demo-package\">\n        <div className=\"progress-demo-package-top\">\n          <span>\n            <CloudUpload size={16} aria-hidden=\"true\" /> NORTHSTAR PACKAGE\n          </span>\n          <span>3 SAMPLE FILES</span>\n        </div>\n        <TidalProgress\n          label=\"Sample package preparation\"\n          variant=\"ring\"\n          value={phase === \"preparing\" ? null : value}\n          max={4800}\n          status={status}\n          description={\n            phase === \"preparing\"\n              ? \"Checking the sample files\"\n              : `${(value / 1000).toFixed(1)} of 4.8 MB`\n          }\n        />\n        <div className=\"progress-demo-file-stack\" aria-hidden=\"true\">\n          {files.map(({ Icon, name }, i) => (\n            <span key={name} style={{ rotate: `${(i - 1) * 5}deg` }}>\n              <Icon size={18} />\n            </span>\n          ))}\n        </div>\n      </div>\n      <div className=\"progress-demo-files\">\n        {files.map(({ name, size, Icon }, i) => {\n          const prior = files\n            .slice(0, i)\n            .reduce((sum, file) => sum + file.size, 0);\n          const amount = Math.min(Math.max(value - prior, 0), size);\n          return (\n            <div className=\"progress-demo-file\" key={name}>\n              <span>\n                <Icon size={17} aria-hidden=\"true\" />\n              </span>\n              <TidalProgress\n                label={name}\n                value={amount}\n                max={size}\n                status={amount === size ? \"active\" : status}\n                description={`${size / 1000} MB sample file`}\n              />\n            </div>\n          );\n        })}\n      </div>\n      <div className=\"progress-demo-actions\">\n        <TidalButton\n          onClick={(event) => start(false, event.currentTarget)}\n          disabled={locked || phase === \"complete\"}\n        >\n          {phase === \"complete\" ? \"Sample complete\" : \"Start sample\"}\n        </TidalButton>\n        <TidalButton\n          variant=\"secondary\"\n          disabled={\n            phase === \"idle\" || phase === \"preparing\" || phase === \"complete\"\n          }\n          onClick={() => {\n            if (phase === \"running\") setPhase(\"paused\");\n            else {\n              if (phase === \"error\") setFail(false);\n              setPhase(\"running\");\n            }\n          }}\n        >\n          {phase === \"paused\" || phase === \"error\" ? (\n            <Play size={12} aria-hidden=\"true\" />\n          ) : (\n            <Pause size={12} aria-hidden=\"true\" />\n          )}\n          {phase === \"paused\"\n            ? \"Resume\"\n            : phase === \"error\"\n              ? \"Retry remaining\"\n              : \"Pause\"}\n        </TidalButton>\n        <TidalButton\n          variant=\"secondary\"\n          onClick={(event) => start(true, event.currentTarget)}\n          disabled={locked}\n        >\n          Try failure\n        </TidalButton>\n        <TidalButton\n          variant=\"ghost\"\n          aria-label=\"Reset sample transfer\"\n          onClick={() => {\n            focusOwner.current = null;\n            setPhase(\"idle\");\n            setValue(0);\n            setFail(false);\n          }}\n          disabled={phase === \"idle\"}\n        >\n          <RotateCcw size={14} aria-hidden=\"true\" />\n        </TidalButton>\n      </div>\n      <p\n        ref={messageRef}\n        className=\"progress-demo-message\"\n        role=\"status\"\n        tabIndex={-1}\n      >\n        {message}\n      </p>\n      <p className=\"progress-demo-note\">\n        Real progress comes from your operation. This is a local simulation.\n      </p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <ProgressDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/progress.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "phase",
      "type": "inferred-from-existing-demo",
      "initial": "\"idle\"",
      "setter": "setPhase",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
