Add UI button registration API (registerButton, unregisterButton, getButtonsForLocation)

This commit is contained in:
2026-04-22 00:51:57 +10:00
parent 6f506c59a4
commit 6c389381df
20 changed files with 438 additions and 21 deletions

View File

@@ -40,6 +40,13 @@ export function createPluginContext(options, registry) {
unregisterRenderer: (type) => {
registry.unregisterRenderer(type);
},
registerButton: (button) => {
registry.registerButton(pluginId, button);
registry.addLog(pluginId, 'log', [`Registered button: ${button.id} at ${button.location}`]);
},
unregisterButton: (buttonId) => {
registry.unregisterButton(pluginId, buttonId);
},
},
settings: {
define: (schema) => {