mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-09 09:54:40 +00:00
Keep plugin execution scoped to its daemon while allowing one local TypeScript entry point to contribute validated RPCs and native client surfaces. Paseo owns host selection, navigation chrome, and per-installation query caches.
12 lines
474 B
TypeScript
12 lines
474 B
TypeScript
import * as LucideIcons from "lucide-react-native";
|
|
import type { LucideIcon } from "lucide-react-native";
|
|
|
|
export function resolvePluginIcon(name: string): LucideIcon {
|
|
const candidate = Reflect.get(LucideIcons, name);
|
|
const isComponent =
|
|
typeof candidate === "function" ||
|
|
(typeof candidate === "object" && candidate !== null && "$$typeof" in candidate);
|
|
if (!isComponent) throw new Error(`Unknown Lucide icon: ${name}`);
|
|
return candidate as LucideIcon;
|
|
}
|