{
  "component": {
    "id": "schedule-builder",
    "name": "Schedule builder",
    "tier": "pro",
    "exampleId": "schedule-builder",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/schedule-builder-demo.tsx",
    "exportName": "ScheduleBuilderDemo",
    "sha256": "90990b910fd1ceee970ddf1f0f90a9530db13f7332f15b943e1064b798d8fa28",
    "helperImports": [],
    "directComponentImports": [
      "schedule-builder"
    ],
    "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/schedule-builder",
    "registryUrl": "https://tidalui.com/r/pro/schedule-builder.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/schedule-builder",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/schedule-builder",
      "registryUrl": "https://tidalui.com/r/pro/schedule-builder.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/schedule-builder.tsx",
    "exports": [
      "TidalScheduleBuilder",
      "TidalSchedulePreviewItem",
      "TidalScheduleValue",
      "buildScheduleExpression"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/schedule-builder.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "schedule-builder"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/schedule-builder.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/schedule-builder.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/schedule-builder-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useMemo, useState, type FormEvent } from \"react\";\n\nimport { TidalScheduleBuilder, buildScheduleExpression, type TidalSchedulePreviewItem, type TidalScheduleValue } from \"./components/ui/schedule-builder\";\n\nimport \"./components/ui/schedule-builder.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-schedule-demo {\\n  width: min(100%, 720px);\\n  display: grid;\\n  gap: 14px;\\n}\\n\\n.tidal-schedule-demo-footer {\\n  display: flex;\\n  gap: 12px;\\n  align-items: center;\\n  justify-content: space-between;\\n  padding-inline: 4px;\\n}\\n\\n.tidal-schedule-demo-footer p {\\n  min-width: 0;\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 12px;\\n  line-height: 1.5;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-schedule-demo-footer button {\\n  min-width: 112px;\\n  min-height: 44px;\\n  flex: 0 0 auto;\\n  padding: 8px 14px;\\n  border: 1px solid var(--t-line);\\n  border-radius: var(--t-radius-control);\\n  background: var(--t-canvas);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 12px;\\n  font-weight: 750;\\n  white-space: normal;\\n  overflow-wrap: anywhere;\\n  cursor: pointer;\\n}\\n\\n.tidal-schedule-demo-footer button:focus-visible {\\n  outline: 3px solid var(--t-focus);\\n  outline-offset: 3px;\\n}\\n\\n@media (max-width: 420px) {\\n  .tidal-schedule-demo-footer {\\n    align-items: stretch;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-schedule-demo-footer button {\\n    width: 100%;\\n  }\\n}\";\n\nconst INITIAL: TidalScheduleValue = {\n  frequency: \"weekly\",\n  time: \"09:30\",\n  weekdays: [\"mon\", \"thu\"],\n  monthDay: 15,\n};\n\nconst TIMEZONES = [\n  { value: \"UTC\", label: \"UTC\" },\n  { value: \"America/Chicago\", label: \"Central time\" },\n  { value: \"Europe/London\", label: \"London time\" },\n] as const;\n\nconst DAY_NAMES = {\n  sun: \"Sunday\",\n  mon: \"Monday\",\n  tue: \"Tuesday\",\n  wed: \"Wednesday\",\n  thu: \"Thursday\",\n  fri: \"Friday\",\n  sat: \"Saturday\",\n} as const;\n\nfunction previewSchedule(\n  value: TidalScheduleValue,\n  timezone: string,\n): readonly TidalSchedulePreviewItem[] {\n  if (value.frequency === \"daily\")\n    return [\n      { id: \"daily-next\", label: `Every day at ${value.time} · ${timezone}` },\n    ];\n  if (value.frequency === \"weekly\")\n    return value.weekdays.slice(0, 3).map((day) => ({\n      id: day,\n      label: `Every ${DAY_NAMES[day]} at ${value.time} · ${timezone}`,\n    }));\n  return [\n    {\n      id: \"monthly-next\",\n      label: `Day ${value.monthDay} of each month at ${value.time} · ${timezone}`,\n    },\n  ];\n}\n\nexport function ScheduleBuilderDemo() {\n  const [value, setValue] = useState<TidalScheduleValue>(INITIAL);\n  const [timezone, setTimezone] = useState(\"UTC\");\n  const [status, setStatus] = useState(\n    \"Local sample. No schedule has been created.\",\n  );\n  const nextRuns = useMemo(\n    () => previewSchedule(value, timezone),\n    [value, timezone],\n  );\n\n  function clearStatus() {\n    setStatus(\"Local sample updated. No schedule has been created.\");\n  }\n\n  function submit(event: FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    const expression = buildScheduleExpression(value);\n    setStatus(\n      expression\n        ? `Prepared ${expression} for ${timezone}. No schedule was created.`\n        : \"Complete the schedule before preparing it.\",\n    );\n  }\n\n  return (\n    <div className=\"tidal-schedule-demo\">\n      <TidalScheduleBuilder\n        id=\"tidal-schedule-demo-form\"\n        title=\"Workspace summary\"\n        description=\"Choose when the local report should be prepared.\"\n        value={value}\n        onValueChange={(next) => {\n          setValue(next);\n          clearStatus();\n        }}\n        timezone={timezone}\n        timezones={TIMEZONES}\n        onTimezoneChange={(next) => {\n          setTimezone(next);\n          clearStatus();\n        }}\n        nextRuns={nextRuns}\n        labels={{ preview: \"Schedule summary\" }}\n        onSubmit={submit}\n        onReset={(event) => {\n          event.preventDefault();\n          setValue(INITIAL);\n          setTimezone(\"UTC\");\n          setStatus(\"Sample schedule reset.\");\n        }}\n        submitProps={{ formMethod: \"post\" }}\n      />\n      <div className=\"tidal-schedule-demo-footer\">\n        <p aria-live=\"polite\">{status}</p>\n        <button type=\"reset\" form=\"tidal-schedule-demo-form\">\n          Reset sample\n        </button>\n      </div>\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      <ScheduleBuilderDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/schedule-builder.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "INITIAL",
      "setter": "setValue",
      "proposalCanBeRejected": false
    },
    {
      "prop": "timezone",
      "type": "inferred-from-existing-demo",
      "initial": "\"UTC\"",
      "setter": "setTimezone",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onReset",
      "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."
    },
    {
      "name": "onSubmit",
      "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."
    },
    {
      "name": "onTimezoneChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onValueChange",
      "nativeType": "component 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": "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": "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": []
}
