- Add plugin dashboard view registration and hosting across core, dashboard routes, and plugin SDK exports - Integrate plugin-provided views into app navigation, mobile/header UI, and view state hooks with coverage - Add fusion-plugin-dependency-graph example plugin with persisted storage, dashboard view UI, and manifest wiring - Update plugin authoring and architecture docs for dashboard view extension points - Add a changeset for @runfusion/fusion covering plugin dashboard view support Fusion-Task-Id: FN-3079
21 lines
689 B
TypeScript
21 lines
689 B
TypeScript
import { resolvePluginDashboardView, MissingPluginDashboardView, parsePluginTaskViewId } from "./pluginViewRegistry";
|
|
import type { PluginDashboardHostContext, PluginTaskView } from "./pluginViewRegistry";
|
|
|
|
export function PluginDashboardViewHost({
|
|
taskView,
|
|
context,
|
|
}: {
|
|
taskView: PluginTaskView;
|
|
context: PluginDashboardHostContext;
|
|
}) {
|
|
const parsed = parsePluginTaskViewId(taskView);
|
|
if (!parsed) return null;
|
|
|
|
const ViewComponent = resolvePluginDashboardView(parsed.pluginId, parsed.viewId);
|
|
if (!ViewComponent) {
|
|
return <>{MissingPluginDashboardView({ pluginId: parsed.pluginId, viewId: parsed.viewId })}</>;
|
|
}
|
|
|
|
return <ViewComponent context={context} />;
|
|
}
|