Interface: WidgetDefinition
Makaio Framework / contracts/extension / WidgetDefinition
Interface: WidgetDefinition
Section titled “Interface: 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.
Properties
Section titled “Properties”dataSource?
Section titled “dataSource?”
optionaldataSource?: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
Section titled “defaultSize”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.
refreshOn?
Section titled “refreshOn?”
optionalrefreshOn?: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.
Example
Section titled “Example”`['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.