/**
* Fluksio: the surfaces.
*
* The house style. A widget is a `--card` told from the page by a hairline and
* a low shadow rather than by colour, floating chrome is frosted, and the one
* accent is spent on what a person can act on. Nothing here holds state: the
* behaviour is in `ui/core`.
*/
import { Link } from "@tanstack/react-router"
import { Lock } from "lucide-react"
import { motion } from "motion/react"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip"
import { cn } from "@/lib/utils"
import { ICONS, initials } from "../../icons"
import type {
BackdropProps,
FrameProps,
NoticeProps,
RailProps,
} from "../core/contract"
import { railGeometry, TESTID } from "../core/contract"
import { LOOK } from "../core/motion"
/** The page colour is the ground; only an image is drawn over it. */
export function Backdrop({ image }: BackdropProps) {
if (!image) return null
return (
)
}
function Issue({ issue }: { issue: string }) {
return (
{issue}
)
}
export function Frame({
title,
issue,
grip,
scroll,
selected,
onClick,
children,
}: FrameProps) {
return (
// A card is not a control: the click only picks it in edit mode, and every
// interactive element inside keeps its own role and keyboard handling.
// biome-ignore lint/a11y/useKeyWithClickEvents: see above.
// biome-ignore lint/a11y/noStaticElementInteractions: see above.
{title ? (
{title}
{issue ? : null}
) : null}
{children}
{/* No header to sit in, so the fault takes the corner instead — a widget
drawn without its title still says when it is mis-wired. */}
{!title && issue ? (
) : null}
{/* And the editor still needs something to drag it by. */}
{!title && grip ? (
) : null}
)
}
export function Rail({ entries, horizontal }: RailProps) {
return (
)
}
export function Notice({ children }: NoticeProps) {
return (