SDK Surface Map
This page answers: “What can I use from the SDK?”
For full signatures and one-line descriptions of every export, see WIDGET_SDK.md.
Main Export Groups
Group |
Use It For |
Key Exports |
|---|---|---|
Widget definition |
Registering widgets and deriving config fields |
|
Data hooks |
GraphQL stream, polling, and mutation workflows |
|
Host state hooks |
Reading shared dashboard state |
|
Config helpers |
Schema shortcuts and input formatting |
|
Table toolkit |
Shared table rendering and table state |
|
UI components |
Standardized status and empty/error UI |
|
Plotly utilities |
Responsive Plotly charts with consistent theming |
|
Utilities |
Expression parsing, brush parsing, normalization |
|
Dev + testing |
Local host simulation and test mocks |
|
Common Import Patterns
Definition + schema shortcuts
import {
makeWidgetDef,
INPUT_TANGO_ATTRIBUTES,
INPUT_FORMATED_SCHEMA_TYPE,
WORKSPACES,
VARIABLES,
} from "@ska-octopus-widget-sdk/widget-sdk";
Data + global state
import {
useStream,
useWidgetRefreshRate,
useBrush,
useVariables,
useWorkspace,
} from "@ska-octopus-widget-sdk/widget-sdk";
Table-heavy widgets
import {
InteractiveTable,
StateChip,
useInteractiveTableState,
fitColumnWidths,
} from "@ska-octopus-widget-sdk/widget-sdk";
Plotly chart widgets
import {
usePlotlyResize,
useThemeObserver,
canonicalAttr,
buildAxisTitle,
parseMargins,
formatLegendName,
dedupeLegendLabels,
getPlotlyLegendConfig,
applyVerticalColorRanking,
} from "@ska-octopus-widget-sdk/widget-sdk";
Local dev + tests
import { createMockHost, DevProviders } from "@ska-octopus-widget-sdk/widget-sdk";
import { installSdkWidgetTestMocks } from "@ska-octopus-widget-sdk/widget-sdk/testing";