feat: plugin discovery, capability/contribution/permission registries, Plugin Manager UI

This commit is contained in:
2026-06-16 12:00:43 +08:00
parent 08f7328d87
commit cf0a962b46
1326 changed files with 385268 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import Node from './shared/Node.js';
import EventHandler from './EventHandler.js';
import Action from './Action.js';
/** @extends Node<'Body'> */
export default class Body extends Node {
/** @type {import('./EventHandler.js').default[]} */
handlers = [];
/** @type {import('./Action.js').default[]} */
actions = [];
/**
* @param {import('../Component.js').default} component
* @param {import('./shared/Node.js').default} parent
* @param {import('./shared/TemplateScope.js').default} scope
* @param {import('../../interfaces.js').Element} info
*/
constructor(component, parent, scope, info) {
super(component, parent, scope, info);
info.attributes.forEach((node) => {
if (node.type === 'EventHandler') {
this.handlers.push(new EventHandler(component, this, scope, node));
} else if (node.type === 'Action') {
this.actions.push(new Action(component, this, scope, node));
} else {
// TODO there shouldn't be anything else here...
}
});
}
}