{
  "component": {
    "id": "saved-view-manager",
    "name": "Saved view manager",
    "tier": "pro",
    "exampleId": "saved-view-manager",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/saved-view-manager-demo.tsx",
    "exportName": "SavedViewManagerDemo",
    "sha256": "1105a65dbc84cce01fe393d176a8cb1349107aee20da1b1fc68f4d9c1f496f6c",
    "helperImports": [],
    "directComponentImports": [
      "saved-view-manager"
    ],
    "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/saved-view-manager",
    "registryUrl": "https://tidalui.com/r/pro/saved-view-manager.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/saved-view-manager",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/saved-view-manager",
      "registryUrl": "https://tidalui.com/r/pro/saved-view-manager.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/saved-view-manager.tsx",
    "exports": [
      "TidalSavedView",
      "TidalSavedViewManager"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/saved-view-manager.css",
      "components/ui/alert-dialog.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "@tidal-pro/alert-dialog"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "alert-dialog",
      "saved-view-manager"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/saved-view-manager.css",
      "components/ui/alert-dialog.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/saved-view-manager.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/saved-view-manager-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useRef, useState } from \"react\";\n\nimport { TidalSavedViewManager, type TidalSavedView } from \"./components/ui/saved-view-manager\";\n\nimport \"./components/ui/saved-view-manager.css\";\n\nimport \"./components/ui/alert-dialog.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .saved-view-manager-demo {\\n  display: grid;\\n  width: 100%;\\n  max-width: 680px;\\n  min-width: 0;\\n  gap: 14px;\\n}\\n\\n.tidal-scope .saved-view-manager-demo > footer {\\n  display: flex;\\n  min-width: 0;\\n  align-items: start;\\n  justify-content: space-between;\\n  gap: 12px;\\n  padding-inline: 2px;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n}\\n\\n.tidal-scope .saved-view-manager-demo > footer p,\\n.tidal-scope .saved-view-manager-demo > footer span {\\n  min-width: 0;\\n  margin: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .saved-view-manager-demo > footer p {\\n  color: var(--t-ink);\\n}\\n\\n@media (max-width: 420px) {\\n  .tidal-scope .saved-view-manager-demo > footer {\\n    flex-direction: column;\\n  }\\n}\";\n\nconst INITIAL_VIEWS: readonly TidalSavedView[] = [\n  {\n    id: \"my-work\",\n    name: \"My work\",\n    description: \"Assigned work that needs attention this week.\",\n    filterSummary: \"Assignee: me · Status: active · Updated: newest first\",\n    isDefault: true,\n  },\n  {\n    id: \"launch-readiness\",\n    name: \"Launch readiness\",\n    description: \"Open launch tasks across product, support and operations.\",\n    filterSummary: \"Project: autumn launch · Status: open or blocked\",\n    isShared: true,\n  },\n  {\n    id: \"needs-review\",\n    name: \"Needs review\",\n    description: \"Recently completed work waiting for a final review.\",\n    filterSummary: \"Status: review · Completed: past 7 days\",\n  },\n];\n\nexport function SavedViewManagerDemo() {\n  const [views, setViews] = useState<TidalSavedView[]>([...INITIAL_VIEWS]);\n  const [currentId, setCurrentId] = useState<string | null>(\"my-work\");\n  const [status, setStatus] = useState(\"My work is selected.\");\n  const copyCounter = useRef(1);\n\n  return (\n    <div className=\"saved-view-manager-demo\">\n      <TidalSavedViewManager\n        title=\"Saved views\"\n        description=\"Keep useful workspace filters ready for the next visit.\"\n        views={views}\n        currentViewId={currentId}\n        onCurrentViewChange={(id) => {\n          setCurrentId(id);\n          const next = views.find((view) => view.id === id);\n          setStatus(`${next?.name ?? \"Saved view\"} is selected.`);\n        }}\n        renameAction={{\n          onRequest: (view, name, event) => {\n            event.preventDefault();\n            setViews((current) =>\n              current.map((item) =>\n                item.id === view.id ? { ...item, name } : item,\n              ),\n            );\n            setStatus(`Renamed the local view to ${name}.`);\n          },\n        }}\n        duplicateAction={{\n          onRequest: (view, name, event) => {\n            event.preventDefault();\n            const id = `${view.id}-copy-${copyCounter.current++}`;\n            setViews((current) => [\n              ...current,\n              {\n                ...view,\n                id,\n                name,\n                isDefault: false,\n                isShared: false,\n              },\n            ]);\n            setCurrentId(id);\n            setStatus(`Created the local copy ${name}.`);\n          },\n        }}\n        defaultAction={{\n          onChange: (view, next) => {\n            setViews((current) =>\n              current.map((item) => ({\n                ...item,\n                isDefault: next ? item.id === view.id : false,\n              })),\n            );\n            setStatus(\n              next\n                ? `${view.name} is the local default.`\n                : `${view.name} is no longer the local default.`,\n            );\n          },\n        }}\n        sharedAction={{\n          onChange: (view, next) => {\n            setViews((current) =>\n              current.map((item) =>\n                item.id === view.id ? { ...item, isShared: next } : item,\n              ),\n            );\n            setStatus(`${view.name} is now ${next ? \"shared\" : \"private\"}.`);\n          },\n        }}\n        deleteAction={{\n          onRequest: (view) => {\n            const remaining = views.filter((item) => item.id !== view.id);\n            setViews(remaining);\n            if (currentId === view.id) setCurrentId(remaining[0]?.id ?? null);\n            setStatus(`Removed ${view.name} from this local sample.`);\n          },\n        }}\n      />\n      <footer>\n        <p role=\"status\">{status}</p>\n        <span>Local sample only. No views are saved or shared elsewhere.</span>\n      </footer>\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      <SavedViewManagerDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/saved-view-manager.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "views",
      "type": "inferred-from-existing-demo",
      "initial": "[...INITIAL_VIEWS]",
      "setter": "setViews",
      "proposalCanBeRejected": false
    },
    {
      "prop": "currentViewId",
      "type": "inferred-from-existing-demo",
      "initial": "\"my-work\"",
      "setter": "setCurrentId",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onCurrentViewChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "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": "Consumer-provided label remains required where the component API requires one.",
    "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": "Verify focus returns to the invoking control after dismissal.",
    "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": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "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": []
}
