"use client"; import "./components/ui/tidal.css"; import { useMemo, useState } from "react"; import { TidalImageGallery, type TidalImageGalleryItem } from "./components/ui/image-gallery"; import "./components/ui/image-gallery.css"; const tidalExampleStyles = ".tidal-scope .image-gallery-demo,\n.tidal-scope .image-gallery-demo * {\n box-sizing: border-box;\n}\n.tidal-scope .image-gallery-demo {\n width: min(100%, 980px);\n min-width: 0;\n margin-inline: auto;\n padding: clamp(8px, 3vw, 28px);\n background: var(--t-subtle);\n color: var(--t-ink);\n}\n.tidal-scope .image-gallery-demo-footer {\n padding: 10px 12px 0;\n}\n.tidal-scope .image-gallery-demo-footer p {\n margin: 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .image-gallery-demo * {\n scroll-behavior: auto;\n }\n}"; function StudyVisual({ variant, label, }: { variant: 1 | 2 | 3; label: string; }) { return ( {variant === 1 ? ( <> ) : variant === 2 ? ( <> {[70, 210, 350, 510, 650].map((x, index) => ( ))} ) : ( <> {[0, 1, 2].map((column) => ( {[76, 130, 184].map((y, index) => ( ))} ))} )} ); } const STUDIES = [ { id: "structure", label: "Structure study", meta: "Canvas 01", caption: "A modular workspace shell built from clear content zones.", variant: 1 as const, }, { id: "flow", label: "Flow study", meta: "Canvas 02", caption: "A release path that keeps progress and checkpoints in one view.", variant: 2 as const, }, { id: "index", label: "Index study", meta: "Canvas 03", caption: "Three compact file columns for scanning work by stage.", variant: 3 as const, }, ] as const; export function ImageGalleryDemo({ theme = "light", }: { theme?: "light" | "dark"; }) { const [currentItemId, setCurrentItemId] = useState("structure"); const [open, setOpen] = useState(false); const [status, setStatus] = useState("Structure study is selected."); const items = useMemo( () => STUDIES.map((study) => ({ ...study, media: ( ), })), [], ); return (
{ setCurrentItemId(id); const item = STUDIES.find((study) => study.id === id); setStatus(`${item?.label ?? "Image"} is selected.`); }} open={open} onOpenChange={(nextOpen) => { setOpen(nextOpen); setStatus( nextOpen ? "Expanded preview opened." : "Expanded preview closed.", ); }} />

{status} Sample artwork. Changes stay in this preview.

); } export default function AgentExample() { return (
); }