"use client"; import "./components/ui/tidal.css"; import { useRef, useState } from "react"; import { TidalResizablePanels } from "./components/ui/resizable-panels"; import "./components/ui/resizable-panels.css"; const tidalExampleStyles = ".tidal-scope .resizable-demo,\n.tidal-scope .resizable-demo * {\n box-sizing: border-box;\n}\n\n.tidal-scope .resizable-demo {\n width: 100%;\n min-width: 0;\n color: var(--t-ink);\n container: resizable-demo / inline-size;\n font-family: Inter, ui-sans-serif, system-ui, sans-serif;\n}\n\n.tidal-scope .resizable-demo-frame {\n min-width: 0;\n padding: clamp(8px, 2.8cqi, 28px);\n}\n\n.tidal-scope .resizable-demo-browser,\n.tidal-scope .resizable-demo-document {\n min-width: 0;\n min-height: 100%;\n}\n\n.tidal-scope .resizable-demo-browser {\n display: flex;\n flex-direction: column;\n padding: 20px;\n background: var(--t-subtle);\n}\n\n.tidal-scope .resizable-demo-browser-head,\n.tidal-scope .resizable-demo-document > header,\n.tidal-scope .resizable-demo-document > footer {\n display: flex;\n min-width: 0;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.tidal-scope .resizable-demo-browser-head > div {\n min-width: 0;\n}\n\n.tidal-scope .resizable-demo-browser-head span,\n.tidal-scope .resizable-demo-document > header,\n.tidal-scope .resizable-demo-document-copy > p:first-child {\n color: var(--t-muted);\n font-size: 11px;\n font-weight: 680;\n letter-spacing: 0.09em;\n line-height: 1.4;\n text-transform: uppercase;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-browser-head > span {\n display: grid;\n width: 28px;\n height: 28px;\n flex: none;\n place-items: center;\n border: 1px solid var(--t-border);\n border-radius: 7px;\n background: var(--t-surface);\n}\n\n.tidal-scope .resizable-demo-browser h2,\n.tidal-scope .resizable-demo-document h2 {\n margin: 4px 0 0;\n font-size: 18px;\n font-weight: 690;\n letter-spacing: -0.045em;\n line-height: 1.1;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-document-list {\n display: grid;\n min-width: 0;\n gap: 7px;\n margin-top: 20px;\n}\n\n.tidal-scope .resizable-demo-document-list button {\n display: grid;\n min-width: 0;\n min-height: 54px;\n grid-template-columns: 36px minmax(0, 1fr);\n grid-template-rows: auto auto;\n align-items: center;\n column-gap: 10px;\n padding: 8px 10px;\n border: 1px solid transparent;\n border-radius: 10px;\n background: transparent;\n color: var(--t-ink);\n font: inherit;\n text-align: start;\n cursor: pointer;\n animation: resizable-demo-row 420ms var(--t-ease-out) both;\n animation-delay: calc(min(var(--resizable-demo-index), 4) * 55ms + 120ms);\n transition:\n border-color 180ms,\n background 180ms,\n color 180ms,\n transform 140ms var(--t-ease-out);\n}\n\n.tidal-scope .resizable-demo-document-list button > span {\n display: grid;\n width: 34px;\n height: 34px;\n grid-row: 1 / 3;\n place-items: center;\n border: 1px solid var(--t-border);\n border-radius: 7px;\n background: var(--t-surface);\n color: var(--t-muted);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.04em;\n}\n\n.tidal-scope .resizable-demo-document-list button strong,\n.tidal-scope .resizable-demo-document-list button small {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-document-list button strong {\n align-self: end;\n font-size: 11px;\n line-height: 1.25;\n}\n\n.tidal-scope .resizable-demo-document-list button small {\n align-self: start;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.35;\n}\n\n.tidal-scope .resizable-demo-document-list button[aria-pressed=\"true\"] {\n border-color: var(--t-ink);\n background: var(--t-ink);\n color: var(--t-surface);\n}\n\n.tidal-scope .resizable-demo-document-list button[aria-pressed=\"true\"] > span {\n border-color: var(--t-surface);\n background: var(--t-surface);\n color: var(--t-ink);\n}\n\n.tidal-scope .resizable-demo-document-list button[aria-pressed=\"true\"] small {\n color: var(--t-surface);\n opacity: 0.7;\n}\n\n.tidal-scope\n .resizable-demo-document-list\n button:not([aria-pressed=\"true\"]):hover {\n border-color: var(--t-border);\n background: var(--t-surface);\n}\n\n.tidal-scope .resizable-demo-document-list button:active,\n.tidal-scope .resizable-demo-balance:active {\n transform: scale(0.98);\n}\n\n.tidal-scope .resizable-demo-document-list button:focus-visible,\n.tidal-scope .resizable-demo-balance:focus-visible {\n outline: 2px solid var(--t-accent);\n outline-offset: 2px;\n}\n\n.tidal-scope .resizable-demo-balance {\n min-width: 0;\n min-height: 44px;\n margin-top: auto;\n padding: 9px 12px;\n border: 1px solid var(--t-border);\n border-radius: 10px;\n background: var(--t-surface);\n color: var(--t-ink);\n font: inherit;\n font-size: 11px;\n font-weight: 680;\n line-height: 1.35;\n overflow-wrap: anywhere;\n cursor: pointer;\n transition:\n border-color 180ms,\n background 180ms,\n color 180ms,\n transform 140ms var(--t-ease-out);\n}\n\n.tidal-scope .resizable-demo-balance:hover {\n border-color: var(--t-ink);\n}\n\n.tidal-scope .resizable-demo-document {\n display: flex;\n flex-direction: column;\n padding: clamp(22px, 4cqi, 38px);\n background: var(--t-surface);\n}\n\n.tidal-scope .resizable-demo-document > header {\n padding-bottom: 15px;\n border-bottom: 1px solid var(--t-border);\n}\n\n.tidal-scope .resizable-demo-document-copy {\n min-width: 0;\n padding: 30px 0 24px;\n}\n\n.tidal-scope .resizable-demo-document h2 {\n max-width: 520px;\n margin-top: 10px;\n font-size: clamp(28px, 5cqi, 48px);\n}\n\n.tidal-scope .resizable-demo-document-copy > p:last-child {\n max-width: 560px;\n margin: 16px 0 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.7;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-document ol {\n padding: 0;\n margin: 0;\n border-top: 1px solid var(--t-border);\n list-style: none;\n}\n\n.tidal-scope .resizable-demo-document li {\n display: grid;\n min-width: 0;\n min-height: 48px;\n grid-template-columns: 32px minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px;\n border-bottom: 1px solid var(--t-border);\n font-size: 11px;\n}\n\n.tidal-scope .resizable-demo-document li > span {\n color: var(--t-muted);\n font-size: 11px;\n}\n\n.tidal-scope .resizable-demo-document li strong {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-document > footer {\n flex-wrap: wrap;\n margin-top: auto;\n padding-top: 22px;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .resizable-demo-document output {\n color: var(--t-ink);\n font-weight: 680;\n}\n\n@container resizable-demo (max-width: 560px) {\n .tidal-scope .resizable-demo-frame {\n padding: 6px;\n }\n\n .tidal-scope .resizable-demo-browser,\n .tidal-scope .resizable-demo-document {\n padding: 17px;\n }\n\n .tidal-scope .resizable-demo-document-list {\n margin-top: 13px;\n }\n\n .tidal-scope .resizable-demo-document-list button {\n min-height: 48px;\n }\n\n .tidal-scope .resizable-demo-balance {\n font-size: 16px;\n }\n\n .tidal-scope .resizable-demo-document-copy {\n padding-block: 19px 16px;\n }\n\n .tidal-scope .resizable-demo-document h2 {\n font-size: 28px;\n }\n\n .tidal-scope .resizable-demo-document li {\n min-height: 44px;\n }\n\n .tidal-scope .resizable-demo-document > footer {\n padding-top: 15px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .resizable-demo-document-list button,\n .tidal-scope .resizable-demo-balance {\n animation: none;\n transition: none;\n }\n\n .tidal-scope .resizable-demo-document-list button:active,\n .tidal-scope .resizable-demo-balance:active {\n transform: none;\n }\n}\n\n@keyframes resizable-demo-row {\n from {\n opacity: 0;\n transform: translateY(7px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}"; const DOCUMENTS = [ { id: "launch-brief", code: "BR-18", title: "Launch brief", type: "Brief", updated: "Edited today", summary: "A compact plan for the fictional October release review, including the handoff order and open questions.", sections: ["Release goal", "Review order", "Open questions"], }, { id: "research-notes", code: "NT-07", title: "Research notes", type: "Notes", updated: "Edited yesterday", summary: "Collected observations from a local sample review of navigation, narrow layouts, and keyboard paths.", sections: ["Navigation", "Compact layouts", "Keyboard paths"], }, { id: "release-checklist", code: "CK-24", title: "Release checklist", type: "Checklist", updated: "Edited Oct 12", summary: "The fictional checks used to prepare a local preview before a separate browser acceptance pass.", sections: ["Source review", "Responsive preview", "Release notes"], }, ] as const; export function ResizablePanelsDemo() { const [value, setValue] = useState(42); const [selectedId, setSelectedId] = useState< (typeof DOCUMENTS)[number]["id"] >(DOCUMENTS[0].id); const separatorRef = useRef(null); const selected = DOCUMENTS.find((document) => document.id === selectedId) ?? DOCUMENTS[0]; return (
`Document list ${nextValue} percent, document detail ${100 - nextValue} percent` } separatorRef={separatorRef} primaryPanel={{ label: "Documents", content: (
Workspace

Documents

{DOCUMENTS.length}
{DOCUMENTS.map((document, index) => ( ))}
), }} secondaryPanel={{ label: "Selected document detail", content: (
{selected.code} {selected.updated}

{selected.type}

{selected.title}

{selected.summary}

    {selected.sections.map((section, index) => (
  1. {String(index + 1).padStart(2, "0")} {section}
  2. ))}
List {value}% · Detail {100 - value}% Fictional documents for this local preview.
), }} />
); } export default function AgentExample() { return (
); }