@stina/extension-api 1.17.0 → 1.18.0

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.
@@ -162,14 +162,14 @@ interface ExtensionPanelDefinition {
162
162
  interface HeaderProps extends ExtensionComponentData {
163
163
  component: 'Header';
164
164
  level: number;
165
- title: string;
166
- description?: string | string[];
165
+ title: LocalizedString;
166
+ description?: LocalizedString | LocalizedString[];
167
167
  icon?: HugeIconName;
168
168
  }
169
169
  /** The extension API properties for the Label component. */
170
170
  interface LabelProps extends ExtensionComponentData {
171
171
  component: 'Label';
172
- text: string;
172
+ text: LocalizedString;
173
173
  }
174
174
  /**
175
175
  * The extension API properties for the Clock component.
@@ -186,40 +186,40 @@ interface ClockProps extends ExtensionComponentData {
186
186
  /** The extension API properties for the paragraph component. */
187
187
  interface ParagraphProps extends ExtensionComponentData {
188
188
  component: 'Paragraph';
189
- text: string;
189
+ text: LocalizedString;
190
190
  }
191
191
  /** The extension API properties for the Button component. */
192
192
  interface ButtonProps extends ExtensionComponentData {
193
193
  component: 'Button';
194
- text: string;
194
+ text: LocalizedString;
195
195
  /** Visual style. Defaults to "normal". */
196
196
  type?: 'normal' | 'primary' | 'danger' | 'accent';
197
197
  /** Optional tooltip shown on hover. */
198
- title?: string;
198
+ title?: LocalizedString;
199
199
  disabled?: boolean;
200
200
  onClickAction: ExtensionActionRef;
201
201
  }
202
202
  /** The extension API properties for the TextInput component. */
203
203
  interface TextInputProps extends ExtensionComponentData {
204
204
  component: 'TextInput';
205
- label: string;
206
- placeholder?: string;
205
+ label: LocalizedString;
206
+ placeholder?: LocalizedString;
207
207
  value?: string;
208
208
  onChangeAction?: ExtensionActionRef;
209
209
  }
210
210
  /** The extension API properties for the PasswordInput component. */
211
211
  interface PasswordInputProps extends ExtensionComponentData {
212
212
  component: 'PasswordInput';
213
- label: string;
214
- placeholder?: string;
213
+ label: LocalizedString;
214
+ placeholder?: LocalizedString;
215
215
  value?: string;
216
216
  onChangeAction?: ExtensionActionRef;
217
217
  }
218
218
  /** The extension API properties for the NumberInput component. */
219
219
  interface NumberInputProps extends ExtensionComponentData {
220
220
  component: 'NumberInput';
221
- label: string;
222
- placeholder?: string;
221
+ label: LocalizedString;
222
+ placeholder?: LocalizedString;
223
223
  value?: string | number;
224
224
  /** Optional minimum value. */
225
225
  min?: number;
@@ -232,8 +232,8 @@ interface NumberInputProps extends ExtensionComponentData {
232
232
  /** The extension API properties for the TextArea component. */
233
233
  interface TextAreaProps extends ExtensionComponentData {
234
234
  component: 'TextArea';
235
- label: string;
236
- placeholder?: string;
235
+ label: LocalizedString;
236
+ placeholder?: LocalizedString;
237
237
  value?: string;
238
238
  /** Number of visible text rows. Defaults to 4. */
239
239
  rows?: number;
@@ -242,16 +242,16 @@ interface TextAreaProps extends ExtensionComponentData {
242
242
  /** The extension API properties for the DateTimeInput component. */
243
243
  interface DateTimeInputProps extends ExtensionComponentData {
244
244
  component: 'DateTimeInput';
245
- label: string;
245
+ label: LocalizedString;
246
246
  value?: string;
247
247
  onChangeAction?: ExtensionActionRef;
248
248
  }
249
249
  /** The extension API properties for the Select component. */
250
250
  interface SelectProps extends ExtensionComponentData {
251
251
  component: 'Select';
252
- label: string;
252
+ label: LocalizedString;
253
253
  options: Array<{
254
- label: string;
254
+ label: LocalizedString;
255
255
  value: string;
256
256
  }>;
257
257
  selectedValue?: string;
@@ -260,7 +260,7 @@ interface SelectProps extends ExtensionComponentData {
260
260
  /** The extension API properties for the IconPicker component. */
261
261
  interface IconPickerProps extends ExtensionComponentData {
262
262
  component: 'IconPicker';
263
- label?: string;
263
+ label?: LocalizedString;
264
264
  value?: string;
265
265
  onChangeAction?: ExtensionActionRef;
266
266
  }
@@ -291,7 +291,7 @@ interface DividerProps extends ExtensionComponentData {
291
291
  interface IconProps extends ExtensionComponentData {
292
292
  component: 'Icon';
293
293
  name: HugeIconName;
294
- title?: string;
294
+ title?: LocalizedString;
295
295
  }
296
296
  /** Button type for IconButton. */
297
297
  type IconButtonType = 'normal' | 'primary' | 'danger' | 'accent';
@@ -299,7 +299,7 @@ type IconButtonType = 'normal' | 'primary' | 'danger' | 'accent';
299
299
  interface IconButtonProps extends ExtensionComponentData {
300
300
  component: 'IconButton';
301
301
  icon: HugeIconName;
302
- tooltip: string;
302
+ tooltip: LocalizedString;
303
303
  active?: boolean;
304
304
  disabled?: boolean;
305
305
  type?: IconButtonType;
@@ -308,15 +308,15 @@ interface IconButtonProps extends ExtensionComponentData {
308
308
  /** Action button definition for Panel component. */
309
309
  interface PanelAction {
310
310
  icon: HugeIconName;
311
- tooltip: string;
311
+ tooltip: LocalizedString;
312
312
  action: ExtensionActionRef;
313
313
  type?: IconButtonType;
314
314
  }
315
315
  /** The extension API properties for the Panel component. */
316
316
  interface PanelProps extends ExtensionComponentData {
317
317
  component: 'Panel';
318
- title: string;
319
- description?: string | string[];
318
+ title: LocalizedString;
319
+ description?: LocalizedString | LocalizedString[];
320
320
  icon?: HugeIconName;
321
321
  actions?: PanelAction[];
322
322
  content?: ExtensionComponentData;
@@ -324,8 +324,8 @@ interface PanelProps extends ExtensionComponentData {
324
324
  /** The extension API properties for the Toggle component. */
325
325
  interface ToggleProps extends ExtensionComponentData {
326
326
  component: 'Toggle';
327
- label?: string;
328
- description?: string;
327
+ label?: LocalizedString;
328
+ description?: LocalizedString;
329
329
  checked?: boolean;
330
330
  disabled?: boolean;
331
331
  onChangeAction?: ExtensionActionRef;
@@ -334,9 +334,9 @@ interface ToggleProps extends ExtensionComponentData {
334
334
  interface CollapsibleProps extends ExtensionComponentData {
335
335
  component: 'Collapsible';
336
336
  /** Title displayed in the header. */
337
- title: string;
337
+ title: LocalizedString;
338
338
  /** Optional description rendered under the title. */
339
- description?: string | string[];
339
+ description?: LocalizedString | LocalizedString[];
340
340
  /** Optional icon shown to the left of the title. */
341
341
  icon?: HugeIconName;
342
342
  /** Whether the section is expanded by default. */
@@ -350,7 +350,7 @@ type PillVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'a
350
350
  interface PillProps extends ExtensionComponentData {
351
351
  component: 'Pill';
352
352
  /** Text to display in the pill. */
353
- text: string;
353
+ text: LocalizedString;
354
354
  /** Optional icon shown to the left of the text. */
355
355
  icon?: HugeIconName;
356
356
  /** Color variant. Defaults to 'default'. */
@@ -360,7 +360,7 @@ interface PillProps extends ExtensionComponentData {
360
360
  interface CheckboxProps extends ExtensionComponentData {
361
361
  component: 'Checkbox';
362
362
  /** Label text displayed next to the checkbox. */
363
- label: string;
363
+ label: LocalizedString;
364
364
  /** Whether the checkbox is checked. */
365
365
  checked?: boolean;
366
366
  /** Whether the checkbox is disabled. */
@@ -374,7 +374,7 @@ interface CheckboxProps extends ExtensionComponentData {
374
374
  interface MarkdownProps extends ExtensionComponentData {
375
375
  component: 'Markdown';
376
376
  /** Markdown content to render. */
377
- content: string;
377
+ content: LocalizedString;
378
378
  }
379
379
  /** The extension API properties for the TextPreview component. */
380
380
  interface TextPreviewProps extends ExtensionComponentData {
@@ -388,7 +388,7 @@ interface TextPreviewProps extends ExtensionComponentData {
388
388
  interface ModalProps extends ExtensionComponentData {
389
389
  component: 'Modal';
390
390
  /** Title displayed in the modal header. */
391
- title: string;
391
+ title: LocalizedString;
392
392
  /** Whether the modal is open. */
393
393
  open?: boolean;
394
394
  /** Optional max width for the modal (e.g., '600px', '80%'). Defaults to '600px'. */
@@ -426,7 +426,7 @@ type FrameVariant = 'border' | 'solid';
426
426
  interface FrameProps extends ExtensionComponentData {
427
427
  component: 'Frame';
428
428
  /** Optional title displayed in the header. Can be a plain string or extension components. */
429
- title?: string | ExtensionComponentChildren;
429
+ title?: LocalizedString | ExtensionComponentChildren;
430
430
  /** Whether the content can be toggled (collapsed/expanded) by clicking the title. Requires title to be set. */
431
431
  collapsible?: boolean;
432
432
  /** Whether the frame content is expanded by default. Only used when collapsible is true. Defaults to true. */
@@ -513,7 +513,7 @@ interface WeatherForecastStep {
513
513
  interface WeatherForecastProps extends ExtensionComponentData {
514
514
  component: 'WeatherForecast';
515
515
  /** Heading above the row, e.g. "Kommande timmar". */
516
- title?: string;
516
+ title?: LocalizedString;
517
517
  /** Icon shown to the left of the title. */
518
518
  icon?: HugeIconName;
519
519
  /** Written after every temperature. Defaults to `°`. */
@@ -551,7 +551,7 @@ interface ChartProps extends ExtensionComponentData {
551
551
  /** One per point, along the horizontal axis. */
552
552
  labels?: string[];
553
553
  /** Heading above the plot. With a single series this is what names it, so no legend is drawn. */
554
- title?: string;
554
+ title?: LocalizedString;
555
555
  /** Icon shown to the left of the title. */
556
556
  icon?: HugeIconName;
557
557
  /** Written after every value, e.g. `°`, ` mm`, ` kr`. */
@@ -576,12 +576,12 @@ type StatTrend = 'up' | 'down' | 'flat';
576
576
  interface StatTileProps extends ExtensionComponentData {
577
577
  component: 'StatTile';
578
578
  /** What the number is, e.g. "Förbrukning i går". */
579
- label: string;
579
+ label: LocalizedString;
580
580
  value: string | number;
581
581
  /** Written after the value in smaller type, e.g. `kWh`. */
582
582
  unit?: string;
583
583
  /** One quiet line under the number. */
584
- caption?: string;
584
+ caption?: LocalizedString;
585
585
  icon?: HugeIconName;
586
586
  /** `flat` draws no arrow. */
587
587
  trend?: StatTrend;
@@ -619,7 +619,7 @@ type ProgressColor = 'accent' | 'success' | 'warning' | 'danger' | 'info' | 'neu
619
619
  interface ProgressBarProps extends ExtensionComponentData {
620
620
  component: 'ProgressBar';
621
621
  /** What is being measured, e.g. "Stressnivå". Shown beside the reading. */
622
- label: string;
622
+ label: LocalizedString;
623
623
  value: number;
624
624
  /** Bottom of the range. Defaults to 0. */
625
625
  min?: number;
@@ -634,7 +634,7 @@ interface ProgressBarProps extends ExtensionComponentData {
634
634
  /** The readout in words, when the bare number does not say it. Replaces value and unit. */
635
635
  valueLabel?: string;
636
636
  /** One quiet line under the reading. */
637
- caption?: string;
637
+ caption?: LocalizedString;
638
638
  icon?: HugeIconName;
639
639
  }
640
640
  /** One row of a KeyValueList. */
@@ -690,7 +690,7 @@ interface TimelineEntry {
690
690
  interface TimelineProps extends ExtensionComponentData {
691
691
  component: 'Timeline';
692
692
  /** Heading above the rail, e.g. "I dag". */
693
- title?: string;
693
+ title?: LocalizedString;
694
694
  /** Icon shown to the left of the title. */
695
695
  icon?: HugeIconName;
696
696
  entries: TimelineEntry[];
@@ -713,7 +713,7 @@ type NoteVariant = 'default' | 'accent' | 'success' | 'warning' | 'danger';
713
713
  */
714
714
  interface NoteProps extends ExtensionComponentData {
715
715
  component: 'Note';
716
- title?: string;
716
+ title?: LocalizedString;
717
717
  /** Icon shown to the left of the title. */
718
718
  icon?: HugeIconName;
719
719
  /** Trailing badge next to the title: a source, a category, a time. */
@@ -812,7 +812,7 @@ interface AgendaDay {
812
812
  interface AgendaProps extends ExtensionComponentData {
813
813
  component: 'Agenda';
814
814
  /** Heading above the days. */
815
- title?: string;
815
+ title?: LocalizedString;
816
816
  /** Icon shown to the left of the title. */
817
817
  icon?: HugeIconName;
818
818
  days: AgendaDay[];
@@ -924,9 +924,9 @@ interface ToolSettingsViewDefinition {
924
924
  /** Unique view ID within the extension */
925
925
  id: string;
926
926
  /** Display title */
927
- title: string;
927
+ title: LocalizedString;
928
928
  /** Help text */
929
- description?: string;
929
+ description?: LocalizedString;
930
930
  /** What the view is about, and so where Stina shows it. See {@link ExtensionSettingsTopic}. */
931
931
  topic?: ExtensionSettingsTopic;
932
932
  /** View configuration */
@@ -984,7 +984,7 @@ interface ToolSettingsListGroupBy {
984
984
  /** Explicit ordering of group values. Groups not listed appear afterwards, sorted alphabetically. */
985
985
  order?: string[];
986
986
  /** Human-friendly labels per group value (rendered as section headers). Falls back to the raw value if missing. */
987
- labels?: Record<string, string>;
987
+ labels?: Record<string, LocalizedString>;
988
988
  }
989
989
  /**
990
990
  * Mapping from tool list data to UI fields
@@ -1033,7 +1033,7 @@ interface PanelDefinition {
1033
1033
  /** Unique panel ID within the extension */
1034
1034
  id: string;
1035
1035
  /** Display title */
1036
- title: string;
1036
+ title: LocalizedString;
1037
1037
  /** Icon name (from huge-icons) */
1038
1038
  icon?: string;
1039
1039
  /** Panel view schema */
@@ -1054,7 +1054,7 @@ interface StatusCardDefinition {
1054
1054
  /** Unique card ID within the extension */
1055
1055
  id: string;
1056
1056
  /** What it is called where the user picks it */
1057
- title: string;
1057
+ title: LocalizedString;
1058
1058
  /** Icon name (from huge-icons) */
1059
1059
  icon?: string;
1060
1060
  /**
@@ -162,14 +162,14 @@ interface ExtensionPanelDefinition {
162
162
  interface HeaderProps extends ExtensionComponentData {
163
163
  component: 'Header';
164
164
  level: number;
165
- title: string;
166
- description?: string | string[];
165
+ title: LocalizedString;
166
+ description?: LocalizedString | LocalizedString[];
167
167
  icon?: HugeIconName;
168
168
  }
169
169
  /** The extension API properties for the Label component. */
170
170
  interface LabelProps extends ExtensionComponentData {
171
171
  component: 'Label';
172
- text: string;
172
+ text: LocalizedString;
173
173
  }
174
174
  /**
175
175
  * The extension API properties for the Clock component.
@@ -186,40 +186,40 @@ interface ClockProps extends ExtensionComponentData {
186
186
  /** The extension API properties for the paragraph component. */
187
187
  interface ParagraphProps extends ExtensionComponentData {
188
188
  component: 'Paragraph';
189
- text: string;
189
+ text: LocalizedString;
190
190
  }
191
191
  /** The extension API properties for the Button component. */
192
192
  interface ButtonProps extends ExtensionComponentData {
193
193
  component: 'Button';
194
- text: string;
194
+ text: LocalizedString;
195
195
  /** Visual style. Defaults to "normal". */
196
196
  type?: 'normal' | 'primary' | 'danger' | 'accent';
197
197
  /** Optional tooltip shown on hover. */
198
- title?: string;
198
+ title?: LocalizedString;
199
199
  disabled?: boolean;
200
200
  onClickAction: ExtensionActionRef;
201
201
  }
202
202
  /** The extension API properties for the TextInput component. */
203
203
  interface TextInputProps extends ExtensionComponentData {
204
204
  component: 'TextInput';
205
- label: string;
206
- placeholder?: string;
205
+ label: LocalizedString;
206
+ placeholder?: LocalizedString;
207
207
  value?: string;
208
208
  onChangeAction?: ExtensionActionRef;
209
209
  }
210
210
  /** The extension API properties for the PasswordInput component. */
211
211
  interface PasswordInputProps extends ExtensionComponentData {
212
212
  component: 'PasswordInput';
213
- label: string;
214
- placeholder?: string;
213
+ label: LocalizedString;
214
+ placeholder?: LocalizedString;
215
215
  value?: string;
216
216
  onChangeAction?: ExtensionActionRef;
217
217
  }
218
218
  /** The extension API properties for the NumberInput component. */
219
219
  interface NumberInputProps extends ExtensionComponentData {
220
220
  component: 'NumberInput';
221
- label: string;
222
- placeholder?: string;
221
+ label: LocalizedString;
222
+ placeholder?: LocalizedString;
223
223
  value?: string | number;
224
224
  /** Optional minimum value. */
225
225
  min?: number;
@@ -232,8 +232,8 @@ interface NumberInputProps extends ExtensionComponentData {
232
232
  /** The extension API properties for the TextArea component. */
233
233
  interface TextAreaProps extends ExtensionComponentData {
234
234
  component: 'TextArea';
235
- label: string;
236
- placeholder?: string;
235
+ label: LocalizedString;
236
+ placeholder?: LocalizedString;
237
237
  value?: string;
238
238
  /** Number of visible text rows. Defaults to 4. */
239
239
  rows?: number;
@@ -242,16 +242,16 @@ interface TextAreaProps extends ExtensionComponentData {
242
242
  /** The extension API properties for the DateTimeInput component. */
243
243
  interface DateTimeInputProps extends ExtensionComponentData {
244
244
  component: 'DateTimeInput';
245
- label: string;
245
+ label: LocalizedString;
246
246
  value?: string;
247
247
  onChangeAction?: ExtensionActionRef;
248
248
  }
249
249
  /** The extension API properties for the Select component. */
250
250
  interface SelectProps extends ExtensionComponentData {
251
251
  component: 'Select';
252
- label: string;
252
+ label: LocalizedString;
253
253
  options: Array<{
254
- label: string;
254
+ label: LocalizedString;
255
255
  value: string;
256
256
  }>;
257
257
  selectedValue?: string;
@@ -260,7 +260,7 @@ interface SelectProps extends ExtensionComponentData {
260
260
  /** The extension API properties for the IconPicker component. */
261
261
  interface IconPickerProps extends ExtensionComponentData {
262
262
  component: 'IconPicker';
263
- label?: string;
263
+ label?: LocalizedString;
264
264
  value?: string;
265
265
  onChangeAction?: ExtensionActionRef;
266
266
  }
@@ -291,7 +291,7 @@ interface DividerProps extends ExtensionComponentData {
291
291
  interface IconProps extends ExtensionComponentData {
292
292
  component: 'Icon';
293
293
  name: HugeIconName;
294
- title?: string;
294
+ title?: LocalizedString;
295
295
  }
296
296
  /** Button type for IconButton. */
297
297
  type IconButtonType = 'normal' | 'primary' | 'danger' | 'accent';
@@ -299,7 +299,7 @@ type IconButtonType = 'normal' | 'primary' | 'danger' | 'accent';
299
299
  interface IconButtonProps extends ExtensionComponentData {
300
300
  component: 'IconButton';
301
301
  icon: HugeIconName;
302
- tooltip: string;
302
+ tooltip: LocalizedString;
303
303
  active?: boolean;
304
304
  disabled?: boolean;
305
305
  type?: IconButtonType;
@@ -308,15 +308,15 @@ interface IconButtonProps extends ExtensionComponentData {
308
308
  /** Action button definition for Panel component. */
309
309
  interface PanelAction {
310
310
  icon: HugeIconName;
311
- tooltip: string;
311
+ tooltip: LocalizedString;
312
312
  action: ExtensionActionRef;
313
313
  type?: IconButtonType;
314
314
  }
315
315
  /** The extension API properties for the Panel component. */
316
316
  interface PanelProps extends ExtensionComponentData {
317
317
  component: 'Panel';
318
- title: string;
319
- description?: string | string[];
318
+ title: LocalizedString;
319
+ description?: LocalizedString | LocalizedString[];
320
320
  icon?: HugeIconName;
321
321
  actions?: PanelAction[];
322
322
  content?: ExtensionComponentData;
@@ -324,8 +324,8 @@ interface PanelProps extends ExtensionComponentData {
324
324
  /** The extension API properties for the Toggle component. */
325
325
  interface ToggleProps extends ExtensionComponentData {
326
326
  component: 'Toggle';
327
- label?: string;
328
- description?: string;
327
+ label?: LocalizedString;
328
+ description?: LocalizedString;
329
329
  checked?: boolean;
330
330
  disabled?: boolean;
331
331
  onChangeAction?: ExtensionActionRef;
@@ -334,9 +334,9 @@ interface ToggleProps extends ExtensionComponentData {
334
334
  interface CollapsibleProps extends ExtensionComponentData {
335
335
  component: 'Collapsible';
336
336
  /** Title displayed in the header. */
337
- title: string;
337
+ title: LocalizedString;
338
338
  /** Optional description rendered under the title. */
339
- description?: string | string[];
339
+ description?: LocalizedString | LocalizedString[];
340
340
  /** Optional icon shown to the left of the title. */
341
341
  icon?: HugeIconName;
342
342
  /** Whether the section is expanded by default. */
@@ -350,7 +350,7 @@ type PillVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'a
350
350
  interface PillProps extends ExtensionComponentData {
351
351
  component: 'Pill';
352
352
  /** Text to display in the pill. */
353
- text: string;
353
+ text: LocalizedString;
354
354
  /** Optional icon shown to the left of the text. */
355
355
  icon?: HugeIconName;
356
356
  /** Color variant. Defaults to 'default'. */
@@ -360,7 +360,7 @@ interface PillProps extends ExtensionComponentData {
360
360
  interface CheckboxProps extends ExtensionComponentData {
361
361
  component: 'Checkbox';
362
362
  /** Label text displayed next to the checkbox. */
363
- label: string;
363
+ label: LocalizedString;
364
364
  /** Whether the checkbox is checked. */
365
365
  checked?: boolean;
366
366
  /** Whether the checkbox is disabled. */
@@ -374,7 +374,7 @@ interface CheckboxProps extends ExtensionComponentData {
374
374
  interface MarkdownProps extends ExtensionComponentData {
375
375
  component: 'Markdown';
376
376
  /** Markdown content to render. */
377
- content: string;
377
+ content: LocalizedString;
378
378
  }
379
379
  /** The extension API properties for the TextPreview component. */
380
380
  interface TextPreviewProps extends ExtensionComponentData {
@@ -388,7 +388,7 @@ interface TextPreviewProps extends ExtensionComponentData {
388
388
  interface ModalProps extends ExtensionComponentData {
389
389
  component: 'Modal';
390
390
  /** Title displayed in the modal header. */
391
- title: string;
391
+ title: LocalizedString;
392
392
  /** Whether the modal is open. */
393
393
  open?: boolean;
394
394
  /** Optional max width for the modal (e.g., '600px', '80%'). Defaults to '600px'. */
@@ -426,7 +426,7 @@ type FrameVariant = 'border' | 'solid';
426
426
  interface FrameProps extends ExtensionComponentData {
427
427
  component: 'Frame';
428
428
  /** Optional title displayed in the header. Can be a plain string or extension components. */
429
- title?: string | ExtensionComponentChildren;
429
+ title?: LocalizedString | ExtensionComponentChildren;
430
430
  /** Whether the content can be toggled (collapsed/expanded) by clicking the title. Requires title to be set. */
431
431
  collapsible?: boolean;
432
432
  /** Whether the frame content is expanded by default. Only used when collapsible is true. Defaults to true. */
@@ -513,7 +513,7 @@ interface WeatherForecastStep {
513
513
  interface WeatherForecastProps extends ExtensionComponentData {
514
514
  component: 'WeatherForecast';
515
515
  /** Heading above the row, e.g. "Kommande timmar". */
516
- title?: string;
516
+ title?: LocalizedString;
517
517
  /** Icon shown to the left of the title. */
518
518
  icon?: HugeIconName;
519
519
  /** Written after every temperature. Defaults to `°`. */
@@ -551,7 +551,7 @@ interface ChartProps extends ExtensionComponentData {
551
551
  /** One per point, along the horizontal axis. */
552
552
  labels?: string[];
553
553
  /** Heading above the plot. With a single series this is what names it, so no legend is drawn. */
554
- title?: string;
554
+ title?: LocalizedString;
555
555
  /** Icon shown to the left of the title. */
556
556
  icon?: HugeIconName;
557
557
  /** Written after every value, e.g. `°`, ` mm`, ` kr`. */
@@ -576,12 +576,12 @@ type StatTrend = 'up' | 'down' | 'flat';
576
576
  interface StatTileProps extends ExtensionComponentData {
577
577
  component: 'StatTile';
578
578
  /** What the number is, e.g. "Förbrukning i går". */
579
- label: string;
579
+ label: LocalizedString;
580
580
  value: string | number;
581
581
  /** Written after the value in smaller type, e.g. `kWh`. */
582
582
  unit?: string;
583
583
  /** One quiet line under the number. */
584
- caption?: string;
584
+ caption?: LocalizedString;
585
585
  icon?: HugeIconName;
586
586
  /** `flat` draws no arrow. */
587
587
  trend?: StatTrend;
@@ -619,7 +619,7 @@ type ProgressColor = 'accent' | 'success' | 'warning' | 'danger' | 'info' | 'neu
619
619
  interface ProgressBarProps extends ExtensionComponentData {
620
620
  component: 'ProgressBar';
621
621
  /** What is being measured, e.g. "Stressnivå". Shown beside the reading. */
622
- label: string;
622
+ label: LocalizedString;
623
623
  value: number;
624
624
  /** Bottom of the range. Defaults to 0. */
625
625
  min?: number;
@@ -634,7 +634,7 @@ interface ProgressBarProps extends ExtensionComponentData {
634
634
  /** The readout in words, when the bare number does not say it. Replaces value and unit. */
635
635
  valueLabel?: string;
636
636
  /** One quiet line under the reading. */
637
- caption?: string;
637
+ caption?: LocalizedString;
638
638
  icon?: HugeIconName;
639
639
  }
640
640
  /** One row of a KeyValueList. */
@@ -690,7 +690,7 @@ interface TimelineEntry {
690
690
  interface TimelineProps extends ExtensionComponentData {
691
691
  component: 'Timeline';
692
692
  /** Heading above the rail, e.g. "I dag". */
693
- title?: string;
693
+ title?: LocalizedString;
694
694
  /** Icon shown to the left of the title. */
695
695
  icon?: HugeIconName;
696
696
  entries: TimelineEntry[];
@@ -713,7 +713,7 @@ type NoteVariant = 'default' | 'accent' | 'success' | 'warning' | 'danger';
713
713
  */
714
714
  interface NoteProps extends ExtensionComponentData {
715
715
  component: 'Note';
716
- title?: string;
716
+ title?: LocalizedString;
717
717
  /** Icon shown to the left of the title. */
718
718
  icon?: HugeIconName;
719
719
  /** Trailing badge next to the title: a source, a category, a time. */
@@ -812,7 +812,7 @@ interface AgendaDay {
812
812
  interface AgendaProps extends ExtensionComponentData {
813
813
  component: 'Agenda';
814
814
  /** Heading above the days. */
815
- title?: string;
815
+ title?: LocalizedString;
816
816
  /** Icon shown to the left of the title. */
817
817
  icon?: HugeIconName;
818
818
  days: AgendaDay[];
@@ -924,9 +924,9 @@ interface ToolSettingsViewDefinition {
924
924
  /** Unique view ID within the extension */
925
925
  id: string;
926
926
  /** Display title */
927
- title: string;
927
+ title: LocalizedString;
928
928
  /** Help text */
929
- description?: string;
929
+ description?: LocalizedString;
930
930
  /** What the view is about, and so where Stina shows it. See {@link ExtensionSettingsTopic}. */
931
931
  topic?: ExtensionSettingsTopic;
932
932
  /** View configuration */
@@ -984,7 +984,7 @@ interface ToolSettingsListGroupBy {
984
984
  /** Explicit ordering of group values. Groups not listed appear afterwards, sorted alphabetically. */
985
985
  order?: string[];
986
986
  /** Human-friendly labels per group value (rendered as section headers). Falls back to the raw value if missing. */
987
- labels?: Record<string, string>;
987
+ labels?: Record<string, LocalizedString>;
988
988
  }
989
989
  /**
990
990
  * Mapping from tool list data to UI fields
@@ -1033,7 +1033,7 @@ interface PanelDefinition {
1033
1033
  /** Unique panel ID within the extension */
1034
1034
  id: string;
1035
1035
  /** Display title */
1036
- title: string;
1036
+ title: LocalizedString;
1037
1037
  /** Icon name (from huge-icons) */
1038
1038
  icon?: string;
1039
1039
  /** Panel view schema */
@@ -1054,7 +1054,7 @@ interface StatusCardDefinition {
1054
1054
  /** Unique card ID within the extension */
1055
1055
  id: string;
1056
1056
  /** What it is called where the user picks it */
1057
- title: string;
1057
+ title: LocalizedString;
1058
1058
  /** Icon name (from huge-icons) */
1059
1059
  icon?: string;
1060
1060
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stina/extension-api",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",