@esrf/daiquiri-lib 1.1.0 → 2.0.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as React$1 from 'react';
3
- import React__default, { ReactElement, Component, ComponentType, PropsWithChildren, ReactChild, ChangeEvent, KeyboardEvent } from 'react';
3
+ import React__default, { ComponentType, ReactChild, ReactElement, PropsWithChildren, ChangeEvent, KeyboardEvent, Component } from 'react';
4
4
 
5
5
  interface HardwareError {
6
6
  property: string;
@@ -53,6 +53,9 @@ interface Hardware {
53
53
  /** Any potential errors initialising this object */
54
54
  errors?: HardwareError[];
55
55
  }
56
+ interface AnyHardware extends Hardware {
57
+ properties: any;
58
+ }
56
59
  interface HardwareChangeActions {
57
60
  setProperty: (name: string, value: any) => Promise<void>;
58
61
  call: (name: string, ...args: any[]) => Promise<void>;
@@ -85,16 +88,217 @@ interface HardwareWidgetProps<H extends Hardware = Hardware, O extends HardwareW
85
88
  /** True if the session have the control */
86
89
  operator: boolean;
87
90
  }
91
+ declare type HardwareComponentType<H extends Hardware = Hardware> = ComponentType<HardwareWidgetProps<H, any>>;
92
+ interface HardwareVariant<H extends Hardware = Hardware> {
93
+ [name: string]: HardwareComponentType<H>;
94
+ }
88
95
 
96
+ type types_d_AnyHardware = AnyHardware;
89
97
  type types_d_EditableHardware<H extends Hardware = Hardware> = EditableHardware<H>;
90
98
  type types_d_Hardware = Hardware;
91
99
  type types_d_HardwareChangeActions = HardwareChangeActions;
100
+ type types_d_HardwareComponentType<H extends Hardware = Hardware> = HardwareComponentType<H>;
92
101
  type types_d_HardwareSchemaDescription = HardwareSchemaDescription;
102
+ type types_d_HardwareVariant<H extends Hardware = Hardware> = HardwareVariant<H>;
93
103
  type types_d_HardwareWidgetOptions = HardwareWidgetOptions;
94
104
  type types_d_HardwareWidgetProps<H extends Hardware = Hardware, O extends HardwareWidgetOptions = HardwareWidgetOptions> = HardwareWidgetProps<H, O>;
95
105
  declare namespace types_d {
96
- export type { types_d_EditableHardware as EditableHardware, types_d_Hardware as Hardware, types_d_HardwareChangeActions as HardwareChangeActions, types_d_HardwareSchemaDescription as HardwareSchemaDescription, types_d_HardwareWidgetOptions as HardwareWidgetOptions, types_d_HardwareWidgetProps as HardwareWidgetProps };
106
+ export type { types_d_AnyHardware as AnyHardware, types_d_EditableHardware as EditableHardware, types_d_Hardware as Hardware, types_d_HardwareChangeActions as HardwareChangeActions, types_d_HardwareComponentType as HardwareComponentType, types_d_HardwareSchemaDescription as HardwareSchemaDescription, types_d_HardwareVariant as HardwareVariant, types_d_HardwareWidgetOptions as HardwareWidgetOptions, types_d_HardwareWidgetProps as HardwareWidgetProps };
107
+ }
108
+
109
+ interface GenericSchema extends Hardware {
110
+ properties: {
111
+ state: string;
112
+ };
113
+ }
114
+ interface AnySchema extends Hardware {
115
+ properties: any;
116
+ }
117
+
118
+ type schema_d_AnySchema = AnySchema;
119
+ type schema_d_GenericSchema = GenericSchema;
120
+ declare namespace schema_d {
121
+ export type { schema_d_AnySchema as AnySchema, schema_d_GenericSchema as GenericSchema };
122
+ }
123
+
124
+ declare const Variants$o: HardwareVariant<AnySchema>;
125
+
126
+ declare const Mocks$k: {
127
+ default: {
128
+ response: {
129
+ callables: never[];
130
+ id: string;
131
+ name: string;
132
+ online: boolean;
133
+ properties: {
134
+ number: number;
135
+ option: string;
136
+ state: string;
137
+ string: string;
138
+ };
139
+ protocol: string;
140
+ require_staff: boolean;
141
+ type: string;
142
+ };
143
+ schema: {
144
+ $ref: string;
145
+ $schema: string;
146
+ asyncValidate: boolean;
147
+ cache: boolean;
148
+ definitions: {
149
+ HWTestSchema: {
150
+ additionalProperties: boolean;
151
+ properties: {
152
+ callables: {
153
+ $ref: string;
154
+ type: string;
155
+ };
156
+ id: {
157
+ title: string;
158
+ type: string;
159
+ };
160
+ name: {
161
+ title: string;
162
+ type: string;
163
+ };
164
+ online: {
165
+ title: string;
166
+ type: string;
167
+ };
168
+ properties: {
169
+ $ref: string;
170
+ type: string;
171
+ };
172
+ protocol: {
173
+ title: string;
174
+ type: string;
175
+ };
176
+ require_staff: {
177
+ title: string;
178
+ type: string;
179
+ };
180
+ type: {
181
+ title: string;
182
+ type: string;
183
+ };
184
+ };
185
+ type: string;
186
+ };
187
+ HardwareSchema: {
188
+ additionalProperties: boolean;
189
+ cache: boolean;
190
+ properties: {};
191
+ type: string;
192
+ };
193
+ TestPropertiesSchema: {
194
+ additionalProperties: boolean;
195
+ cache: boolean;
196
+ properties: {
197
+ number: {
198
+ format: string;
199
+ title: string;
200
+ type: string;
201
+ };
202
+ option: {
203
+ enum: string[];
204
+ enumNames: never[];
205
+ title: string;
206
+ type: string;
207
+ };
208
+ state: {
209
+ enum: string[];
210
+ enumNames: never[];
211
+ readOnly: boolean;
212
+ title: string;
213
+ type: string;
214
+ };
215
+ string: {
216
+ title: string;
217
+ type: string;
218
+ };
219
+ };
220
+ type: string;
221
+ };
222
+ };
223
+ save_presets: boolean;
224
+ };
225
+ };
226
+ };
227
+
228
+ declare function DefaultState(props: HardwareWidgetProps<AnySchema>): JSX.Element;
229
+
230
+ interface BaseNameWidgetOptions extends HardwareWidgetOptions {
231
+ overrideName?: string;
232
+ emptyifnone?: boolean;
97
233
  }
234
+ declare function Name(props: HardwareWidgetProps<AnySchema, BaseNameWidgetOptions>): JSX.Element;
235
+
236
+ interface BasePropertyWidgetOptions extends HardwareWidgetOptions {
237
+ header?: string;
238
+ property?: string;
239
+ unit?: string;
240
+ }
241
+ declare function Property(props: HardwareWidgetProps<AnySchema, BasePropertyWidgetOptions>): JSX.Element;
242
+
243
+ interface BaseInfoWidgetOptions extends HardwareWidgetOptions {
244
+ /** The property */
245
+ property?: string;
246
+ /** Unit for the property */
247
+ unit?: string;
248
+ }
249
+ declare function Info(props: HardwareWidgetProps<AnySchema, BaseInfoWidgetOptions>): JSX.Element;
250
+
251
+ interface Props$e {
252
+ showActions: boolean;
253
+ children: ReactChild | ReactChild[];
254
+ }
255
+ /**
256
+ * Wrap hardware widget passed as children with addToast and hardware
257
+ * change actions triggering console log.
258
+ */
259
+ declare function Wrapper(props: Props$e): JSX.Element;
260
+
261
+ /**
262
+ * Hardware as exposed by Redux
263
+ */
264
+ interface ActuatorSchema extends Hardware {
265
+ properties: {
266
+ state: string;
267
+ };
268
+ }
269
+
270
+ /**
271
+ * Hardware as exposed by Redux
272
+ */
273
+ interface AirBearingSchema extends Hardware {
274
+ properties: {
275
+ state: string;
276
+ };
277
+ }
278
+ declare const Variants$n: HardwareVariant<AirBearingSchema>;
279
+
280
+ declare function AirBearing(props: HardwareWidgetProps<AirBearingSchema, HardwareWidgetOptions>): JSX.Element;
281
+
282
+ declare function AirBearingProtected(props: HardwareWidgetProps<AirBearingSchema, HardwareWidgetOptions>): JSX.Element;
283
+
284
+ declare function AirBearingState(props: {
285
+ hardware: AirBearingSchema;
286
+ }): JSX.Element;
287
+
288
+ declare const Mocks$j: {
289
+ default: {
290
+ callables: string[];
291
+ id: string;
292
+ name: string;
293
+ online: boolean;
294
+ properties: {
295
+ state: string;
296
+ };
297
+ protocol: string;
298
+ require_staff: boolean;
299
+ type: string;
300
+ };
301
+ };
98
302
 
99
303
  interface FrontendSchema extends Hardware {
100
304
  properties: {
@@ -111,17 +315,376 @@ interface FrontendSchema extends Hardware {
111
315
  expitlk: string;
112
316
  };
113
317
  }
318
+ declare const Variants$m: HardwareVariant<FrontendSchema>;
114
319
 
115
320
  declare function Frontend(props: HardwareWidgetProps<FrontendSchema>): JSX.Element;
116
321
 
117
- interface InfoOptions extends HardwareWidgetOptions {
118
- /** The property */
119
- property?: string;
120
- /** Unit for the property */
322
+ declare const Mocks$i: {
323
+ default: {
324
+ callables: string[];
325
+ id: string;
326
+ name: string;
327
+ online: boolean;
328
+ properties: {
329
+ current: number;
330
+ expitlk: string;
331
+ feitlk: string;
332
+ frontend: string;
333
+ pssitlk: string;
334
+ refill: number;
335
+ state: string;
336
+ mode: string;
337
+ message: string;
338
+ status: string;
339
+ };
340
+ protocol: string;
341
+ require_staff: boolean;
342
+ type: string;
343
+ };
344
+ };
345
+
346
+ /**
347
+ * Hardware as exposed by Redux
348
+ */
349
+ interface GaugeSchema extends Hardware {
350
+ properties: {
351
+ state: string;
352
+ status: string;
353
+ pressure: number;
354
+ unit?: string;
355
+ };
356
+ }
357
+ declare const Variants$l: HardwareVariant<GaugeSchema>;
358
+
359
+ interface GaugeWidgetOptions extends HardwareWidgetOptions {
360
+ /** Unit of pressure */
121
361
  unit?: string;
362
+ /** Precision to show, default 3 */
363
+ precision?: number;
364
+ }
365
+ declare function Gauge(props: HardwareWidgetProps<GaugeSchema, GaugeWidgetOptions>): JSX.Element;
366
+
367
+ declare const Mocks$h: {
368
+ default: {
369
+ callables: string[];
370
+ id: string;
371
+ name: string;
372
+ online: boolean;
373
+ properties: {
374
+ pressure: number;
375
+ state: string;
376
+ status: string;
377
+ };
378
+ protocol: string;
379
+ require_staff: boolean;
380
+ type: string;
381
+ };
382
+ default2: {
383
+ callables: string[];
384
+ id: string;
385
+ name: string;
386
+ online: boolean;
387
+ properties: {
388
+ pressure: number;
389
+ state: string;
390
+ status: string;
391
+ };
392
+ protocol: string;
393
+ require_staff: boolean;
394
+ type: string;
395
+ };
396
+ };
397
+
398
+ /**
399
+ * Hardware as exposed by Redux
400
+ */
401
+ interface LaserSchema extends Hardware {
402
+ properties: {
403
+ state: string;
404
+ power: number;
405
+ };
406
+ }
407
+ declare const Variants$k: HardwareVariant<LaserSchema>;
408
+
409
+ interface LaserWidgetOptions extends HardwareWidgetOptions {
410
+ /** Default step size to use for up / down arrows */
411
+ step?: number;
412
+ /** Array of selectable step sizes */
413
+ steps?: number[];
414
+ }
415
+ declare function Laser(props: HardwareWidgetProps<LaserSchema, LaserWidgetOptions>): JSX.Element;
416
+
417
+ declare const Mocks$g: {
418
+ default: {
419
+ callables: never[];
420
+ id: string;
421
+ name: string;
422
+ online: boolean;
423
+ properties: {
424
+ power: number;
425
+ state: string;
426
+ };
427
+ protocol: string;
428
+ require_staff: boolean;
429
+ type: string;
430
+ };
431
+ };
432
+
433
+ /**
434
+ * Hardware as exposed by Redux
435
+ */
436
+ interface LaserHeatingSchema extends Hardware {
437
+ properties: {
438
+ state: string;
439
+ exposure_time: number;
440
+ background_mode: 'ON' | 'OFF' | 'ALWAYS';
441
+ fit_wavelength: number[];
442
+ current_calibration: string;
443
+ };
444
+ }
445
+ declare const Variants$j: HardwareVariant<LaserHeatingSchema>;
446
+
447
+ interface LaserHeatingWidgetOptions extends HardwareWidgetOptions {
448
+ /** Default step size to use for up / down arrows */
449
+ exposureStep?: number;
450
+ /** Array of selectable step sizes */
451
+ exposureSteps?: number[];
452
+ }
453
+ declare function LaserHeating(props: HardwareWidgetProps<LaserHeatingSchema, LaserHeatingWidgetOptions>): JSX.Element;
454
+
455
+ declare const Mocks$f: {
456
+ default: {
457
+ callables: never[];
458
+ id: string;
459
+ name: string;
460
+ online: boolean;
461
+ properties: {
462
+ exposure_time: number;
463
+ state: string;
464
+ background_mode: string;
465
+ fit_wavelength: number[];
466
+ current_calibration: string;
467
+ };
468
+ protocol: string;
469
+ require_staff: boolean;
470
+ type: string;
471
+ };
472
+ };
473
+
474
+ /**
475
+ * Hardware as exposed by Redux
476
+ */
477
+ interface LightSchema extends Hardware {
478
+ properties: {
479
+ state: string;
480
+ temperature: number;
481
+ intensity: number;
482
+ };
483
+ }
484
+ declare const Variants$i: HardwareVariant<LightSchema>;
485
+
486
+ declare function Light(props: HardwareWidgetProps<LightSchema>): JSX.Element;
487
+
488
+ declare const Mocks$e: {
489
+ default: {
490
+ callables: never[];
491
+ id: string;
492
+ name: string;
493
+ online: boolean;
494
+ properties: {
495
+ intensity: number;
496
+ state: string;
497
+ temperature: number;
498
+ };
499
+ protocol: string;
500
+ require_staff: boolean;
501
+ type: string;
502
+ };
503
+ };
504
+
505
+ /**
506
+ * Hardware as exposed by Redux
507
+ */
508
+ interface LimaSchema extends Hardware {
509
+ properties: {
510
+ state: 'READY' | 'ACQUIRING' | 'CONFIGURATION' | 'FAULT' | 'UNKNOWN' | 'OFFLINE';
511
+ static: {
512
+ lima_version: string;
513
+ lima_type: string;
514
+ camera_type: string;
515
+ camera_model: string;
516
+ camera_pixelsize: [number, number];
517
+ image_max_dim: [number, number];
518
+ } | null;
519
+ /**
520
+ * Pixel size of the detector (without binning).
521
+ *
522
+ * It's a read-only property.
523
+ */
524
+ pixel_size: [number, number];
525
+ /**
526
+ * Max exposition time of a single sub frame in accumulation.
527
+ *
528
+ * It is used (together with the exposure time) to determine the
529
+ * nb of sub frames and the expo time of a single sub frame.
530
+ * See `guessSubframes`.
531
+ */
532
+ acc_max_expo_time: number | null;
533
+ /**
534
+ * Flip applied to the resulting image
535
+ */
536
+ flip: [boolean, boolean];
537
+ /**
538
+ * Rotation applied to the resulting image.
539
+ *
540
+ * One of 0, 90, 180, 270
541
+ */
542
+ rotation: 0 | 90 | 180 | 270;
543
+ /**
544
+ * Binning applied to the resulting image
545
+ */
546
+ binning: [number, number];
547
+ /**
548
+ * Location and size of the ROI in the raw image.
549
+ *
550
+ * When binning=[1, 1] flip=[false, false], rotation=0
551
+ */
552
+ raw_roi: [number, number, number, number];
553
+ /**
554
+ * Location of the ROI in the transformed image.
555
+ */
556
+ roi: [number, number, number, number];
557
+ /**
558
+ * Final size of the detector. Including the crop of the ROI.
559
+ */
560
+ size: [number, number];
561
+ };
122
562
  }
563
+ declare function isLimaHardware(entity: Hardware): entity is LimaSchema;
564
+ declare function useLimaHardware(name: string | null): LimaSchema | null;
565
+ /**
566
+ * Compute the nb sub frames which will be used for a specific exposure time
567
+ */
568
+ declare function limaGuessSubframes(exposureTime: number, accMaxExpoTime: number): [number, number];
569
+ declare const Variants$h: HardwareVariant<LimaSchema>;
570
+
571
+ declare function LimaBinning(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): JSX.Element;
123
572
 
124
- declare function Info(props: HardwareWidgetProps<Hardware, InfoOptions>): JSX.Element;
573
+ declare function LimaDefault(props: HardwareWidgetProps<LimaSchema>): JSX.Element;
574
+
575
+ declare function TomoDetectorSize$3(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): JSX.Element;
576
+
577
+ declare function TomoDetectorSize$2(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): JSX.Element;
578
+
579
+ declare function TomoDetectorSize$1(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): JSX.Element;
580
+
581
+ declare function TomoDetectorSize(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): JSX.Element;
582
+
583
+ declare function LimaState(props: {
584
+ hardware: LimaSchema;
585
+ }): JSX.Element;
586
+
587
+ declare const Mocks$d: {
588
+ default: {
589
+ id: string;
590
+ name: string;
591
+ protocol: string;
592
+ type: string;
593
+ online: boolean;
594
+ require_staff: boolean;
595
+ properties: {
596
+ static: {
597
+ lima_version: string;
598
+ lima_type: string;
599
+ camera_type: string;
600
+ camera_model: string;
601
+ camera_pixelsize: number[];
602
+ image_max_dim: number[];
603
+ };
604
+ acc_max_expo_time: number;
605
+ binning: number[];
606
+ flip: boolean[];
607
+ max_size: number[];
608
+ pixel_size: number[];
609
+ raw_roi: number[];
610
+ roi: number[];
611
+ rotation: number;
612
+ size: number[];
613
+ state: string;
614
+ };
615
+ };
616
+ flip: {
617
+ id: string;
618
+ name: string;
619
+ protocol: string;
620
+ type: string;
621
+ online: boolean;
622
+ require_staff: boolean;
623
+ properties: {
624
+ static: {
625
+ lima_version: string;
626
+ lima_type: string;
627
+ camera_type: string;
628
+ camera_model: string;
629
+ camera_pixelsize: number[];
630
+ image_max_dim: number[];
631
+ };
632
+ acc_max_expo_time: number;
633
+ binning: number[];
634
+ flip: boolean[];
635
+ max_size: number[];
636
+ pixel_size: number[];
637
+ raw_roi: number[];
638
+ roi: number[];
639
+ rotation: number;
640
+ size: number[];
641
+ state: string;
642
+ };
643
+ };
644
+ rot: {
645
+ id: string;
646
+ name: string;
647
+ protocol: string;
648
+ type: string;
649
+ online: boolean;
650
+ require_staff: boolean;
651
+ properties: {
652
+ static: {
653
+ lima_version: string;
654
+ lima_type: string;
655
+ camera_type: string;
656
+ camera_model: string;
657
+ camera_pixelsize: number[];
658
+ image_max_dim: number[];
659
+ };
660
+ acc_max_expo_time: number;
661
+ binning: number[];
662
+ flip: boolean[];
663
+ max_size: number[];
664
+ pixel_size: number[];
665
+ raw_roi: number[];
666
+ roi: number[];
667
+ rotation: number;
668
+ size: number[];
669
+ state: string;
670
+ };
671
+ };
672
+ };
673
+
674
+ /**
675
+ * Hardware as exposed by Redux
676
+ */
677
+ interface MeasurementGroupSchema extends Hardware {
678
+ properties: {
679
+ /** List of available counters */
680
+ available: string[];
681
+ /** List of disabled counters.
682
+ *
683
+ * It is a subset of the `available` list.
684
+ */
685
+ disabled: string[];
686
+ };
687
+ }
125
688
 
126
689
  interface MotorSchema extends Hardware {
127
690
  properties: {
@@ -138,6 +701,49 @@ interface MotorSchema extends Hardware {
138
701
  display_digits: number | null;
139
702
  };
140
703
  }
704
+ /**
705
+ * Exposes the standard supported motor states
706
+ */
707
+ interface MotorStates {
708
+ READY?: true;
709
+ MOVING?: true;
710
+ FAULT?: true;
711
+ HIGHLIMIT?: true;
712
+ LOWLIMIT?: true;
713
+ HOME?: true;
714
+ OFF?: true;
715
+ DISABLED?: true;
716
+ UNKNOWN?: true;
717
+ NOT_READY?: true;
718
+ }
719
+ /**
720
+ * Normalize the motor state exposed by the hardware.
721
+ *
722
+ * This does not exposes the custom states in a useful maner.
723
+ *
724
+ * Store states are changed depending of existing user tags
725
+ *
726
+ * - `auto_on`: This allow to move the motor even if `OFF` is enabled.
727
+ * When `OFF` is enabled `READY` is turned to true.
728
+ * - `auto_ready`: This allow to move the motor even if `NOT_READY` is enabled.
729
+ *
730
+ * TODO: An improvement would be to normalize that when redux is populated.
731
+ * instead of storing a list.
732
+ *
733
+ * @param state: List of the controller state
734
+ * @param userTags: List of the hardware user tags
735
+ */
736
+ declare function useMotorStates(state: string[] | undefined, userTags?: string[]): MotorStates;
737
+ declare function isMotorHardware(entity: Hardware): entity is MotorSchema;
738
+ /**
739
+ * Return a motor from it's hardware name.
740
+ *
741
+ * Return `null` if the name refers to nothing or a mismatching hardware.
742
+ *
743
+ * @param name: An hardware identifier
744
+ */
745
+ declare function useMotorHardware(name: string | null): MotorSchema | null;
746
+ declare const Variants$g: HardwareVariant<MotorSchema>;
141
747
 
142
748
  interface MotorDefaultOptions extends HardwareWidgetOptions {
143
749
  /** Default step size to use for up / down arrows */
@@ -150,6 +756,8 @@ interface MotorDefaultOptions extends HardwareWidgetOptions {
150
756
  extended?: boolean;
151
757
  /** Whether this widget is read only */
152
758
  readOnly?: boolean;
759
+ /** Whether this widget can only be changed using steps */
760
+ stepOnly?: boolean;
153
761
  /** Kind of header displayed */
154
762
  header?: string;
155
763
  /** Specify a fontawesome to inc the value */
@@ -169,6 +777,11 @@ interface MotorDefaultOptions extends HardwareWidgetOptions {
169
777
  */
170
778
  declare function MotorDefault(props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>): JSX.Element;
171
779
 
780
+ /**
781
+ * The default motor widget
782
+ */
783
+ declare function MotorText(props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>): JSX.Element;
784
+
172
785
  /**
173
786
  * A motor have a set of flags as state.
174
787
  *
@@ -182,6 +795,150 @@ declare function MotorState(props: {
182
795
  hardware: MotorSchema;
183
796
  }): JSX.Element;
184
797
 
798
+ declare const Mocks$c: {
799
+ default: {
800
+ callables: string[];
801
+ id: string;
802
+ name: string;
803
+ online: boolean;
804
+ properties: {
805
+ offset: number;
806
+ sign: number;
807
+ acceleration: number;
808
+ limits: number[];
809
+ position: number;
810
+ state: string[];
811
+ tolerance: number;
812
+ unit: string;
813
+ velocity: number;
814
+ display_digits: number;
815
+ };
816
+ protocol: string;
817
+ require_staff: boolean;
818
+ type: string;
819
+ user_tags: never[];
820
+ };
821
+ halfMotor: {
822
+ callables: string[];
823
+ id: string;
824
+ name: string;
825
+ online: boolean;
826
+ properties: {
827
+ offset: number;
828
+ sign: number;
829
+ acceleration: number;
830
+ limits: number[];
831
+ position: number;
832
+ state: string[];
833
+ tolerance: number;
834
+ unit: string;
835
+ velocity: number;
836
+ };
837
+ protocol: string;
838
+ require_staff: boolean;
839
+ type: string;
840
+ user_tags: never[];
841
+ };
842
+ unknownMotor: {
843
+ callables: string[];
844
+ id: string;
845
+ name: string;
846
+ online: boolean;
847
+ properties: {
848
+ acceleration: null;
849
+ limits: null[];
850
+ offset: null;
851
+ position: number;
852
+ sign: null;
853
+ state: string[];
854
+ target: null;
855
+ tolerance: number;
856
+ unit: string;
857
+ velocity: null;
858
+ };
859
+ protocol: string;
860
+ require_staff: boolean;
861
+ type: string;
862
+ user_tags: never[];
863
+ };
864
+ notReadyMotor: {
865
+ callables: string[];
866
+ id: string;
867
+ name: string;
868
+ online: boolean;
869
+ properties: {
870
+ acceleration: null;
871
+ limits: null[];
872
+ offset: null;
873
+ position: number;
874
+ sign: null;
875
+ state: never[];
876
+ target: null;
877
+ tolerance: number;
878
+ unit: string;
879
+ velocity: null;
880
+ };
881
+ protocol: string;
882
+ require_staff: boolean;
883
+ type: string;
884
+ user_tags: never[];
885
+ };
886
+ disconnectedMotor: {
887
+ callables: string[];
888
+ id: string;
889
+ name: string;
890
+ online: boolean;
891
+ properties: {};
892
+ protocol: string;
893
+ require_staff: boolean;
894
+ type: string;
895
+ user_tags: never[];
896
+ };
897
+ powerOffMotor: {
898
+ callables: string[];
899
+ id: string;
900
+ name: string;
901
+ online: boolean;
902
+ properties: {
903
+ acceleration: null;
904
+ limits: null[];
905
+ offset: null;
906
+ position: number;
907
+ sign: null;
908
+ state: string[];
909
+ target: null;
910
+ tolerance: number;
911
+ unit: string;
912
+ velocity: null;
913
+ };
914
+ protocol: string;
915
+ require_staff: boolean;
916
+ type: string;
917
+ user_tags: never[];
918
+ };
919
+ };
920
+
921
+ declare function createMotorMock(name: string, position: number): {
922
+ id: string;
923
+ name: string;
924
+ type: string;
925
+ properties: {
926
+ position: number;
927
+ unit: string;
928
+ limits: number[];
929
+ };
930
+ online: boolean;
931
+ };
932
+
933
+ interface Props$d {
934
+ minLimit?: number;
935
+ maxLimit?: number;
936
+ initialPosition?: number;
937
+ initialVelocity?: number;
938
+ children: ReactChild | ReactChild[];
939
+ }
940
+ declare function Motor(props: Props$d): JSX.Element;
941
+
185
942
  interface MultipositionSchema extends Hardware {
186
943
  properties: {
187
944
  position: string;
@@ -197,27 +954,224 @@ interface MultipositionSchema extends Hardware {
197
954
  state: string;
198
955
  };
199
956
  }
957
+ declare const Variants$f: HardwareVariant<MultipositionSchema>;
200
958
 
201
959
  declare function Multiposition(props: HardwareWidgetProps<MultipositionSchema>): JSX.Element;
202
960
 
203
- interface GenericSchema extends Hardware {
961
+ declare const Mocks$b: {
962
+ default: {
963
+ callables: string[];
964
+ id: string;
965
+ name: string;
966
+ online: boolean;
967
+ properties: {
968
+ position: string;
969
+ positions: {
970
+ description: string;
971
+ position: string;
972
+ target: {
973
+ destination: number;
974
+ tolerance: number;
975
+ }[];
976
+ }[];
977
+ state: string;
978
+ };
979
+ protocol: string;
980
+ require_staff: boolean;
981
+ type: string;
982
+ };
983
+ };
984
+
985
+ /**
986
+ * Hardware as exposed by Redux
987
+ */
988
+ interface OpticSchema extends Hardware {
204
989
  properties: {
205
990
  state: string;
991
+ magnification: number;
992
+ available_magnifications: number[];
993
+ target_magnification: number;
994
+ magnification_range: [number, number] | null;
206
995
  };
207
996
  }
997
+ declare function isOpticHardware(entity: Hardware): entity is OpticSchema;
998
+ declare const Variants$e: HardwareVariant<OpticSchema>;
208
999
 
209
- type schema_d_GenericSchema = GenericSchema;
210
- declare namespace schema_d {
211
- export type { schema_d_GenericSchema as GenericSchema };
1000
+ interface OpticWidgetOptions extends HardwareWidgetOptions {
1001
+ readonly?: boolean;
1002
+ digits?: number;
1003
+ allowtuning?: boolean;
212
1004
  }
1005
+ declare function Optic(props: HardwareWidgetProps<OpticSchema, OpticWidgetOptions>): JSX.Element;
213
1006
 
214
- interface PropertyWidgetOptions extends HardwareWidgetOptions {
215
- header?: string;
216
- property?: string;
217
- unit?: string;
1007
+ declare function OpticState(props: {
1008
+ hardware: OpticSchema;
1009
+ }): JSX.Element;
1010
+
1011
+ declare const Mocks$a: {
1012
+ default: {
1013
+ callables: string[];
1014
+ id: string;
1015
+ name: string;
1016
+ online: boolean;
1017
+ properties: {
1018
+ state: string;
1019
+ status: string;
1020
+ magnification: number;
1021
+ target_magnification: null;
1022
+ available_magnifications: number[];
1023
+ magnification_range: null;
1024
+ };
1025
+ protocol: string;
1026
+ require_staff: boolean;
1027
+ type: string;
1028
+ };
1029
+ fixed: {
1030
+ callables: string[];
1031
+ id: string;
1032
+ name: string;
1033
+ online: boolean;
1034
+ properties: {
1035
+ state: string;
1036
+ status: string;
1037
+ magnification: number;
1038
+ target_magnification: null;
1039
+ available_magnifications: number[];
1040
+ magnification_range: null;
1041
+ };
1042
+ protocol: string;
1043
+ require_staff: boolean;
1044
+ type: string;
1045
+ };
1046
+ off: {
1047
+ callables: string[];
1048
+ id: string;
1049
+ name: string;
1050
+ online: boolean;
1051
+ properties: {
1052
+ state: string;
1053
+ status: string;
1054
+ magnification: number;
1055
+ target_magnification: null;
1056
+ available_magnifications: number[];
1057
+ magnification_range: null;
1058
+ };
1059
+ protocol: string;
1060
+ require_staff: boolean;
1061
+ type: string;
1062
+ };
1063
+ range: {
1064
+ callables: string[];
1065
+ id: string;
1066
+ name: string;
1067
+ online: boolean;
1068
+ properties: {
1069
+ state: string;
1070
+ status: string;
1071
+ magnification: number;
1072
+ target_magnification: null;
1073
+ available_magnifications: number[];
1074
+ magnification_range: null;
1075
+ };
1076
+ protocol: string;
1077
+ require_staff: boolean;
1078
+ type: string;
1079
+ };
1080
+ };
1081
+
1082
+ interface ProcedureSchema extends Hardware {
1083
+ properties: {
1084
+ state: string;
1085
+ previous_run_state: string;
1086
+ previous_run_exception: string | null;
1087
+ parameters: Record<string, any>;
1088
+ };
218
1089
  }
1090
+ declare const Variants$d: HardwareVariant<ProcedureSchema>;
219
1091
 
220
- declare function Property(props: HardwareWidgetProps<GenericSchema, PropertyWidgetOptions>): JSX.Element;
1092
+ interface HardwareFromProcedure {
1093
+ __type__: 'hardware';
1094
+ name: string;
1095
+ }
1096
+ interface ScanFromProcedure {
1097
+ __type__: 'scan';
1098
+ mmh3: number;
1099
+ node?: string;
1100
+ key?: string;
1101
+ }
1102
+ interface ExceptionFromProcedure {
1103
+ __type__: 'exception';
1104
+ class: string;
1105
+ message: string;
1106
+ traceback: Record<string, any>;
1107
+ }
1108
+
1109
+ declare function ProcedureExecution(props: HardwareWidgetProps<ProcedureSchema>): JSX.Element;
1110
+
1111
+ declare function ProcedureManage(props: HardwareWidgetProps<ProcedureSchema>): JSX.Element;
1112
+
1113
+ declare function ProcedureValidate(props: HardwareWidgetProps<ProcedureSchema>): JSX.Element;
1114
+
1115
+ declare function ProcedureState(props: {
1116
+ hardware: ProcedureSchema;
1117
+ }): JSX.Element;
1118
+
1119
+ declare const Mocks$9: {
1120
+ standby: {
1121
+ callables: string[];
1122
+ type: string;
1123
+ id: string;
1124
+ name: string;
1125
+ protocol: string;
1126
+ require_staff: boolean;
1127
+ online: boolean;
1128
+ properties: {
1129
+ state: string;
1130
+ previous_run_state: string;
1131
+ previous_run_exception: null;
1132
+ parameters: {
1133
+ my_number: number;
1134
+ my_string: string;
1135
+ my_null: null;
1136
+ my_boolean: boolean;
1137
+ my_dict: {
1138
+ a: number;
1139
+ b: string;
1140
+ c: boolean;
1141
+ };
1142
+ my_list: (string | number | boolean)[];
1143
+ "my_scan_1.11": {
1144
+ __type__: string;
1145
+ node: string;
1146
+ mmh3: number;
1147
+ };
1148
+ "my_scan_2.0": {
1149
+ __type__: string;
1150
+ key: string;
1151
+ mmh3: number;
1152
+ };
1153
+ my_quantity: {
1154
+ __type__: string;
1155
+ scalar: number;
1156
+ unit: string;
1157
+ };
1158
+ my_nan: {
1159
+ __type__: string;
1160
+ };
1161
+ my_posinf: {
1162
+ __type__: string;
1163
+ };
1164
+ my_neginf: {
1165
+ __type__: string;
1166
+ };
1167
+ my_obj: {
1168
+ __type__: string;
1169
+ name: string;
1170
+ };
1171
+ };
1172
+ };
1173
+ };
1174
+ };
221
1175
 
222
1176
  interface ShutterSchema extends Hardware {
223
1177
  properties: {
@@ -228,14 +1182,437 @@ interface ShutterSchema extends Hardware {
228
1182
  closed_text: string;
229
1183
  };
230
1184
  }
1185
+ declare const Variants$c: HardwareVariant<ShutterSchema>;
231
1186
 
232
1187
  declare function ShutterDefault(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): JSX.Element;
233
1188
 
1189
+ declare function ShutterProtected(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): JSX.Element;
1190
+
234
1191
  declare function ShutterState(props: {
235
1192
  hardware: ShutterSchema;
236
1193
  useReadyState?: boolean;
237
1194
  }): JSX.Element;
238
1195
 
1196
+ declare const Mocks$8: {
1197
+ default: {
1198
+ callables: string[];
1199
+ id: string;
1200
+ name: string;
1201
+ online: boolean;
1202
+ properties: {
1203
+ closed_text: string;
1204
+ open_text: string;
1205
+ state: string;
1206
+ status: string;
1207
+ valid: boolean;
1208
+ };
1209
+ protocol: string;
1210
+ require_staff: boolean;
1211
+ type: string;
1212
+ };
1213
+ };
1214
+
1215
+ /**
1216
+ * Hardware as exposed by Redux
1217
+ */
1218
+ interface PumpSchema extends Hardware {
1219
+ properties: {
1220
+ state: string;
1221
+ status: string;
1222
+ pressure: number;
1223
+ voltage: number;
1224
+ current: number;
1225
+ unit?: string;
1226
+ };
1227
+ }
1228
+ declare const Variants$b: HardwareVariant<PumpSchema>;
1229
+
1230
+ interface PumpWidgetOptions extends HardwareWidgetOptions {
1231
+ unit?: string;
1232
+ precision?: number;
1233
+ }
1234
+ declare function Pump(props: HardwareWidgetProps<PumpSchema, PumpWidgetOptions>): JSX.Element;
1235
+
1236
+ declare const Mocks$7: {
1237
+ default: {
1238
+ callables: string[];
1239
+ id: string;
1240
+ name: string;
1241
+ online: boolean;
1242
+ properties: {
1243
+ current: number;
1244
+ pressure: number;
1245
+ state: string;
1246
+ status: string;
1247
+ voltage: number;
1248
+ };
1249
+ protocol: string;
1250
+ require_staff: boolean;
1251
+ type: string;
1252
+ };
1253
+ };
1254
+
1255
+ /**
1256
+ * Hardware as exposed by Redux
1257
+ */
1258
+ interface PusherSchema extends Hardware {
1259
+ properties: {
1260
+ state: string;
1261
+ };
1262
+ }
1263
+ declare const Variants$a: HardwareVariant<PusherSchema>;
1264
+
1265
+ declare function Pusher(props: HardwareWidgetProps<PusherSchema, HardwareWidgetOptions>): JSX.Element;
1266
+
1267
+ declare function PusherState(props: {
1268
+ hardware: PusherSchema;
1269
+ }): JSX.Element;
1270
+
1271
+ declare const Mocks$6: {
1272
+ default: {
1273
+ callables: string[];
1274
+ id: string;
1275
+ name: string;
1276
+ online: boolean;
1277
+ properties: {
1278
+ state: string;
1279
+ };
1280
+ protocol: string;
1281
+ require_staff: boolean;
1282
+ type: string;
1283
+ };
1284
+ };
1285
+
1286
+ /**
1287
+ * Hardware as exposed by Redux
1288
+ */
1289
+ interface ServiceSchema extends Hardware {
1290
+ properties: {
1291
+ state: 'STOPPED' | 'STARTING' | 'RUNNING' | 'BACKOFF' | 'STOPPING' | 'EXITED' | 'FATAL' | 'UNKNOWN';
1292
+ };
1293
+ }
1294
+ declare const Variants$9: HardwareVariant<ServiceSchema>;
1295
+
1296
+ declare function ServiceDefault(props: HardwareWidgetProps<ServiceSchema, HardwareWidgetOptions>): JSX.Element;
1297
+
1298
+ interface ServiceProectedOptions extends HardwareWidgetOptions {
1299
+ /** Direction to drop the menu */
1300
+ dropDirection?: string;
1301
+ }
1302
+ declare function ServiceProtected(props: HardwareWidgetProps<ServiceSchema, ServiceProectedOptions>): JSX.Element;
1303
+
1304
+ declare function ServiceState(props: {
1305
+ hardware: ServiceSchema;
1306
+ }): JSX.Element;
1307
+
1308
+ declare const Mocks$5: {
1309
+ default: {
1310
+ callables: string[];
1311
+ id: string;
1312
+ name: string;
1313
+ online: boolean;
1314
+ properties: {
1315
+ state: string;
1316
+ };
1317
+ protocol: string;
1318
+ require_staff: boolean;
1319
+ type: string;
1320
+ };
1321
+ };
1322
+
1323
+ interface TomoFlatMotionStep {
1324
+ /** Axis reference, following the pattern `hardware:my_axis` */
1325
+ axisRef: string;
1326
+ absolute_position: number | null;
1327
+ relative_position: number | null;
1328
+ }
1329
+ /**
1330
+ * Hardware as exposed by Redux
1331
+ */
1332
+ interface TomoFlatMotionSchema extends Hardware {
1333
+ properties: {
1334
+ state: 'READY';
1335
+ available_axes: string[];
1336
+ motion: TomoFlatMotionStep[];
1337
+ move_in_parallel: boolean;
1338
+ power_onoff: boolean;
1339
+ settle_time: number;
1340
+ };
1341
+ }
1342
+ declare const Variants$8: HardwareVariant<TomoFlatMotionSchema>;
1343
+
1344
+ declare function isTomoFlatMotionHardware(entity: Hardware): entity is TomoFlatMotionSchema;
1345
+ declare function useTomoFlatMotionHardware(name: string | null): TomoFlatMotionSchema | null;
1346
+
1347
+ declare function TomoFlatMotionDefault(props: HardwareWidgetProps<TomoFlatMotionSchema>): JSX.Element;
1348
+
1349
+ declare function TomoFlatMotionSmall(props: HardwareWidgetProps<TomoFlatMotionSchema>): JSX.Element;
1350
+
1351
+ declare function TomoFlatMotionState(props: {
1352
+ hardware: TomoFlatMotionSchema;
1353
+ }): JSX.Element;
1354
+
1355
+ declare const Mocks$4: {
1356
+ default: {
1357
+ id: string;
1358
+ name: string;
1359
+ online: boolean;
1360
+ properties: {
1361
+ state: string;
1362
+ settle_time: number;
1363
+ power_onoff: boolean;
1364
+ move_in_parallel: boolean;
1365
+ available_axes: string[];
1366
+ motion: {
1367
+ axis: string;
1368
+ absolute_position: null;
1369
+ relative_position: number;
1370
+ }[];
1371
+ };
1372
+ protocol: string;
1373
+ require_staff: boolean;
1374
+ type: string;
1375
+ };
1376
+ };
1377
+
1378
+ /**
1379
+ * Hardware as exposed by Redux
1380
+ */
1381
+ interface TomoReferencePositionSchema extends Hardware {
1382
+ properties: Record<string, never>;
1383
+ }
1384
+ declare function isTomoReferencePositionHardware(entity: Hardware): entity is TomoReferencePositionSchema;
1385
+ declare const Variants$7: HardwareVariant<TomoReferencePositionSchema>;
1386
+
1387
+ declare function TomoReferencePositionDefault(props: HardwareWidgetProps<TomoReferencePositionSchema>): JSX.Element;
1388
+
1389
+ /**
1390
+ * Hardware as exposed by Redux
1391
+ */
1392
+ interface TomoDetectorSchema extends Hardware {
1393
+ properties: {
1394
+ state: string;
1395
+ user_sample_pixel_size: number | null;
1396
+ sample_pixel_size_mode: string;
1397
+ sample_pixel_size: number | null;
1398
+ field_of_view: number;
1399
+ detector: string;
1400
+ optic: string;
1401
+ source_distance: number | null;
1402
+ acq_mode: 'MANUAL' | 'SINGLE' | 'ACCUMULATION';
1403
+ };
1404
+ }
1405
+ declare const Variants$6: HardwareVariant<TomoDetectorSchema>;
1406
+
1407
+ declare function isTomoDetectorHardware(entity: Hardware): entity is TomoDetectorSchema;
1408
+ declare function useTomoDetectorHardware(name: string | null): TomoDetectorSchema | null;
1409
+
1410
+ declare function TomoDetectorAcquisitionMode(props: HardwareWidgetProps<TomoDetectorSchema, HardwareWidgetOptions>): JSX.Element;
1411
+
1412
+ interface TomoDetectorSamplePixelSizeOptions extends HardwareWidgetOptions {
1413
+ display_unit?: string | null;
1414
+ }
1415
+ declare function TomoDetectorSamplePixelSize(props: HardwareWidgetProps<TomoDetectorSchema, TomoDetectorSamplePixelSizeOptions>): JSX.Element;
1416
+
1417
+ declare function TomoDetectorState(props: {
1418
+ hardware: TomoDetectorSchema;
1419
+ }): JSX.Element;
1420
+
1421
+ declare const Mocks$3: {
1422
+ default: {
1423
+ id: string;
1424
+ name: string;
1425
+ online: boolean;
1426
+ properties: {
1427
+ state: string;
1428
+ actual_size: number[];
1429
+ sample_pixel_size_mode: string;
1430
+ user_sample_pixel_size: number;
1431
+ sample_pixel_size: number;
1432
+ };
1433
+ protocol: string;
1434
+ require_staff: boolean;
1435
+ type: string;
1436
+ };
1437
+ };
1438
+
1439
+ /**
1440
+ * Hardware as exposed by Redux
1441
+ */
1442
+ interface TomoDetectorsSchema extends Hardware {
1443
+ properties: {
1444
+ state: string;
1445
+ detectors: string[];
1446
+ active_detector: string;
1447
+ target_detector?: string;
1448
+ };
1449
+ }
1450
+ declare const Variants$5: HardwareVariant<TomoDetectorsSchema>;
1451
+
1452
+ declare function isTomoDetectorsHardware(entity: Hardware): entity is TomoDetectorsSchema;
1453
+ declare function useTomoDetectorsHardware(name: string | null): TomoDetectorsSchema | null;
1454
+
1455
+ declare function TomoDetectors(props: HardwareWidgetProps<TomoDetectorsSchema>): JSX.Element;
1456
+
1457
+ declare function TomoDetectorsState(props: {
1458
+ hardware: TomoDetectorsSchema;
1459
+ }): JSX.Element;
1460
+
1461
+ declare const Mocks$2: {
1462
+ default: {
1463
+ id: string;
1464
+ name: string;
1465
+ online: boolean;
1466
+ properties: {
1467
+ state: string;
1468
+ active_detector: string;
1469
+ detectors: string[];
1470
+ };
1471
+ protocol: string;
1472
+ require_staff: boolean;
1473
+ type: string;
1474
+ };
1475
+ };
1476
+
1477
+ /**
1478
+ * Hardware as exposed by Redux
1479
+ */
1480
+ interface TomoImagingSchema extends Hardware {
1481
+ properties: {
1482
+ state: string;
1483
+ update_on_move: boolean;
1484
+ exposure_time: number;
1485
+ settle_time: number;
1486
+ };
1487
+ }
1488
+ declare const Variants$4: HardwareVariant<TomoImagingSchema>;
1489
+
1490
+ declare function TomoImagingActions(props: HardwareWidgetProps<TomoImagingSchema>): JSX.Element;
1491
+
1492
+ declare function TomoImagingDefault(props: HardwareWidgetProps<TomoImagingSchema>): JSX.Element;
1493
+
1494
+ declare function TomoImagingExposureTime(props: HardwareWidgetProps<TomoImagingSchema>): JSX.Element;
1495
+
1496
+ declare function TomoImagingSettleTime(props: HardwareWidgetProps<TomoImagingSchema>): JSX.Element;
1497
+
1498
+ declare function TomoImagingUpdateMode(props: HardwareWidgetProps<TomoImagingSchema>): JSX.Element;
1499
+
1500
+ declare function TomoImagingState(props: {
1501
+ hardware: TomoImagingSchema;
1502
+ }): JSX.Element;
1503
+
1504
+ declare const Mocks$1: {
1505
+ default: {
1506
+ id: string;
1507
+ name: string;
1508
+ online: boolean;
1509
+ properties: {
1510
+ state: string;
1511
+ update_on_move: boolean;
1512
+ exposure_time: number;
1513
+ };
1514
+ protocol: string;
1515
+ require_staff: boolean;
1516
+ type: string;
1517
+ };
1518
+ };
1519
+
1520
+ /**
1521
+ * Hardware as exposed by Redux
1522
+ */
1523
+ interface TomoSampleStageSchema extends Hardware {
1524
+ properties: {
1525
+ sx: string;
1526
+ sy: string;
1527
+ sz: string;
1528
+ somega: string;
1529
+ sampx: string;
1530
+ sampy: string;
1531
+ sampu: string;
1532
+ sampv: string;
1533
+ x_axis_focal_pos: number | null;
1534
+ detector_center: [number | null, number | null];
1535
+ };
1536
+ }
1537
+ declare const Variants$3: HardwareVariant<TomoSampleStageSchema>;
1538
+
1539
+ declare function isTomoSampleStageHardware(entity: Hardware): entity is TomoSampleStageSchema;
1540
+ declare function useTomoSampleStageHardware(name: string | null): TomoSampleStageSchema | null;
1541
+
1542
+ /**
1543
+ * Hardware as exposed by Redux
1544
+ */
1545
+ interface TomoConfigSchema extends Hardware {
1546
+ properties: {
1547
+ sample_stage: string;
1548
+ sxbeam: string;
1549
+ detectors: string;
1550
+ holotomo: string;
1551
+ latency_time: number;
1552
+ };
1553
+ }
1554
+ declare const Variants$2: HardwareVariant<TomoConfigSchema>;
1555
+
1556
+ declare function isTomoConfigHardware(entity: Hardware): entity is TomoConfigSchema;
1557
+ declare function useTomoConfigHardware(name: string | null): TomoConfigSchema | null;
1558
+
1559
+ declare function TomoConfigLatencyTime(props: HardwareWidgetProps<TomoConfigSchema>): JSX.Element;
1560
+
1561
+ interface TomoHoloDistance {
1562
+ z1: number;
1563
+ position: number;
1564
+ pixel_size: number;
1565
+ }
1566
+ /**
1567
+ * Hardware as exposed by Redux
1568
+ */
1569
+ interface TomoHoloSchema extends Hardware {
1570
+ properties: {
1571
+ state: string;
1572
+ settle_time: number;
1573
+ pixel_size: number | null;
1574
+ nb_distances: number;
1575
+ distances: TomoHoloDistance[];
1576
+ };
1577
+ }
1578
+ declare const Variants$1: HardwareVariant<TomoHoloSchema>;
1579
+
1580
+ declare function isTomoHoloHardware(entity: Hardware): entity is TomoHoloSchema;
1581
+ declare function useTomoHoloHardware(name: string | null): TomoHoloSchema | null;
1582
+
1583
+ declare function TomoHoloState(props: {
1584
+ hardware: TomoHoloSchema;
1585
+ }): JSX.Element;
1586
+
1587
+ /**
1588
+ * Hardware as exposed by Redux
1589
+ */
1590
+ interface ValveSchema extends Hardware {
1591
+ properties: {
1592
+ state: string;
1593
+ status: string;
1594
+ };
1595
+ }
1596
+ declare const Variants: HardwareVariant<ValveSchema>;
1597
+
1598
+ declare function Valve(props: HardwareWidgetProps<ValveSchema>): JSX.Element;
1599
+
1600
+ declare const Mocks: {
1601
+ default: {
1602
+ callables: string[];
1603
+ id: string;
1604
+ name: string;
1605
+ online: boolean;
1606
+ properties: {
1607
+ state: string;
1608
+ status: string;
1609
+ };
1610
+ protocol: string;
1611
+ require_staff: boolean;
1612
+ type: string;
1613
+ };
1614
+ };
1615
+
239
1616
  interface Props$c {
240
1617
  online: boolean;
241
1618
  activeMessage?: string;
@@ -300,6 +1677,8 @@ declare function HardwareNumericStep(props: {
300
1677
  precision?: number;
301
1678
  /** Whether this widget is read only */
302
1679
  readOnly?: boolean;
1680
+ /** Whether this widget can only be changed using steps */
1681
+ stepOnly?: boolean;
303
1682
  /** Specify a fontawesome to inc the value */
304
1683
  incIcon?: string;
305
1684
  /** Specify a fontawesome to dec the value */
@@ -371,18 +1750,6 @@ declare namespace formatting_d {
371
1750
  export { formatting_d_formatEng as formatEng, formatting_d_round as round, formatting_d_toEnergy as toEnergy, formatting_d_toHoursMins as toHoursMins, formatting_d_ucfirst as ucfirst };
372
1751
  }
373
1752
 
374
- interface HardwareVariantOptions {
375
- options: {
376
- variant: string;
377
- };
378
- }
379
- declare class HardwareVariant extends Component<HardwareVariantOptions, void> {
380
- variants: {
381
- [name: string]: ComponentType<any>;
382
- };
383
- render(): JSX.Element;
384
- }
385
-
386
1753
  interface NoObjectProps {
387
1754
  id: string;
388
1755
  name?: string;
@@ -402,6 +1769,7 @@ interface Props$9 {
402
1769
  step?: number | string;
403
1770
  steps?: (number | string)[];
404
1771
  disabled: boolean;
1772
+ stepOnly?: boolean;
405
1773
  id?: string;
406
1774
  unit?: string;
407
1775
  overlay?: ReactChild | null;
@@ -667,6 +2035,12 @@ declare namespace asserts_d {
667
2035
  export { asserts_d_assertBoolean as assertBoolean, asserts_d_assertDataCollectionId as assertDataCollectionId, asserts_d_assertKeyExpected as assertKeyExpected, asserts_d_assertNoUnknownKeys as assertNoUnknownKeys, asserts_d_assertNumber as assertNumber, asserts_d_assertOptionalBackend as assertOptionalBackend, asserts_d_assertOptionalBoolean as assertOptionalBoolean, asserts_d_assertOptionalNumber as assertOptionalNumber, asserts_d_assertOptionalNumberList as assertOptionalNumberList, asserts_d_assertOptionalString as assertOptionalString, asserts_d_assertOptionalStringList as assertOptionalStringList, asserts_d_assertOptionalStringOrStringList as assertOptionalStringOrStringList, asserts_d_assertString as assertString, asserts_d_assertStringList as assertStringList };
668
2036
  }
669
2037
 
2038
+ interface RuntimeHooks {
2039
+ useHardware?: (id: string | null) => Hardware | null;
2040
+ useHardwareChangeActions?: (name: string | null) => HardwareChangeActions;
2041
+ }
2042
+ declare function registerRuntimeHook(hooks: Partial<RuntimeHooks>): void;
2043
+
670
2044
  interface HardwareObjectProps {
671
2045
  id: string;
672
2046
  options: {
@@ -684,15 +2058,11 @@ interface ResolvedHardwareObjectProps extends HardwareObjectProps {
684
2058
  runningScan?: boolean;
685
2059
  obj: Hardware | null;
686
2060
  }
687
- interface ComponentMapping {
688
- [name: string]: ComponentType<any> | typeof HardwareVariant;
689
- }
690
2061
 
691
- type HardwareObject_d_ComponentMapping = ComponentMapping;
692
2062
  type HardwareObject_d_HardwareObjectProps = HardwareObjectProps;
693
2063
  type HardwareObject_d_ResolvedHardwareObjectProps = ResolvedHardwareObjectProps;
694
2064
  declare namespace HardwareObject_d {
695
- export type { HardwareObject_d_ComponentMapping as ComponentMapping, HardwareObject_d_HardwareObjectProps as HardwareObjectProps, HardwareObject_d_ResolvedHardwareObjectProps as ResolvedHardwareObjectProps };
2065
+ export type { HardwareObject_d_HardwareObjectProps as HardwareObjectProps, HardwareObject_d_ResolvedHardwareObjectProps as ResolvedHardwareObjectProps };
696
2066
  }
697
2067
 
698
2068
  /**
@@ -710,7 +2080,6 @@ interface Monitor {
710
2080
  unit?: string;
711
2081
  }
712
2082
 
713
- declare function registerRuntimeHook(name: string, hook: (id: string | null) => Hardware | null): void;
714
2083
  declare const dynamicOp: (op: string, a1: any, b1: any) => boolean | undefined;
715
2084
  declare function MonitorHardware(props: {
716
2085
  monitor: Monitor;
@@ -727,4 +2096,4 @@ interface MonitorPanelItemProps {
727
2096
  }
728
2097
  declare function MonitorPanelItem(props: PropsWithChildren<MonitorPanelItemProps>): JSX.Element;
729
2098
 
730
- export { formatting_d as Formatting, Frontend, FullSizer, HardwareObject_d as HWObject, type Hardware, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, HardwareVariant, Info, type InfoOptions, KeyError, MissingKeysError, type Monitor, MonitorHardware, MonitorPanel, MonitorPanelItem, type MonitorPanelProps, MotorDefault, type MotorDefaultOptions, type MotorSchema, MotorState, Multiposition, NoObject, NumericStep, Panel, Property, ShutterDefault, type ShutterSchema, ShutterState, TypeIcon, type Props$c as TypeIconOptions, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent$1 as YamlComponent, type YamlNode, dynamicOp, registerHardwareComponent, registerMonitorComponent, registerRuntimeHook, registerComponent as registerYamlComponent, registerComponents as registerYamlComponents, registerYamlType, renderYamlNode, yamlMap };
2099
+ export { type ActuatorSchema, AirBearing, Mocks$j as AirBearingMocks, AirBearingProtected, type AirBearingSchema, AirBearingState, Variants$n as AirBearingVariants, type AnySchema, Info as BaseInfo, type BaseInfoWidgetOptions, Mocks$k as BaseMocks, Name as BaseName, type BaseNameWidgetOptions, Property as BaseProperty, type BasePropertyWidgetOptions, DefaultState as BaseState, Variants$o as BaseVariants, type ExceptionFromProcedure, formatting_d as Formatting, Frontend, Mocks$i as FrontendMocks, type FrontendSchema, Variants$m as FrontendVariants, FullSizer, Gauge, Mocks$h as GaugeMocks, type GaugeSchema, Variants$l as GaugeVariants, type GaugeWidgetOptions, type GenericSchema, HardwareObject_d as HWObject, type Hardware, type HardwareComponentType, type HardwareFromProcedure, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, type HardwareVariant, KeyError, Laser, LaserHeating, Mocks$f as LaserHeatingMocks, type LaserHeatingSchema, Variants$j as LaserHeatingVariants, type LaserHeatingWidgetOptions, Mocks$g as LaserMocks, type LaserSchema, Variants$k as LaserVariants, type LaserWidgetOptions, Light, Mocks$e as LightMocks, type LightSchema, Variants$i as LightVariants, LimaBinning, LimaDefault, TomoDetectorSize$3 as LimaDescription, TomoDetectorSize$2 as LimaImageRoi, Mocks$d as LimaMocks, type LimaSchema, TomoDetectorSize$1 as LimaSize, LimaState, TomoDetectorSize as LimaTransformation, Variants$h as LimaVariants, type MeasurementGroupSchema, MissingKeysError, Motor as MockMotor, type Monitor, MonitorHardware, MonitorPanel, MonitorPanelItem, type MonitorPanelProps, MotorDefault, type MotorDefaultOptions, Mocks$c as MotorMocks, type MotorSchema, MotorState, MotorText, Variants$g as MotorVariants, Multiposition, Mocks$b as MultipositionMocks, type MultipositionSchema, Variants$f as MultipositionVariants, NoObject, NumericStep, Optic as OpticDefault, Mocks$a as OpticMocks, type OpticSchema, OpticState, Variants$e as OpticVariants, type OpticWidgetOptions, Panel, ProcedureExecution, ProcedureManage, Mocks$9 as ProcedureMocks, type ProcedureSchema, ProcedureState, ProcedureValidate, Variants$d as ProcedureVariants, Pump as PumpDefault, Mocks$7 as PumpMocks, type PumpSchema, Variants$b as PumpVariants, Pusher as PusherDefault, Mocks$6 as PusherMocks, type PusherSchema, PusherState, Variants$a as PusherVariants, type ScanFromProcedure, ServiceDefault, Mocks$5 as ServiceMocks, ServiceProtected, type ServiceSchema, ServiceState, Variants$9 as ServiceVariants, ShutterDefault, Mocks$8 as ShutterMocks, ShutterProtected, type ShutterSchema, ShutterState, Variants$c as ShutterVariants, TomoConfigLatencyTime, type TomoConfigSchema, Variants$2 as TomoConfigVariants, TomoDetectorAcquisitionMode, Mocks$3 as TomoDetectorMocks, TomoDetectorSamplePixelSize, type TomoDetectorSchema, TomoDetectorState, Variants$6 as TomoDetectorVariants, TomoDetectors as TomoDetectorsDefault, Mocks$2 as TomoDetectorsMocks, type TomoDetectorsSchema, TomoDetectorsState, Variants$5 as TomoDetectorsVariants, TomoFlatMotionDefault, Mocks$4 as TomoFlatMotionMocks, type TomoFlatMotionSchema, TomoFlatMotionSmall, TomoFlatMotionState, type TomoFlatMotionStep, Variants$8 as TomoFlatMotionVariants, type TomoHoloDistance, type TomoHoloSchema, TomoHoloState, Variants$1 as TomoHoloVariants, TomoImagingActions, TomoImagingDefault, TomoImagingExposureTime, Mocks$1 as TomoImagingMocks, type TomoImagingSchema, TomoImagingSettleTime, TomoImagingState, TomoImagingUpdateMode, Variants$4 as TomoImagingVariants, TomoReferencePositionDefault, type TomoReferencePositionSchema, Variants$7 as TomoReferencePositionVariants, type TomoSampleStageSchema, Variants$3 as TomoSampleStageVariants, TypeIcon, type Props$c as TypeIconOptions, Valve as ValveDefault, Mocks as ValveMocks, type ValveSchema, Variants as ValveVariants, Wrapper, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent$1 as YamlComponent, type YamlNode, createMotorMock, dynamicOp, isLimaHardware, isMotorHardware, isOpticHardware, isTomoConfigHardware, isTomoDetectorHardware, isTomoDetectorsHardware, isTomoFlatMotionHardware, isTomoHoloHardware, isTomoReferencePositionHardware, isTomoSampleStageHardware, limaGuessSubframes, registerHardwareComponent, registerMonitorComponent, registerRuntimeHook, registerComponent as registerYamlComponent, registerComponents as registerYamlComponents, registerYamlType, renderYamlNode, useLimaHardware, useMotorHardware, useMotorStates, useTomoConfigHardware, useTomoDetectorHardware, useTomoDetectorsHardware, useTomoFlatMotionHardware, useTomoHoloHardware, useTomoSampleStageHardware, yamlMap };