| // hello-community — Phase-4 Session-5a fixture for the install-flow tests. | |
| // | |
| // Hand-written single-file ESM bundle (no JSX, no build step). Future | |
| // community modules with React surfaces will go through a build template | |
| // (Phase 5 follow-up); this fixture stays plain JS so the install-flow | |
| // sessions can iterate without a bundler in the loop. | |
| // | |
| // Default export is the register(host) entry point. The host object is | |
| // supplied by the loader at registerModule time; this module does not | |
| // import anything at runtime. | |
| export default function register(host) { | |
| host.ui.registerRibbon({ | |
| id: 'greet', | |
| label: 'Greet', | |
| onClick: (ctx) => { | |
| const { id, version } = ctx.host.meta; | |
| ctx.host.ui.showToast(`Hello from ${id}@${version}!`, 'info'); | |
| }, | |
| }); | |
| host.meta.log.info('hello-community module registered'); | |
| return { host }; | |
| } | |