"use client"; import "./components/ui/tidal.css"; import { useMemo, useState } from "react"; import { RotateCcw } from "lucide-react"; import { TidalChangelogBlock, type TidalChangelogRelease } from "./components/ui/changelog-block"; import "./components/ui/changelog-block.css"; const tidalExampleStyles = ".tidal-scope .changelog-demo,\n.tidal-scope .changelog-demo * {\n box-sizing: border-box;\n}\n\n.tidal-scope .changelog-demo {\n width: 100%;\n min-width: 0;\n padding: clamp(12px, 3.4vw, 38px);\n color: var(--t-ink);\n background:\n linear-gradient(var(--t-border) 1px, transparent 1px),\n linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\n var(--t-subtle);\n background-size: 26px 26px;\n border-radius: 22px;\n container: changelog-demo / inline-size;\n}\n\n.tidal-scope .changelog-demo-shell {\n display: grid;\n width: 100%;\n max-width: 1020px;\n min-width: 0;\n gap: 13px;\n margin: 0 auto;\n}\n\n.tidal-scope .changelog-demo .tidal-changelog {\n margin: 0 auto;\n}\n\n.tidal-scope .changelog-demo .tidal-changelog-header-action svg {\n flex: none;\n}\n\n.tidal-scope .changelog-demo-status {\n margin: 0;\n padding: 0 5px;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.55;\n text-align: center;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .changelog-demo-note {\n width: 100%;\n max-width: 920px;\n min-width: 0;\n margin: 0 auto;\n padding: 15px 17px;\n color: var(--t-ink);\n background: var(--t-surface);\n border: 1px solid var(--t-border);\n border-radius: 18px;\n scroll-margin-top: 16px;\n}\n\n.tidal-scope .changelog-demo-note > span,\n.tidal-scope .changelog-demo-note > strong,\n.tidal-scope .changelog-demo-note > p {\n display: block;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .changelog-demo-note > span {\n color: var(--t-muted);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.12em;\n line-height: 1.4;\n}\n\n.tidal-scope .changelog-demo-note > strong {\n margin-top: 5px;\n font-size: 13px;\n font-weight: 650;\n line-height: 1.4;\n}\n\n.tidal-scope .changelog-demo-note > p {\n margin: 4px 0 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.6;\n}\n\n@container changelog-demo (max-width: 440px) {\n .tidal-scope .changelog-demo {\n padding: 7px;\n background-size: 18px 18px;\n border-radius: 18px;\n }\n}"; type VersionFilter = "all" | "2.4" | "2.3"; const RELEASES: readonly TidalChangelogRelease[] = [ { id: "2.4.0", version: "v2.4.0", title: "Faster project review", publishedAt: "2026-10-08", dateLabel: "October 8, 2026", summary: "The fictional Orbit Desk sample now keeps review notes beside the work they describe.", changes: [ { id: "review-queue", kind: "added", title: "Review queue", description: "Collect open decisions in one local view.", href: "#changelog-demo-notes", }, { id: "search-order", kind: "improved", title: "Project search order", description: "Recent exact matches appear first in the sample.", }, { id: "focus-return", kind: "fixed", title: "Dialog focus return", description: "Closing a sample review returns focus to its trigger.", }, ], details: (
Local migration note

Existing fictional projects need no action. The review queue appears only in this rendered sample.

), link: { href: "#changelog-demo-notes", label: "Read sample note", }, }, { id: "2.3.1", version: "v2.3.1", title: "Clearer task status", publishedAt: "2026-09-24", dateLabel: "September 24, 2026", summary: "Status text and shape now stay readable across light and dark sample surfaces.", changes: [ { id: "status-copy", kind: "improved", title: "Status labels", description: "Every state uses a literal word alongside its marker.", }, { id: "empty-project", kind: "fixed", title: "Empty project layout", description: "The first-action control remains visible at narrow widths.", }, ], details: (

This example describes interface behavior only. It does not update a real project or account.

), }, { id: "2.3.0", version: "v2.3.0", title: "Shared project briefs", publishedAt: "2026-09-10", dateLabel: "September 10, 2026", summary: "A concise brief preview joins the fictional project planning sample.", changes: [ { id: "brief-preview", kind: "added", title: "Brief preview", description: "Review scope, owner, and next step in one panel.", }, { id: "legacy-label", kind: "removed", title: "Legacy priority label", description: "The sample now uses one consistent priority vocabulary.", }, ], details: (

The removed label refers only to the fictional sample data shown here.

), }, ]; const FILTERS = [ { id: "all", label: "All versions", count: 3 }, { id: "2.4", label: "Version 2.4", count: 1 }, { id: "2.3", label: "Version 2.3", count: 2 }, ] as const; export function ChangelogBlockDemo() { const [filter, setFilter] = useState("all"); const [expandedIds, setExpandedIds] = useState>( () => new Set(["2.4.0"]), ); const [motionKey, setMotionKey] = useState(0); const [message, setMessage] = useState( "Showing all three fictional releases. Version 2.4 details are open.", ); const visibleReleases = useMemo( () => filter === "all" ? RELEASES : RELEASES.filter((release) => release.id.startsWith(filter)), [filter], ); function selectFilter(nextFilter: string) { const next = nextFilter as VersionFilter; setFilter(next); setMessage( next === "all" ? "Showing all three fictional releases." : `Showing fictional version ${next} releases.`, ); } function setReleaseExpanded(releaseId: string, expanded: boolean) { setExpandedIds((current) => { const next = new Set(current); if (expanded) next.add(releaseId); else next.delete(releaseId); return next; }); setMessage( `${releaseId} sample details ${expanded ? "opened" : "closed"}.`, ); } function replayMotion() { setMotionKey((current) => current + 1); setMessage("The finite entrance sequence replayed in this local preview."); } return (
); } export default function AgentExample() { return (
); }