import PluginIcon from '../shared/PluginIcon' import PluginFrame from './PluginFrame' import type { ActivePlugin } from '../../store/pluginStore' /** * Renders active `widget` plugins as dashboard cards (#plugins, M8). Each is a * sandboxed PluginFrame; the widget talks to TREK only over the bridge. * * The card mirrors the native dashboard tools (glassy `.tool` surface + uppercase * title) so plugins sit alongside them seamlessly, and the body auto-sizes to the * height the widget reports over trek:resize — no fixed height that would clip a * taller widget's controls. */ export default function PluginWidgets({ plugins, tripId = null }: { plugins: ActivePlugin[]; tripId?: string | null }) { if (plugins.length === 0) return null return ( <> {plugins.map((p) => (
{p.name}
{/* min-height is just a pre-resize floor; trek:resize drives the real height. */}
))} ) }