feat: load plugin frontends at runtime and remove plugin ids from the shell

This commit is contained in:
LukeGus committed 2026-09-22 20:15:52 -05:00
1 parent 49f0286a14
commit e88d5a52e3
721 files changed
+54265 -44416

No files matched your search

@@ -0,0 +1,14 @@
{
"id": "hook-fixture",
"name": "Hook fixture",
"version": "1.0.0",
"description": "Built by the CLI in a test to prove a bundle shares the shell's React.",
"author": { "name": "Termix" },
"license": "MIT",
"category": "Productivity",
"engine": { "termix": ">=2.9.0", "api": "1" },
"capabilities": ["ui:surface"],
"contributes": {
"panels": [{ "id": "hook-panel", "titleKey": "title" }]
}
}
@@ -0,0 +1 @@
export function activate(): void {}
@@ -0,0 +1,16 @@
import { useState } from "react";
import { useTranslation, type TermixApp } from "@termix/plugin-sdk/frontend";
function Counter() {
const { t } = useTranslation();
const [count, setCount] = useState(0);
return (
<button type="button" onClick={() => setCount(count + 1)}>
{t("title")}: {count}
</button>
);
}
export function activate(app: TermixApp): void {
app.registerPanel("hook-panel", Counter);
}