Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 2x 2x 2x 2x 2x 3x 2x 1x | // src/index.ts
import type { OctopusHost } from '@ska-octopus-widget-sdk/widget-sdk';
import { makeWidgetDef } from '@ska-octopus-widget-sdk/widget-sdk';
import SpaceWeatherWidget from './SpaceWeatherWidget';
import pkg from '../package.json';
const { version } = pkg;
const schema = {
type: 'object',
properties: {}
} as const;
const widgetDef = makeWidgetDef({
key: 'spaceWeather',
component: SpaceWeatherWidget,
label: 'SpaceWeather',
layout: { x: 0, y: 0, w: 33, h: 50 },
config: { schema },
version,
docsUrl: 'https://developer.skao.int/projects/ska-octopus-space-weather-widget/en/latest/'
});
function register(host: OctopusHost) {
// Stateless: no reducer registration
host.registerWidget(widgetDef as any);
}
(function wait(h: any) {
if (typeof h.registerWidget === 'function') {
register(h as OctopusHost);
} else {
setTimeout(wait, 50, h);
}
})((globalThis as any).Octopus || ((globalThis as any).Octopus = {}));
export { SpaceWeatherWidget };
|