{
  "component": {
    "id": "settings-page-template",
    "name": "Settings page template",
    "tier": "pro",
    "exampleId": "settings-page-template",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/settings-page-template-demo.tsx",
    "exportName": "SettingsPageTemplateDemo",
    "sha256": "60ff1ab59f2b626d5f26f3de83a280ded9da1ef0cde1943172b8f0a42e5d6724",
    "helperImports": [],
    "directComponentImports": [
      "settings-page-template"
    ],
    "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/settings-page-template",
    "registryUrl": "https://tidalui.com/r/pro/settings-page-template.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/settings-page-template",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/settings-page-template",
      "registryUrl": "https://tidalui.com/r/pro/settings-page-template.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/settings-page-template.tsx",
    "exports": [
      "TidalSettingsPageGeneralConfig",
      "TidalSettingsPageNotificationsConfig",
      "TidalSettingsPageTemplate"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/settings-page-template.css",
      "components/ui/settings-panel.css",
      "components/ui/notification-preferences.css",
      "components/ui/color-picker.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "@tidal-pro/settings-panel",
      "@tidal-pro/notification-preferences",
      "@tidal-pro/color-picker"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "color-picker",
      "notification-preferences",
      "settings-page-template",
      "settings-panel"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/settings-page-template.css",
      "components/ui/settings-panel.css",
      "components/ui/notification-preferences.css",
      "components/ui/color-picker.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/settings-page-template.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/settings-page-template-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalSettingsPageTemplate, type TidalSettingsPageGeneralConfig, type TidalSettingsPageNotificationsConfig } from \"./components/ui/settings-page-template\";\n\nimport \"./components/ui/settings-page-template.css\";\n\nimport \"./components/ui/settings-panel.css\";\n\nimport \"./components/ui/notification-preferences.css\";\n\nimport \"./components/ui/color-picker.css\";\n\n\n\nconst tidalExampleStyles = \".settings-page-template-demo {\\n  width: 100%;\\n  min-width: 0;\\n}\\n\\n.settings-page-template-demo .tidal-settings-page-footer p {\\n  margin: 0;\\n}\";\n\ntype Density = \"comfortable\" | \"compact\";\n\ninterface GeneralValues {\n  density: Density;\n  weeklySummary: boolean;\n}\n\nconst INITIAL_GENERAL: GeneralValues = {\n  density: \"comfortable\",\n  weeklySummary: true,\n};\n\nconst INITIAL_NOTIFICATIONS: Readonly<Record<string, boolean>> = {\n  \"assignment:in-app\": true,\n  \"assignment:email\": false,\n  \"review:in-app\": true,\n  \"review:email\": true,\n};\n\nconst CHANNELS = [\n  { id: \"in-app\", label: \"In app\", accessibleLabel: \"In-app sample\" },\n  { id: \"email\", label: \"Email\", accessibleLabel: \"Email sample\" },\n] as const;\n\nconst PRESETS = [\n  { id: \"ink\", value: \"#171717\", label: \"Ink\", accessibleLabel: \"Use ink\" },\n  {\n    id: \"graphite\",\n    value: \"#444444\",\n    label: \"Graphite\",\n    accessibleLabel: \"Use graphite\",\n  },\n  {\n    id: \"stone\",\n    value: \"#737373\",\n    label: \"Stone\",\n    accessibleLabel: \"Use stone\",\n  },\n] as const;\n\nexport function SettingsPageTemplateDemo() {\n  const [general, setGeneral] = useState<GeneralValues>(INITIAL_GENERAL);\n  const [appliedGeneral, setAppliedGeneral] =\n    useState<GeneralValues>(INITIAL_GENERAL);\n  const [notifications, setNotifications] = useState<Record<string, boolean>>({\n    ...INITIAL_NOTIFICATIONS,\n  });\n  const [savedNotifications, setSavedNotifications] = useState<\n    Record<string, boolean>\n  >({ ...INITIAL_NOTIFICATIONS });\n  const [color, setColor] = useState(\"#171717\");\n  const [status, setStatus] = useState(\"Sample settings are ready.\");\n\n  const generalConfig: TidalSettingsPageGeneralConfig = {\n    title: \"General\",\n    description: \"Choose how this fictional workspace preview is arranged.\",\n    groups: [\n      {\n        id: \"workspace-view\",\n        title: \"Workspace view\",\n        fields: [\n          {\n            id: \"density\",\n            kind: \"select\",\n            name: \"density\",\n            label: \"Navigation density\",\n            value: general.density,\n            options: [\n              { value: \"comfortable\", label: \"Comfortable\" },\n              { value: \"compact\", label: \"Compact\" },\n            ],\n            onValueChange: (value) => {\n              setGeneral((current) => ({\n                ...current,\n                density: value as Density,\n              }));\n              setStatus(\"General draft changed locally.\");\n            },\n          },\n          {\n            id: \"weekly-summary\",\n            kind: \"toggle\",\n            name: \"weeklySummary\",\n            label: \"Weekly summary\",\n            description: \"Include a summary in this sample configuration.\",\n            checked: general.weeklySummary,\n            onCheckedChange: (checked) => {\n              setGeneral((current) => ({\n                ...current,\n                weeklySummary: checked,\n              }));\n              setStatus(\"General draft changed locally.\");\n            },\n          },\n        ],\n      },\n    ],\n    onSubmit: (event: import(\"react\").FormEvent<HTMLFormElement>) => {\n      event.preventDefault();\n      setAppliedGeneral(general);\n      setStatus(\"General sample applied to the summary below.\");\n    },\n    onReset: () => {\n      setGeneral(INITIAL_GENERAL);\n      setAppliedGeneral(INITIAL_GENERAL);\n      setStatus(\"General sample reset.\");\n    },\n    applyLabel: \"Apply general sample\",\n    resetLabel: \"Reset general sample\",\n  };\n\n  const notificationConfig: TidalSettingsPageNotificationsConfig = {\n    title: \"Notifications\",\n    description: \"Choose where fictional project updates appear.\",\n    channels: CHANNELS,\n    groups: [\n      {\n        id: \"project-updates\",\n        title: \"Project updates\",\n        preferences: [\n          {\n            id: \"assignment\",\n            label: \"Task assigned\",\n            accessibleLabel: \"Task assigned\",\n            controls: CHANNELS.map((channel) => ({\n              channelId: channel.id,\n              checked: notifications[`assignment:${channel.id}`] ?? false,\n            })),\n          },\n          {\n            id: \"review\",\n            label: \"Review requested\",\n            accessibleLabel: \"Review requested\",\n            controls: CHANNELS.map((channel) => ({\n              channelId: channel.id,\n              checked: notifications[`review:${channel.id}`] ?? false,\n            })),\n          },\n        ],\n      },\n    ],\n    onPreferenceChange: (preference, channel, checked) => {\n      setNotifications((current) => ({\n        ...current,\n        [`${preference.id}:${channel.id}`]: checked,\n      }));\n      setStatus(\"Notification draft changed locally.\");\n    },\n    onSave: (event) => {\n      event.preventDefault();\n      setSavedNotifications({ ...notifications });\n      setStatus(\"Notification sample applied to the summary below.\");\n    },\n    resetAction: {\n      label: \"Reset notification sample\",\n      onAction: () => {\n        setNotifications({ ...INITIAL_NOTIFICATIONS });\n        setSavedNotifications({ ...INITIAL_NOTIFICATIONS });\n        setStatus(\"Notification sample reset.\");\n      },\n    },\n    labels: { save: \"Apply notification sample\" },\n  };\n\n  const enabledDeliveryCount =\n    Object.values(savedNotifications).filter(Boolean).length;\n\n  return (\n    <section\n      className=\"settings-page-template-demo\"\n      aria-label=\"Settings page template preview\"\n    >\n      <TidalSettingsPageTemplate\n        title=\"Workspace settings\"\n        description=\"Review general preferences, notification channels and the sample interface color in one responsive page.\"\n        general={generalConfig}\n        notifications={notificationConfig}\n        appearance={{\n          title: \"Appearance\",\n          description:\n            \"Choose a neutral supplied value or enter a six-digit hex value.\",\n          value: color,\n          presets: PRESETS,\n          required: true,\n          hint: \"Use six hexadecimal digits.\",\n          onValueChange: (value) => {\n            setColor(value);\n            setStatus(\"Appearance sample changed locally.\");\n          },\n          resetAction: {\n            label: \"Reset appearance sample\",\n            accessibleLabel: \"Reset appearance sample to ink\",\n            onAction: () => {\n              setColor(\"#171717\");\n              setStatus(\"Appearance sample reset to ink.\");\n            },\n          },\n        }}\n        footer={\n          <p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n            {status} Applied view: {appliedGeneral.density}, weekly summary{\" \"}\n            {appliedGeneral.weeklySummary ? \"on\" : \"off\"}; notification channels\n            on: {enabledDeliveryCount}; color: {color}. Fictional local sample\n            only.\n          </p>\n        }\n      />\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <SettingsPageTemplateDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/settings-page-template.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "events": [],
  "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": []
}
