Skip to content

Interface: WidgetDefinition

Makaio Framework


Makaio Framework / contracts/extension / WidgetDefinition

Defined in: ../../../packages/contracts/src/extension/contributions/widget-types.ts:20

Serializable widget definition.

Platform-agnostic description of what data a widget needs and how it behaves. This definition can be serialized and stored in user preferences.

optional dataSource?: string

Defined in: ../../../packages/contracts/src/extension/contributions/widget-types.ts:27

Bus subject for the widget’s data source.

Optional — widgets can render without dynamic data (e.g. static controls). When provided, the widget requests data from this subject.


defaultSize: WidgetSize

Defined in: ../../../packages/contracts/src/extension/contributions/widget-types.ts:46

Default size when the widget is first added to a layout.

Must be one of the values in sizes.


optional refreshOn?: string[]

Defined in: ../../../packages/contracts/src/extension/contributions/widget-types.ts:34

Events that trigger a widget refresh.

List of bus event subjects that cause the widget to refresh its data.

`['session.updated', 'extension.stateChanged']`

sizes: WidgetSize[]

Defined in: ../../../packages/contracts/src/extension/contributions/widget-types.ts:40

Supported size variants for this widget.

Must include at least one size and must include defaultSize.