@devicechain/widgets 0.21.1 → 0.22.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +28 -7
  2. package/dist/aggregate-feed.d.ts +14 -0
  3. package/dist/aggregate-fold.d.ts +11 -0
  4. package/dist/aggregate-reading.d.ts +19 -0
  5. package/dist/aggregate-strings.d.ts +16 -0
  6. package/dist/binding-policy.d.ts +3 -1
  7. package/dist/builtin-descriptors.d.ts +1210 -8
  8. package/dist/builtin-registry.d.ts +1197 -8
  9. package/dist/category-geometry.d.ts +19 -0
  10. package/dist/category-items.d.ts +10 -0
  11. package/dist/chunks/aggregate-feed-6ZYKOQOB.js +130 -0
  12. package/dist/chunks/aggregate-feed-6ZYKOQOB.js.map +7 -0
  13. package/dist/chunks/aggregate-widgets-WVXAW3UL.js +895 -0
  14. package/dist/chunks/aggregate-widgets-WVXAW3UL.js.map +7 -0
  15. package/dist/chunks/chunk-2D7JNKFE.js +65 -0
  16. package/dist/chunks/chunk-2D7JNKFE.js.map +7 -0
  17. package/dist/chunks/chunk-S2OMBJLI.js +200 -0
  18. package/dist/chunks/chunk-S2OMBJLI.js.map +7 -0
  19. package/dist/chunks/chunk-XQQQNTBX.js +76 -0
  20. package/dist/chunks/chunk-XQQQNTBX.js.map +7 -0
  21. package/dist/chunks/chunk-YPFB6DAL.js +157 -0
  22. package/dist/chunks/chunk-YPFB6DAL.js.map +7 -0
  23. package/dist/chunks/chunk-ZR74ORIT.js +35 -0
  24. package/dist/chunks/chunk-ZR74ORIT.js.map +7 -0
  25. package/dist/chunks/control-widgets-UDS4ET3T.js +775 -0
  26. package/dist/chunks/control-widgets-UDS4ET3T.js.map +7 -0
  27. package/dist/chunks/fleet-feed-FK4ZMKIK.js +252 -0
  28. package/dist/chunks/fleet-feed-FK4ZMKIK.js.map +7 -0
  29. package/dist/chunks/level-widgets-MJB7TOLU.js +833 -0
  30. package/dist/chunks/level-widgets-MJB7TOLU.js.map +7 -0
  31. package/dist/command-control-core.d.ts +68 -0
  32. package/dist/command-control-strings.d.ts +32 -0
  33. package/dist/command-control.d.ts +31 -0
  34. package/dist/dashboard-renderer.d.ts +15 -4
  35. package/dist/fleet-feed.d.ts +21 -0
  36. package/dist/fleet-model.d.ts +43 -0
  37. package/dist/fleet-seed.d.ts +7 -0
  38. package/dist/fleet-strings.d.ts +25 -0
  39. package/dist/heading.d.ts +3 -0
  40. package/dist/index.d.ts +3 -2
  41. package/dist/index.js +1774 -676
  42. package/dist/index.js.map +4 -4
  43. package/dist/level-reading.d.ts +29 -0
  44. package/dist/level-readout.d.ts +25 -0
  45. package/dist/level-strings.d.ts +13 -0
  46. package/dist/options.d.ts +1 -1
  47. package/dist/time-range-bar.d.ts +28 -0
  48. package/dist/use-held.d.ts +1 -0
  49. package/dist/value-scale.d.ts +30 -0
  50. package/dist/widgets/aggregate-lazy.d.ts +305 -0
  51. package/dist/widgets/aggregate-widgets.d.ts +4 -0
  52. package/dist/widgets/alarm-count.d.ts +1 -0
  53. package/dist/widgets/alarm-table.d.ts +4 -1
  54. package/dist/widgets/bar-chart.d.ts +5 -0
  55. package/dist/widgets/battery.d.ts +7 -0
  56. package/dist/widgets/command-slider.d.ts +2 -0
  57. package/dist/widgets/command-toggle.d.ts +4 -0
  58. package/dist/widgets/compass.d.ts +2 -0
  59. package/dist/widgets/control-lazy.d.ts +92 -0
  60. package/dist/widgets/control-widgets.d.ts +2 -0
  61. package/dist/widgets/fleet-table.d.ts +13 -0
  62. package/dist/widgets/gauge.d.ts +52 -0
  63. package/dist/widgets/label.d.ts +1 -1
  64. package/dist/widgets/latest-card.d.ts +44 -1
  65. package/dist/widgets/lazy-chunk.d.ts +8 -0
  66. package/dist/widgets/level-gauge.d.ts +2 -0
  67. package/dist/widgets/level-lazy.d.ts +647 -0
  68. package/dist/widgets/level-widgets.d.ts +7 -0
  69. package/dist/widgets/linear-gauge.d.ts +2 -0
  70. package/dist/widgets/pie-chart.d.ts +2 -0
  71. package/dist/widgets/progress-ring.d.ts +3 -0
  72. package/dist/widgets/severity.d.ts +2 -1
  73. package/dist/widgets/signal-bars.d.ts +3 -0
  74. package/dist/widgets/stat-card.d.ts +3 -0
  75. package/dist/widgets/status-light.d.ts +7 -0
  76. package/dist/widgets/table.d.ts +9 -1
  77. package/dist/widgets/time-series-chart.d.ts +62 -4
  78. package/package.json +8 -8
@@ -0,0 +1,29 @@
1
+ import { type MeasurementStreamState, type SeverityLevel, type Threshold } from '@devicechain/widget-sdk';
2
+ import type { MeasurementSample, WidgetInstance } from '@devicechain/dashboards';
3
+ import { type LevelStrings } from './level-strings';
4
+ import { type Fill, type RangeResult } from './value-scale';
5
+ export interface LevelReading {
6
+ name: string | undefined;
7
+ sample: MeasurementSample | undefined;
8
+ value: number | undefined;
9
+ unit: string | undefined;
10
+ precision: number | undefined;
11
+ display: string;
12
+ thresholds: Threshold[];
13
+ band: Threshold | undefined;
14
+ levelColor: string | undefined;
15
+ colorOf: (level: SeverityLevel | undefined) => string | undefined;
16
+ fillColor: string;
17
+ range: RangeResult | undefined;
18
+ fill: Fill | undefined;
19
+ strings: LevelStrings;
20
+ }
21
+ export interface LevelInput {
22
+ thresholds: Threshold[];
23
+ unit: string | undefined;
24
+ precision: number | undefined;
25
+ range?: RangeResult;
26
+ normalize?: (raw: number | undefined) => number | undefined;
27
+ }
28
+ export declare function useLevelReading(widget: WidgetInstance, data: MeasurementStreamState, input: LevelInput): LevelReading;
29
+ export declare function emptyReason(r: LevelReading): string | undefined;
@@ -0,0 +1,25 @@
1
+ import type { LevelStrings } from './level-strings';
2
+ import type { ScalePosition } from './value-scale';
3
+ export interface ReadoutRoom {
4
+ size: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ scale: number;
9
+ }
10
+ export type MarkerStrings = Pick<LevelStrings, 'aboveScale' | 'belowScale'>;
11
+ export type LevelReadoutProps = ReadoutRoom & {
12
+ text: string;
13
+ unit?: string;
14
+ color?: string;
15
+ } & ({
16
+ position?: ScalePosition;
17
+ strings: MarkerStrings;
18
+ } | {
19
+ position?: undefined;
20
+ strings?: undefined;
21
+ });
22
+ export declare function LevelReadout({ text, unit, color, position, size, scale, strings }: LevelReadoutProps): import("react").JSX.Element;
23
+ export declare function LevelEmpty({ message }: {
24
+ message: string;
25
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ export interface LevelStrings {
2
+ noData: string;
3
+ setRange: string;
4
+ badRange: string;
5
+ setThresholds: string;
6
+ aboveScale: string;
7
+ belowScale: string;
8
+ on: string;
9
+ off: string;
10
+ cardinals: readonly [string, string, string, string];
11
+ }
12
+ export declare const LEVEL_STRINGS: Record<'en' | 'es', LevelStrings>;
13
+ export declare function levelStrings(locale?: string | undefined): LevelStrings;
package/dist/options.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { clampNumberOption, type NumberOptionSpec, type OptionIssueCode, type BuiltinWidgetId, type OptionsOf, type WidgetType } from '@devicechain/dashboards';
2
2
  import { builtinWidgetDescriptors } from './builtin-descriptors';
3
- export type { BooleanOptionSpec, EnumOptionSpec, NumberOptionSpec, OptionIssueCode, OptionSpec, StringOptionSpec, WidgetOptionSpecs, } from '@devicechain/dashboards';
3
+ export type { BooleanOptionSpec, EnumOptionSpec, ListItemFieldSpec, ListOptionSpec, NumberOptionSpec, OptionIssueCode, OptionSpec, StringOptionSpec, WidgetOptionSpecs, } from '@devicechain/dashboards';
4
4
  export { clampNumberOption };
5
5
  type OptionsById = {
6
6
  readonly [K in BuiltinWidgetId]: (typeof builtinWidgetDescriptors)[K]['options'];
@@ -0,0 +1,28 @@
1
+ import { type TimeRangeState } from '@devicechain/dashboards';
2
+ export interface TimeRangeControls {
3
+ setSpan(spanSeconds: number): void;
4
+ pause(): void;
5
+ resume(): void;
6
+ }
7
+ export declare function useBoardTimeRange(defaultSeconds: number | undefined, link?: {
8
+ spanSeconds?: number;
9
+ paused?: boolean;
10
+ }): [TimeRangeState, TimeRangeControls];
11
+ export interface TimeRangeLabels {
12
+ range: string;
13
+ pause: string;
14
+ resume: string;
15
+ paused: string;
16
+ pausedAt: (time: string) => string;
17
+ actionsLive: string;
18
+ }
19
+ export declare const DEFAULT_TIME_RANGE_LABELS: TimeRangeLabels;
20
+ export declare function PausedIndicator({ pausedAt, labels, }: {
21
+ pausedAt: number | undefined;
22
+ labels?: TimeRangeLabels;
23
+ }): import("react").JSX.Element;
24
+ export declare function TimeRangeBar({ state, controls, labels, }: {
25
+ state: TimeRangeState;
26
+ controls: TimeRangeControls;
27
+ labels?: TimeRangeLabels;
28
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function useHeld<T>(value: T, hold: boolean, ready: (v: T) => boolean): T;
@@ -0,0 +1,30 @@
1
+ import { type SeverityLevel, type Threshold } from '@devicechain/widget-sdk';
2
+ export interface ScaleRange {
3
+ min: number;
4
+ max: number;
5
+ }
6
+ export type RangeResult = {
7
+ ok: true;
8
+ range: ScaleRange;
9
+ } | {
10
+ ok: false;
11
+ reason: 'missing' | 'invalid';
12
+ };
13
+ export declare function readRange(configuredMin: number | undefined, configuredMax: number | undefined, fallback?: ScaleRange): RangeResult;
14
+ export type ScalePosition = 'below' | 'within' | 'above';
15
+ export interface Fill {
16
+ fraction: number;
17
+ position: ScalePosition;
18
+ ratio: number;
19
+ }
20
+ export declare function fillOf(value: number | null | undefined, range: ScaleRange): Fill | undefined;
21
+ export interface BandSpan {
22
+ from: number;
23
+ to: number;
24
+ level: SeverityLevel | undefined;
25
+ }
26
+ export declare function bandSpans(thresholds: readonly Threshold[], range: ScaleRange): BandSpan[];
27
+ export declare function litBars(thresholds: readonly Threshold[], value: number | null | undefined): {
28
+ total: number;
29
+ lit: number;
30
+ } | undefined;
@@ -0,0 +1,305 @@
1
+ export declare const loadAggregateWidgets: () => Promise<typeof import("./aggregate-widgets")>;
2
+ export declare const statCardWidget: import("@devicechain/widget-sdk").WidgetDefinition<"aggregate", {
3
+ readonly title: {
4
+ readonly kind: 'string';
5
+ readonly labelId: 'widgetLabelTitle';
6
+ readonly doc: 'Heading shown in the widget frame. Defaults to the displayed measurement name.';
7
+ };
8
+ readonly measurement: {
9
+ readonly kind: 'string';
10
+ readonly labelId: 'widgetLabelMeasurement';
11
+ readonly helpId: 'widgetHintMeasurement';
12
+ readonly doc: 'Which measurement to display. Defaults to the first the datasource selects.';
13
+ };
14
+ readonly stat: {
15
+ readonly kind: "enum";
16
+ readonly values: readonly ["avg", "min", "max", "sum", "count", "last"];
17
+ readonly labelId: "widgetLabelStat";
18
+ readonly helpId: "widgetHintStat";
19
+ readonly valueLabelIds: {
20
+ readonly avg: "widgetStatAvg";
21
+ readonly min: "widgetStatMin";
22
+ readonly max: "widgetStatMax";
23
+ readonly sum: "widgetStatSum";
24
+ readonly count: "widgetStatCount";
25
+ readonly last: "widgetStatLast";
26
+ };
27
+ readonly placeholderId: "widgetPlaceholderDefault";
28
+ readonly doc: "Which figure to show. Default average.";
29
+ };
30
+ readonly unit: {
31
+ readonly kind: 'string';
32
+ readonly labelId: 'widgetLabelUnit';
33
+ readonly doc: 'Unit suffix shown beside the value.';
34
+ };
35
+ readonly precision: {
36
+ readonly kind: 'number';
37
+ readonly integer: true;
38
+ readonly min: 0;
39
+ readonly max: 100;
40
+ readonly labelId: 'widgetLabelPrecision';
41
+ readonly helpId: 'widgetHintPrecision';
42
+ readonly doc: 'Decimal places to round displayed values to. Unset rounds to at most 3 decimals (4 significant digits under 1).';
43
+ };
44
+ readonly thresholds: {
45
+ readonly kind: 'list';
46
+ readonly maxItems: 12;
47
+ readonly labelId: 'widgetLabelThresholds';
48
+ readonly helpId: 'widgetHintThresholds';
49
+ readonly doc: 'Severity bands over the value. Each entry starts a band at its value that runs to the next entry; below the first, and in a normal band, the widget keeps its own colour.';
50
+ readonly item: {
51
+ readonly value: {
52
+ readonly kind: 'number';
53
+ readonly required: true;
54
+ readonly labelId: 'widgetLabelThresholdValue';
55
+ readonly doc: 'The value at which this band starts.';
56
+ };
57
+ readonly level: {
58
+ readonly kind: 'enum';
59
+ readonly required: true;
60
+ readonly values: readonly ["normal", "warning", "minor", "major", "critical"];
61
+ readonly labelId: 'widgetLabelThresholdLevel';
62
+ readonly valueLabelIds: {
63
+ readonly normal: 'widgetSeverityNormal';
64
+ readonly warning: 'widgetSeverityWarning';
65
+ readonly minor: 'widgetSeverityMinor';
66
+ readonly major: 'widgetSeverityMajor';
67
+ readonly critical: 'widgetSeverityCritical';
68
+ };
69
+ readonly placeholderId: 'widgetPlaceholderThresholdLevel';
70
+ readonly doc: 'The severity of this band. The theme decides the colour; normal has none.';
71
+ };
72
+ readonly label: {
73
+ readonly kind: 'string';
74
+ readonly labelId: 'widgetLabelThresholdLabel';
75
+ readonly doc: 'Text shown on the chart line for this threshold. Defaults to its value.';
76
+ };
77
+ };
78
+ };
79
+ readonly windowSeconds: {
80
+ readonly kind: 'number';
81
+ readonly integer: true;
82
+ readonly min: 60;
83
+ readonly max: 604800;
84
+ readonly labelId: 'widgetLabelWindowSeconds';
85
+ readonly helpId: 'widgetHintWindowSeconds';
86
+ readonly doc: 'Seconds of history the widget covers, back from now. Leave unset to follow the board’s time range; set it to pin this widget to a fixed span that the viewer’s range picker does not change. 60 to 604800.';
87
+ };
88
+ }>;
89
+ export declare const barChartWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", {
90
+ readonly title: {
91
+ readonly kind: 'string';
92
+ readonly labelId: 'widgetLabelTitle';
93
+ readonly doc: 'Heading shown in the widget frame. Blank hides the frame heading.';
94
+ };
95
+ readonly groupBy: {
96
+ readonly kind: "enum";
97
+ readonly values: readonly ["measurement", "device"];
98
+ readonly labelId: "widgetLabelGroupBy";
99
+ readonly helpId: "widgetHintGroupBy";
100
+ readonly valueLabelIds: {
101
+ readonly measurement: "widgetGroupByMeasurement";
102
+ readonly device: "widgetGroupByDevice";
103
+ };
104
+ readonly placeholderId: "widgetPlaceholderDefault";
105
+ readonly doc: "One bar per measurement (the default), or per device of the group for the measurement set below.";
106
+ };
107
+ readonly measurement: {
108
+ readonly kind: 'string';
109
+ readonly labelId: 'widgetLabelMeasurement';
110
+ readonly helpId: 'widgetHintMeasurement';
111
+ readonly doc: 'Which measurement to display. Defaults to the first the datasource selects.';
112
+ };
113
+ readonly unit: {
114
+ readonly kind: 'string';
115
+ readonly labelId: 'widgetLabelUnit';
116
+ readonly doc: 'Unit suffix shown beside the value.';
117
+ };
118
+ readonly precision: {
119
+ readonly kind: 'number';
120
+ readonly integer: true;
121
+ readonly min: 0;
122
+ readonly max: 100;
123
+ readonly labelId: 'widgetLabelPrecision';
124
+ readonly helpId: 'widgetHintPrecision';
125
+ readonly doc: 'Decimal places to round displayed values to. Unset rounds to at most 3 decimals (4 significant digits under 1).';
126
+ };
127
+ readonly sort: {
128
+ readonly kind: 'enum';
129
+ readonly values: readonly ["none", "ascending", "descending"];
130
+ readonly labelId: 'widgetLabelSort';
131
+ readonly valueLabelIds: {
132
+ readonly none: 'widgetSortNone';
133
+ readonly ascending: 'widgetSortAscending';
134
+ readonly descending: 'widgetSortDescending';
135
+ };
136
+ readonly placeholderId: 'widgetPlaceholderDefault';
137
+ readonly doc: 'Order of the categories. Default: as the data source lists them.';
138
+ };
139
+ }>;
140
+ export declare const pieChartWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", {
141
+ readonly title: {
142
+ readonly kind: 'string';
143
+ readonly labelId: 'widgetLabelTitle';
144
+ readonly doc: 'Heading shown in the widget frame. Blank hides the frame heading.';
145
+ };
146
+ readonly unit: {
147
+ readonly kind: 'string';
148
+ readonly labelId: 'widgetLabelUnit';
149
+ readonly doc: 'Unit suffix shown beside the value.';
150
+ };
151
+ readonly precision: {
152
+ readonly kind: 'number';
153
+ readonly integer: true;
154
+ readonly min: 0;
155
+ readonly max: 100;
156
+ readonly labelId: 'widgetLabelPrecision';
157
+ readonly helpId: 'widgetHintPrecision';
158
+ readonly doc: 'Decimal places to round displayed values to. Unset rounds to at most 3 decimals (4 significant digits under 1).';
159
+ };
160
+ readonly sort: {
161
+ readonly kind: 'enum';
162
+ readonly values: readonly ["none", "ascending", "descending"];
163
+ readonly labelId: 'widgetLabelSort';
164
+ readonly valueLabelIds: {
165
+ readonly none: 'widgetSortNone';
166
+ readonly ascending: 'widgetSortAscending';
167
+ readonly descending: 'widgetSortDescending';
168
+ };
169
+ readonly placeholderId: 'widgetPlaceholderDefault';
170
+ readonly doc: 'Order of the categories. Default: as the data source lists them.';
171
+ };
172
+ }>;
173
+ export declare const fleetTableWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", {
174
+ readonly title: {
175
+ readonly kind: 'string';
176
+ readonly labelId: 'widgetLabelTitle';
177
+ readonly doc: 'Heading shown in the widget frame. Blank hides the frame heading.';
178
+ };
179
+ readonly columns: {
180
+ readonly kind: 'list';
181
+ readonly maxItems: 24;
182
+ readonly labelId: 'widgetLabelColumns';
183
+ readonly helpId: 'widgetHintColumns';
184
+ readonly doc: 'Heading, unit and precision per measurement column; a column with none shows its name.';
185
+ readonly item: {
186
+ readonly measurement: {
187
+ readonly kind: 'string';
188
+ readonly required: true;
189
+ readonly labelId: 'widgetLabelMeasurement';
190
+ readonly doc: 'The measurement column this entry applies to.';
191
+ };
192
+ readonly label: {
193
+ readonly kind: 'string';
194
+ readonly labelId: 'widgetLabelColumnHeading';
195
+ readonly doc: 'Column heading. Defaults to the measurement name.';
196
+ };
197
+ readonly unit: {
198
+ readonly kind: 'string';
199
+ readonly labelId: 'widgetLabelUnit';
200
+ readonly doc: 'Unit suffix shown beside the value.';
201
+ };
202
+ readonly precision: {
203
+ readonly kind: 'number';
204
+ readonly integer: true;
205
+ readonly min: 0;
206
+ readonly max: 100;
207
+ readonly labelId: 'widgetLabelPrecision';
208
+ readonly helpId: 'widgetHintPrecision';
209
+ readonly doc: 'Decimal places to round displayed values to. Unset rounds to at most 3 decimals (4 significant digits under 1).';
210
+ };
211
+ };
212
+ };
213
+ readonly thresholds: {
214
+ readonly kind: 'list';
215
+ readonly maxItems: 12;
216
+ readonly labelId: 'widgetLabelThresholds';
217
+ readonly helpId: 'widgetHintThresholds';
218
+ readonly doc: 'Severity bands over the value. Each entry starts a band at its value that runs to the next entry; below the first, and in a normal band, the widget keeps its own colour.';
219
+ readonly item: {
220
+ readonly value: {
221
+ readonly kind: 'number';
222
+ readonly required: true;
223
+ readonly labelId: 'widgetLabelThresholdValue';
224
+ readonly doc: 'The value at which this band starts.';
225
+ };
226
+ readonly level: {
227
+ readonly kind: 'enum';
228
+ readonly required: true;
229
+ readonly values: readonly ["normal", "warning", "minor", "major", "critical"];
230
+ readonly labelId: 'widgetLabelThresholdLevel';
231
+ readonly valueLabelIds: {
232
+ readonly normal: 'widgetSeverityNormal';
233
+ readonly warning: 'widgetSeverityWarning';
234
+ readonly minor: 'widgetSeverityMinor';
235
+ readonly major: 'widgetSeverityMajor';
236
+ readonly critical: 'widgetSeverityCritical';
237
+ };
238
+ readonly placeholderId: 'widgetPlaceholderThresholdLevel';
239
+ readonly doc: 'The severity of this band. The theme decides the colour; normal has none.';
240
+ };
241
+ readonly label: {
242
+ readonly kind: 'string';
243
+ readonly labelId: 'widgetLabelThresholdLabel';
244
+ readonly doc: 'Text shown on the chart line for this threshold. Defaults to its value.';
245
+ };
246
+ readonly measurement: {
247
+ readonly kind: 'string';
248
+ readonly required: true;
249
+ readonly labelId: 'widgetLabelMeasurement';
250
+ readonly doc: 'The measurement column this entry applies to.';
251
+ };
252
+ };
253
+ };
254
+ readonly staleAfterSeconds: {
255
+ readonly kind: 'number';
256
+ readonly integer: true;
257
+ readonly min: 1;
258
+ readonly labelId: 'widgetLabelStaleAfter';
259
+ readonly helpId: 'widgetHintStaleAfter';
260
+ readonly doc: 'Seconds after which the newest sample is called stale: the value is greyed out and badged. Unset shows the sample age only and never marks the widget stale.';
261
+ };
262
+ readonly ageLagSeconds: {
263
+ readonly kind: "number";
264
+ readonly integer: true;
265
+ readonly min: 1;
266
+ readonly labelId: "widgetLabelAgeLag";
267
+ readonly helpId: "widgetHintAgeLag";
268
+ readonly doc: "Show a reading's age under it only when the reading is at least this many seconds older than the newest reading in the table (or stale). Unset shows every reading's age.";
269
+ };
270
+ readonly sortBy: {
271
+ readonly kind: "string";
272
+ readonly labelId: "widgetLabelSortBy";
273
+ readonly helpId: "widgetHintSortBy";
274
+ readonly doc: "The measurement the table is ordered by. Blank orders by device name.";
275
+ };
276
+ readonly sortDescending: {
277
+ readonly kind: "boolean";
278
+ readonly labelId: "widgetLabelSortDescending";
279
+ readonly doc: "Largest first.";
280
+ };
281
+ readonly pageSize: {
282
+ readonly kind: "number";
283
+ readonly integer: true;
284
+ readonly min: 5;
285
+ readonly max: 100;
286
+ readonly labelId: "widgetLabelPageSize";
287
+ readonly doc: "Devices per page. Default 20.";
288
+ };
289
+ readonly selectionTarget: {
290
+ readonly kind: 'string';
291
+ readonly labelId: 'widgetLabelTargetSlot';
292
+ readonly helpId: 'widgetTargetSlotHint';
293
+ readonly control: 'slot-target';
294
+ readonly doc: 'Name of the slot this widget re-points when the viewer picks an entity.';
295
+ };
296
+ readonly windowSeconds: {
297
+ readonly kind: 'number';
298
+ readonly integer: true;
299
+ readonly min: 60;
300
+ readonly max: 604800;
301
+ readonly labelId: 'widgetLabelWindowSeconds';
302
+ readonly helpId: 'widgetHintWindowSeconds';
303
+ readonly doc: 'Seconds of history the widget covers, back from now. Leave unset to follow the board’s time range; set it to pin this widget to a fixed span that the viewer’s range picker does not change. 60 to 604800.';
304
+ };
305
+ }>;
@@ -0,0 +1,4 @@
1
+ export { BarChart } from './bar-chart';
2
+ export { FleetTable } from './fleet-table';
3
+ export { PieChart } from './pie-chart';
4
+ export { StatCard } from './stat-card';
@@ -1,4 +1,5 @@
1
1
  import { type AlarmStreamState, type WidgetProps } from '@devicechain/widget-sdk';
2
+ export declare const ALARM_COUNT_CAPTION_ROOM_PX = 20;
2
3
  export declare function AlarmCount({ widget, data }: WidgetProps<AlarmStreamState>): import("react").JSX.Element;
3
4
  export declare const alarmCountWidget: import("@devicechain/widget-sdk").WidgetDefinition<"alarm", {
4
5
  readonly title: {
@@ -1,4 +1,7 @@
1
+ import { type ReactNode } from 'react';
1
2
  import { type AlarmStreamState, type WidgetProps } from '@devicechain/widget-sdk';
3
+ export declare const ALARM_TABLE_NARROW_PX = 480;
4
+ export declare function hyphenBreaks(text: string): ReactNode;
2
5
  export declare function AlarmTable({ widget, data, actions }: WidgetProps<AlarmStreamState>): import("react").JSX.Element;
3
6
  export declare const alarmTableWidget: import("@devicechain/widget-sdk").WidgetDefinition<"alarm", {
4
7
  readonly title: {
@@ -60,7 +63,7 @@ export declare const alarmTableWidget: import("@devicechain/widget-sdk").WidgetD
60
63
  readonly max: 100;
61
64
  readonly labelId: 'widgetLabelPrecision';
62
65
  readonly helpId: 'widgetHintPrecision';
63
- readonly doc: 'Decimal places to round displayed values to. Unset shows the raw value.';
66
+ readonly doc: 'Decimal places to round displayed values to. Unset rounds to at most 3 decimals (4 significant digits under 1).';
64
67
  };
65
68
  readonly flashOnChange: {
66
69
  readonly kind: 'boolean';
@@ -0,0 +1,5 @@
1
+ import { type WidgetProps } from '@devicechain/widget-sdk';
2
+ export declare const MAX_LABELLED_BARS = 12;
3
+ export declare const MAX_DEVICE_BARS = 100;
4
+ export declare function BarChart({ widget, data }: WidgetProps): import("react").JSX.Element;
5
+ export declare function fitLabel(label: string, chars: number): string;
@@ -0,0 +1,7 @@
1
+ import { type WidgetProps } from '@devicechain/widget-sdk';
2
+ export declare const BATTERY_DEFAULT_RANGE: {
3
+ readonly min: 0;
4
+ readonly max: 100;
5
+ };
6
+ export declare const BATTERY_FILL_WIDTH: number;
7
+ export declare function Battery({ widget, data }: WidgetProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { type CommandStreamState, type WidgetProps } from '@devicechain/widget-sdk';
2
+ export declare function CommandSlider({ widget, data, actions }: WidgetProps<CommandStreamState>): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type CommandStreamState, type WidgetProps } from '@devicechain/widget-sdk';
2
+ import { type LastSent } from '../command-control-core';
3
+ export declare function CommandToggle({ widget, data, actions }: WidgetProps<CommandStreamState>): import("react").JSX.Element;
4
+ export declare function intentOf(last: LastSent | null): boolean | undefined;
@@ -0,0 +1,2 @@
1
+ import { type WidgetProps } from '@devicechain/widget-sdk';
2
+ export declare function Compass({ widget, data }: WidgetProps): import("react").JSX.Element;
@@ -0,0 +1,92 @@
1
+ export declare const loadControlWidgets: () => Promise<typeof import("./control-widgets")>;
2
+ export declare const commandSliderWidget: import("@devicechain/widget-sdk").WidgetDefinition<"control", {
3
+ readonly title: {
4
+ readonly kind: 'string';
5
+ readonly labelId: 'widgetLabelTitle';
6
+ readonly doc: 'Heading shown in the widget frame. Blank hides the frame heading.';
7
+ };
8
+ readonly commandName: {
9
+ readonly kind: 'string';
10
+ readonly required: true;
11
+ readonly labelId: 'widgetCommandHeading';
12
+ readonly helpId: 'widgetCommandFieldHint';
13
+ readonly control: 'command-vocabulary';
14
+ readonly doc: 'Command key issued to the target device. Without it the control cannot send.';
15
+ };
16
+ readonly commandLabel: {
17
+ readonly kind: 'string';
18
+ readonly labelId: 'widgetCommandHeading';
19
+ readonly helpId: 'widgetCommandFieldHint';
20
+ readonly control: 'command-vocabulary';
21
+ readonly doc: 'Name of the control for assistive technology. Defaults to the command key.';
22
+ };
23
+ readonly parameterSchema: {
24
+ readonly kind: 'string';
25
+ readonly format: 'json';
26
+ readonly labelId: 'widgetCommandHeading';
27
+ readonly helpId: 'widgetCommandFieldHint';
28
+ readonly control: 'command-vocabulary';
29
+ readonly doc: "The command's parameter descriptors, baked in as JSON at author time. Gives the control its range and its refusals.";
30
+ };
31
+ readonly parameter: {
32
+ readonly kind: 'string';
33
+ readonly labelId: 'widgetLabelParameter';
34
+ readonly helpId: 'widgetHintControlParameter';
35
+ readonly doc: 'Which parameter of the command this control sets. May be left blank when the command has exactly one parameter of the right type.';
36
+ };
37
+ readonly min: {
38
+ readonly kind: "number";
39
+ readonly labelId: "widgetLabelMin";
40
+ readonly helpId: "widgetHintSliderRange";
41
+ readonly doc: "Lowest value, used only when the command's parameter declares no minimum.";
42
+ };
43
+ readonly max: {
44
+ readonly kind: "number";
45
+ readonly labelId: "widgetLabelMax";
46
+ readonly helpId: "widgetHintSliderRange";
47
+ readonly doc: "Highest value, used only when the command's parameter declares no maximum.";
48
+ };
49
+ readonly step: {
50
+ readonly kind: "number";
51
+ readonly min: 0;
52
+ readonly labelId: "widgetLabelStep";
53
+ readonly helpId: "widgetHintSliderStep";
54
+ readonly doc: "Distance between values. Defaults to 1 for a whole-number parameter, else a hundredth of the range.";
55
+ };
56
+ }>;
57
+ export declare const commandToggleWidget: import("@devicechain/widget-sdk").WidgetDefinition<"control", {
58
+ readonly title: {
59
+ readonly kind: 'string';
60
+ readonly labelId: 'widgetLabelTitle';
61
+ readonly doc: 'Heading shown in the widget frame. Blank hides the frame heading.';
62
+ };
63
+ readonly commandName: {
64
+ readonly kind: 'string';
65
+ readonly required: true;
66
+ readonly labelId: 'widgetCommandHeading';
67
+ readonly helpId: 'widgetCommandFieldHint';
68
+ readonly control: 'command-vocabulary';
69
+ readonly doc: 'Command key issued to the target device. Without it the control cannot send.';
70
+ };
71
+ readonly commandLabel: {
72
+ readonly kind: 'string';
73
+ readonly labelId: 'widgetCommandHeading';
74
+ readonly helpId: 'widgetCommandFieldHint';
75
+ readonly control: 'command-vocabulary';
76
+ readonly doc: 'Name of the control for assistive technology. Defaults to the command key.';
77
+ };
78
+ readonly parameterSchema: {
79
+ readonly kind: 'string';
80
+ readonly format: 'json';
81
+ readonly labelId: 'widgetCommandHeading';
82
+ readonly helpId: 'widgetCommandFieldHint';
83
+ readonly control: 'command-vocabulary';
84
+ readonly doc: "The command's parameter descriptors, baked in as JSON at author time. Gives the control its range and its refusals.";
85
+ };
86
+ readonly parameter: {
87
+ readonly kind: 'string';
88
+ readonly labelId: 'widgetLabelParameter';
89
+ readonly helpId: 'widgetHintControlParameter';
90
+ readonly doc: 'Which parameter of the command this control sets. May be left blank when the command has exactly one parameter of the right type.';
91
+ };
92
+ }>;
@@ -0,0 +1,2 @@
1
+ export { CommandSlider } from './command-slider';
2
+ export { CommandToggle } from './command-toggle';
@@ -0,0 +1,13 @@
1
+ import type { FleetMember } from '@devicechain/dashboards';
2
+ import { type Threshold, type WidgetProps } from '@devicechain/widget-sdk';
3
+ interface ColumnFormat {
4
+ label?: string;
5
+ unit?: string;
6
+ precision?: number;
7
+ }
8
+ export declare function columnFormats(raw: unknown): Map<string, ColumnFormat>;
9
+ export declare function columnBands(raw: unknown): Map<string, Threshold[]>;
10
+ export declare function FleetTable({ widget, data }: WidgetProps): import("react").JSX.Element;
11
+ export declare const STACK_BELOW_PX = 480;
12
+ export declare function newestShown(members: readonly FleetMember[], columns: readonly string[]): number | undefined;
13
+ export {};