@esrf/daiquiri-lib 5.7.0 → 5.7.2

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.
@@ -0,0 +1,2989 @@
1
+ import { JSONSchema7 } from 'json-schema';
2
+ import * as react from 'react';
3
+ import react__default, { ComponentType, ReactElement, PropsWithChildren, ReactNode, ChangeEvent, KeyboardEvent, Component } from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+
6
+ interface HardwareError {
7
+ property: string;
8
+ exception: string;
9
+ traceback: string;
10
+ }
11
+ interface HardwareSchemaDescription {
12
+ properties: JSONSchema7;
13
+ callables: JSONSchema7;
14
+ }
15
+ interface LockDescription {
16
+ /**
17
+ * A unique key for identification purpose.
18
+ *
19
+ * It actually mangles BLISS object id, role,
20
+ * and PID of the owner process.
21
+ *
22
+ * For example `srot_move,pid:26567`
23
+ *
24
+ * In the future this will be split into meaningful information.
25
+ */
26
+ reason: string;
27
+ }
28
+ interface BaseHardware<O = boolean, P extends Record<string, any> = Record<string, never>> {
29
+ /** Object name */
30
+ name: string;
31
+ /** Object id */
32
+ id: string;
33
+ /** An optional object alias */
34
+ alias: string | null;
35
+ /** A list of user tags */
36
+ user_tags: string[];
37
+ /** The object properties as defined in the relevant schema */
38
+ properties: P;
39
+ /** Whether the device is available */
40
+ online: O;
41
+ /** The reason why the hardware is locked, else null */
42
+ locked: LockDescription | null;
43
+ /** The object type as defined by the REST API */
44
+ type: string;
45
+ /** Any potential errors initialising this object */
46
+ errors?: HardwareError[];
47
+ }
48
+ type OnlineHardware<P extends Record<string, any> = Record<string, never>> = BaseHardware<true, P>;
49
+ type OfflineHardware = BaseHardware<false, Record<string, never>>;
50
+ type Hardware<P extends Record<string, unknown> = Record<string, any>> = OnlineHardware<P> | OfflineHardware;
51
+ type AnyHardware = Hardware<any>;
52
+ interface HardwareChangeActions {
53
+ setProperty: (name: string, value: any) => Promise<void>;
54
+ call: (name: string, ...args: any[]) => Promise<void>;
55
+ }
56
+ /**
57
+ * Common options exposed to user as yaml configuration for hardware widgets
58
+ */
59
+ interface HardwareWidgetOptions {
60
+ /** Whether to show the extended popup */
61
+ extended?: boolean;
62
+ /** Kind of header displayed */
63
+ header?: string;
64
+ }
65
+ /**
66
+ * Common options exposed to user as yaml configuration for editable hardware widgets
67
+ */
68
+ interface EditableHardwareWidgetOptions extends HardwareWidgetOptions {
69
+ /** Disable edition for an editable widget */
70
+ readonly?: boolean;
71
+ }
72
+ type EditableHardware<H extends Hardware = Hardware> = H & {
73
+ /** Call the API to make a change on the hardware object */
74
+ actions: HardwareChangeActions;
75
+ };
76
+ /**
77
+ * Properties which are passed to the widgets
78
+ */
79
+ interface HardwareWidgetProps<H extends Hardware = Hardware, O extends HardwareWidgetOptions = HardwareWidgetOptions> {
80
+ /** Dynamic state of the hardware */
81
+ hardware: EditableHardware<H>;
82
+ /** Options passed to the widget by the yaml configuration */
83
+ options: O;
84
+ /** Global state of the widget (aggregating scan/operator/hardware states) */
85
+ disabled: boolean;
86
+ /** True if the session have the control */
87
+ operator: boolean;
88
+ }
89
+ /**
90
+ * Options propagated from the monitor yaml description.
91
+ *
92
+ * It is used for the monitor defined by the hardware.
93
+ *
94
+ * FIXME: Rework the hardware variant variants to specialize
95
+ * and drop HardwareWidgetOptions.
96
+ */
97
+ interface HardwareMonitorOptions extends HardwareWidgetOptions {
98
+ /**
99
+ * Override the name of the hardware.
100
+ */
101
+ name?: string;
102
+ }
103
+ type HardwareComponentType<H extends Hardware = Hardware> = ComponentType<HardwareWidgetProps<H, any>>;
104
+ interface HardwareVariant<H extends Hardware = Hardware> {
105
+ [name: string]: HardwareComponentType<H>;
106
+ }
107
+ /**
108
+ * Bundles everything a hardware module exposes: its widget
109
+ * variants, plus optional mocks/simulator/monitor.
110
+ */
111
+ interface HardwareDesc<H extends Hardware = Hardware> {
112
+ /** Widget variants, keyed by variant name */
113
+ variants: HardwareVariant<H>;
114
+ /** Static mock data samples used for documentation */
115
+ mocks?: Record<string, unknown>;
116
+ /** Component emulating live hardware, for tests/demo */
117
+ simulator?: ComponentType<any>;
118
+ /** Monitor panel widget override */
119
+ monitor?: HardwareComponentType<H>;
120
+ }
121
+ /**
122
+ * Props accepted by a hardware widget container
123
+ */
124
+ interface HardwareObjectProps {
125
+ /** Hardware id to bind to. */
126
+ id: string;
127
+ options: {
128
+ /** Hardware variant used for the widget container. */
129
+ variant?: string;
130
+ /** Header text shown above the hardware widget. */
131
+ header?: string;
132
+ /** Width, in pixels, of the widget container. */
133
+ width?: number;
134
+ /** Bootstrap column width (1-12) of the widget container. */
135
+ colWidth?: number;
136
+ /** If true, don't render anything when the underlying value is empty/none. */
137
+ emptyifnone?: boolean;
138
+ };
139
+ propertiesSchema?: Record<string, unknown>;
140
+ callablesSchema?: Record<string, unknown>;
141
+ }
142
+
143
+ type types_d_AnyHardware = AnyHardware;
144
+ type types_d_BaseHardware<O = boolean, P extends Record<string, any> = Record<string, never>> = BaseHardware<O, P>;
145
+ type types_d_EditableHardware<H extends Hardware = Hardware> = EditableHardware<H>;
146
+ type types_d_EditableHardwareWidgetOptions = EditableHardwareWidgetOptions;
147
+ type types_d_Hardware<P extends Record<string, unknown> = Record<string, any>> = Hardware<P>;
148
+ type types_d_HardwareChangeActions = HardwareChangeActions;
149
+ type types_d_HardwareComponentType<H extends Hardware = Hardware> = HardwareComponentType<H>;
150
+ type types_d_HardwareDesc<H extends Hardware = Hardware> = HardwareDesc<H>;
151
+ type types_d_HardwareMonitorOptions = HardwareMonitorOptions;
152
+ type types_d_HardwareObjectProps = HardwareObjectProps;
153
+ type types_d_HardwareSchemaDescription = HardwareSchemaDescription;
154
+ type types_d_HardwareVariant<H extends Hardware = Hardware> = HardwareVariant<H>;
155
+ type types_d_HardwareWidgetOptions = HardwareWidgetOptions;
156
+ type types_d_HardwareWidgetProps<H extends Hardware = Hardware, O extends HardwareWidgetOptions = HardwareWidgetOptions> = HardwareWidgetProps<H, O>;
157
+ type types_d_LockDescription = LockDescription;
158
+ type types_d_OfflineHardware = OfflineHardware;
159
+ type types_d_OnlineHardware<P extends Record<string, any> = Record<string, never>> = OnlineHardware<P>;
160
+ declare namespace types_d {
161
+ export type { types_d_AnyHardware as AnyHardware, types_d_BaseHardware as BaseHardware, types_d_EditableHardware as EditableHardware, types_d_EditableHardwareWidgetOptions as EditableHardwareWidgetOptions, types_d_Hardware as Hardware, types_d_HardwareChangeActions as HardwareChangeActions, types_d_HardwareComponentType as HardwareComponentType, types_d_HardwareDesc as HardwareDesc, types_d_HardwareMonitorOptions as HardwareMonitorOptions, types_d_HardwareObjectProps as HardwareObjectProps, types_d_HardwareSchemaDescription as HardwareSchemaDescription, types_d_HardwareVariant as HardwareVariant, types_d_HardwareWidgetOptions as HardwareWidgetOptions, types_d_HardwareWidgetProps as HardwareWidgetProps, types_d_LockDescription as LockDescription, types_d_OfflineHardware as OfflineHardware, types_d_OnlineHardware as OnlineHardware };
162
+ }
163
+
164
+ /**
165
+ * Guess the hardware have a state
166
+ *
167
+ * FIXME: This should be dropped.
168
+ */
169
+ type GenericSchema = Hardware<{
170
+ state: string;
171
+ }>;
172
+ type AnySchema = AnyHardware;
173
+
174
+ type schema_d_AnySchema = AnySchema;
175
+ type schema_d_GenericSchema = GenericSchema;
176
+ declare namespace schema_d {
177
+ export type { schema_d_AnySchema as AnySchema, schema_d_GenericSchema as GenericSchema };
178
+ }
179
+
180
+ declare const BaseHardwareDesc: HardwareDesc<AnySchema>;
181
+
182
+ declare const Mocks$q: {
183
+ default: {
184
+ response: {
185
+ callables: never[];
186
+ id: string;
187
+ name: string;
188
+ online: boolean;
189
+ properties: {
190
+ number: number;
191
+ option: string;
192
+ state: string;
193
+ string: string;
194
+ };
195
+ protocol: string;
196
+ require_staff: boolean;
197
+ type: string;
198
+ };
199
+ schema: {
200
+ $ref: string;
201
+ $schema: string;
202
+ asyncValidate: boolean;
203
+ cache: boolean;
204
+ definitions: {
205
+ HWTestSchema: {
206
+ additionalProperties: boolean;
207
+ properties: {
208
+ callables: {
209
+ $ref: string;
210
+ type: string;
211
+ };
212
+ id: {
213
+ title: string;
214
+ type: string;
215
+ };
216
+ name: {
217
+ title: string;
218
+ type: string;
219
+ };
220
+ online: {
221
+ title: string;
222
+ type: string;
223
+ };
224
+ properties: {
225
+ $ref: string;
226
+ type: string;
227
+ };
228
+ protocol: {
229
+ title: string;
230
+ type: string;
231
+ };
232
+ require_staff: {
233
+ title: string;
234
+ type: string;
235
+ };
236
+ type: {
237
+ title: string;
238
+ type: string;
239
+ };
240
+ };
241
+ type: string;
242
+ };
243
+ HardwareSchema: {
244
+ additionalProperties: boolean;
245
+ cache: boolean;
246
+ properties: {};
247
+ type: string;
248
+ };
249
+ TestPropertiesSchema: {
250
+ additionalProperties: boolean;
251
+ cache: boolean;
252
+ properties: {
253
+ number: {
254
+ format: string;
255
+ title: string;
256
+ type: string;
257
+ };
258
+ option: {
259
+ enum: string[];
260
+ enumNames: never[];
261
+ title: string;
262
+ type: string;
263
+ };
264
+ state: {
265
+ enum: string[];
266
+ enumNames: never[];
267
+ readOnly: boolean;
268
+ title: string;
269
+ type: string;
270
+ };
271
+ string: {
272
+ title: string;
273
+ type: string;
274
+ };
275
+ };
276
+ type: string;
277
+ };
278
+ };
279
+ save_presets: boolean;
280
+ };
281
+ };
282
+ };
283
+
284
+ declare function DefaultState$1(props: HardwareWidgetProps<AnySchema>): react_jsx_runtime.JSX.Element;
285
+
286
+ interface BaseNameWidgetOptions extends HardwareWidgetOptions {
287
+ overrideName?: string;
288
+ emptyifnone?: boolean;
289
+ }
290
+ declare function Name(props: HardwareWidgetProps<AnySchema, BaseNameWidgetOptions>): react_jsx_runtime.JSX.Element;
291
+
292
+ interface BasePropertyWidgetOptions extends HardwareWidgetOptions {
293
+ header?: string;
294
+ property?: string;
295
+ unit?: string;
296
+ }
297
+ declare function Property(props: HardwareWidgetProps<AnySchema, BasePropertyWidgetOptions>): react_jsx_runtime.JSX.Element;
298
+
299
+ interface BaseInfoWidgetOptions extends HardwareWidgetOptions {
300
+ /** The property */
301
+ property?: string;
302
+ /** Unit for the property */
303
+ unit?: string;
304
+ }
305
+ declare function Info(props: HardwareWidgetProps<AnySchema, BaseInfoWidgetOptions>): react_jsx_runtime.JSX.Element;
306
+
307
+ /**
308
+ * Hardware as exposed by Redux
309
+ */
310
+ type ActuatorSchema = Hardware<{
311
+ state: string;
312
+ }>;
313
+
314
+ /**
315
+ * Hardware as exposed by Redux
316
+ */
317
+ type AirBearingSchema = Hardware<{
318
+ state: string;
319
+ }>;
320
+ declare const AirBearingHardwareDesc: HardwareDesc<AirBearingSchema>;
321
+
322
+ declare function AirBearing(props: HardwareWidgetProps<AirBearingSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
323
+
324
+ declare function AirBearingProtected(props: HardwareWidgetProps<AirBearingSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
325
+
326
+ declare function AirBearingState(props: {
327
+ hardware: AirBearingSchema;
328
+ }): react_jsx_runtime.JSX.Element;
329
+
330
+ declare const Mocks$p: {
331
+ default: {
332
+ callables: string[];
333
+ id: string;
334
+ name: string;
335
+ online: boolean;
336
+ properties: {
337
+ state: string;
338
+ };
339
+ protocol: string;
340
+ require_staff: boolean;
341
+ type: string;
342
+ };
343
+ };
344
+
345
+ type PropsWithSimulator<P = Record<string, never>> = P & {
346
+ name: string;
347
+ alias?: string;
348
+ useHardwareContext?: () => {
349
+ actions: {
350
+ updateHardware: (name: string, hardware: Hardware) => void;
351
+ updateHardwareChangeActions: (name: string, actions: HardwareChangeActions) => void;
352
+ };
353
+ };
354
+ };
355
+
356
+ declare function AirBearingSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
357
+
358
+ /**
359
+ * Hardware as exposed by Redux
360
+ */
361
+ type BeamlineSchema = Hardware<{
362
+ mdt_mode: boolean;
363
+ }>;
364
+ declare const BeamlineHardwareDesc: HardwareDesc<BeamlineSchema>;
365
+
366
+ /**
367
+ * Hardware as exposed by Redux
368
+ */
369
+ type BeamviewerSchema = Hardware<{
370
+ /**
371
+ * Tango state of the Lima camera monitoring the beam
372
+ */
373
+ state: string;
374
+ foil: 'IN' | 'OUT' | 'NONE' | 'UNKNOWN';
375
+ led: 'ON' | 'OFF' | 'UNKNOWN';
376
+ screen: 'IN' | 'OUT' | 'UNKNOWN';
377
+ diode_ranges: string[];
378
+ diode_range: string;
379
+ }>;
380
+ declare const BeamviewerHardwareDesc: HardwareDesc<BeamviewerSchema>;
381
+
382
+ declare function Beamviewer(props: HardwareWidgetProps<BeamviewerSchema>): react_jsx_runtime.JSX.Element;
383
+
384
+ declare const Mocks$o: {
385
+ default: {
386
+ callables: string[];
387
+ id: string;
388
+ name: string;
389
+ online: boolean;
390
+ properties: {
391
+ diode_range: string;
392
+ diode_ranges: string[];
393
+ foil: string;
394
+ led: string;
395
+ screen: string;
396
+ state: string;
397
+ };
398
+ protocol: string;
399
+ require_staff: boolean;
400
+ type: string;
401
+ };
402
+ };
403
+
404
+ declare function BeamviewerSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
405
+
406
+ type EnergyManagerSchema = Hardware<{
407
+ energy: number | null;
408
+ unit: string;
409
+ available_source_names: string[];
410
+ source: string;
411
+ }>;
412
+ declare const EnergyManagerHardwareDesc: HardwareDesc<EnergyManagerSchema>;
413
+
414
+ declare function EnergyManagerDefault(props: HardwareWidgetProps<EnergyManagerSchema>): react_jsx_runtime.JSX.Element;
415
+
416
+ declare function EnergyManagerState(props: {
417
+ hardware: EnergyManagerSchema;
418
+ }): react_jsx_runtime.JSX.Element;
419
+
420
+ declare const Mocks$n: {
421
+ default: {
422
+ callables: never[];
423
+ id: string;
424
+ name: string;
425
+ online: boolean;
426
+ properties: {
427
+ energy: number;
428
+ unit: string;
429
+ available_source_names: string[];
430
+ source: string;
431
+ };
432
+ protocol: string;
433
+ require_staff: boolean;
434
+ type: string;
435
+ };
436
+ };
437
+
438
+ declare function EnergyManagerSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
439
+
440
+ interface FilterDescription {
441
+ name: string;
442
+ description: string;
443
+ state: 'IN' | 'OUT' | 'IN_OUT' | 'MOVING' | 'UNKNOWN';
444
+ }
445
+ type FiltersetStateType = 'READY' | 'MOVING' | 'DISABLED' | 'UNKNOWN' | 'OFFLINE' | 'FAULT';
446
+ type FiltersetSchema = Hardware<{
447
+ /**
448
+ * Actual state of the device.
449
+ *
450
+ * Can be READY and MOVING at the same time.
451
+ */
452
+ state: FiltersetStateType;
453
+ /**
454
+ * Human readable reason of the state
455
+ */
456
+ status?: string | null;
457
+ /**
458
+ * Actual state of the filters
459
+ */
460
+ filters: FilterDescription[];
461
+ }>;
462
+ declare const FiltersetHardwareDesc: HardwareDesc<FiltersetSchema>;
463
+
464
+ declare function FiltersetDefault(props: HardwareWidgetProps<FiltersetSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
465
+
466
+ declare function DefaultState(props: HardwareWidgetProps<FiltersetSchema>): react_jsx_runtime.JSX.Element;
467
+
468
+ declare const Mocks$m: {
469
+ default: {
470
+ callables: string[];
471
+ id: string;
472
+ name: string;
473
+ online: boolean;
474
+ properties: {
475
+ state: string;
476
+ status: string;
477
+ filters: {
478
+ name: string;
479
+ description: string;
480
+ state: string;
481
+ }[];
482
+ };
483
+ protocol: string;
484
+ require_staff: boolean;
485
+ type: string;
486
+ };
487
+ small: {
488
+ callables: string[];
489
+ id: string;
490
+ name: string;
491
+ online: boolean;
492
+ properties: {
493
+ state: string;
494
+ status: string;
495
+ filters: {
496
+ name: string;
497
+ description: string;
498
+ state: string;
499
+ }[];
500
+ };
501
+ protocol: string;
502
+ require_staff: boolean;
503
+ type: string;
504
+ };
505
+ };
506
+
507
+ declare function FiltersetSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
508
+
509
+ type FrontendSchema = Hardware<{
510
+ state: string;
511
+ status: string;
512
+ automatic: boolean;
513
+ frontend: string;
514
+ current: number;
515
+ refill: number;
516
+ mode: string;
517
+ message: string;
518
+ feitlk: string;
519
+ pssitlk: string;
520
+ expitlk: string;
521
+ }>;
522
+ declare const FrontendHardwareDesc: HardwareDesc<FrontendSchema>;
523
+
524
+ declare function Frontend(props: HardwareWidgetProps<FrontendSchema>): react_jsx_runtime.JSX.Element;
525
+
526
+ declare const Mocks$l: {
527
+ default: {
528
+ callables: string[];
529
+ id: string;
530
+ name: string;
531
+ online: boolean;
532
+ properties: {
533
+ current: number;
534
+ expitlk: string;
535
+ feitlk: string;
536
+ frontend: string;
537
+ pssitlk: string;
538
+ refill: number;
539
+ state: string;
540
+ mode: string;
541
+ message: string;
542
+ status: string;
543
+ };
544
+ protocol: string;
545
+ require_staff: boolean;
546
+ type: string;
547
+ };
548
+ };
549
+
550
+ /**
551
+ * Hardware as exposed by Redux
552
+ */
553
+ type GaugeSchema = Hardware<{
554
+ state: string;
555
+ status: string;
556
+ pressure: number;
557
+ unit?: string;
558
+ }>;
559
+ declare const GaugeHardwareDesc: HardwareDesc<GaugeSchema>;
560
+
561
+ interface GaugeWidgetOptions extends HardwareWidgetOptions {
562
+ /** Unit of pressure */
563
+ unit?: string;
564
+ /** Precision to show, default 3 */
565
+ precision?: number;
566
+ }
567
+ declare function Gauge$1(props: HardwareWidgetProps<GaugeSchema, GaugeWidgetOptions>): react_jsx_runtime.JSX.Element;
568
+
569
+ declare const Mocks$k: {
570
+ default: {
571
+ callables: string[];
572
+ id: string;
573
+ name: string;
574
+ online: boolean;
575
+ properties: {
576
+ pressure: number;
577
+ state: string;
578
+ status: string;
579
+ };
580
+ protocol: string;
581
+ require_staff: boolean;
582
+ type: string;
583
+ };
584
+ default2: {
585
+ callables: string[];
586
+ id: string;
587
+ name: string;
588
+ online: boolean;
589
+ properties: {
590
+ pressure: number;
591
+ state: string;
592
+ status: string;
593
+ };
594
+ protocol: string;
595
+ require_staff: boolean;
596
+ type: string;
597
+ };
598
+ };
599
+
600
+ /**
601
+ * Hardware as exposed by Redux
602
+ */
603
+ type LaserSchema = Hardware<{
604
+ state: string;
605
+ power: number;
606
+ }>;
607
+ declare const LaserHardwareDesc: HardwareDesc<LaserSchema>;
608
+
609
+ interface LaserWidgetOptions extends HardwareWidgetOptions {
610
+ /** Default step size to use for up / down arrows */
611
+ step?: number;
612
+ /** Array of selectable step sizes */
613
+ steps?: number[];
614
+ }
615
+ declare function Laser(props: HardwareWidgetProps<LaserSchema, LaserWidgetOptions>): react_jsx_runtime.JSX.Element;
616
+
617
+ declare const Mocks$j: {
618
+ default: {
619
+ callables: never[];
620
+ id: string;
621
+ name: string;
622
+ online: boolean;
623
+ properties: {
624
+ power: number;
625
+ state: string;
626
+ };
627
+ protocol: string;
628
+ require_staff: boolean;
629
+ type: string;
630
+ };
631
+ };
632
+
633
+ /**
634
+ * Hardware as exposed by Redux
635
+ */
636
+ type LaserHeatingSchema = Hardware<{
637
+ state: string;
638
+ exposure_time: number;
639
+ background_mode: 'ON' | 'OFF' | 'ALWAYS';
640
+ fit_wavelength: number[];
641
+ current_calibration: string;
642
+ }>;
643
+ declare const LaserHeatingHardwareDesc: HardwareDesc<LaserHeatingSchema>;
644
+
645
+ interface LaserHeatingWidgetOptions extends HardwareWidgetOptions {
646
+ /** Default step size to use for up / down arrows */
647
+ exposureStep?: number;
648
+ /** Array of selectable step sizes */
649
+ exposureSteps?: number[];
650
+ }
651
+ declare function LaserHeating(props: HardwareWidgetProps<LaserHeatingSchema, LaserHeatingWidgetOptions>): react_jsx_runtime.JSX.Element;
652
+
653
+ declare const Mocks$i: {
654
+ default: {
655
+ callables: never[];
656
+ id: string;
657
+ name: string;
658
+ online: boolean;
659
+ properties: {
660
+ exposure_time: number;
661
+ state: string;
662
+ background_mode: string;
663
+ fit_wavelength: number[];
664
+ current_calibration: string;
665
+ };
666
+ protocol: string;
667
+ require_staff: boolean;
668
+ type: string;
669
+ };
670
+ };
671
+
672
+ /**
673
+ * Hardware as exposed by Redux
674
+ */
675
+ type LightSchema = Hardware<{
676
+ state: string;
677
+ temperature: number;
678
+ intensity: number;
679
+ }>;
680
+ declare const LightHardwareDesc: HardwareDesc<LightSchema>;
681
+
682
+ declare function Light(props: HardwareWidgetProps<LightSchema>): react_jsx_runtime.JSX.Element;
683
+
684
+ declare const Mocks$h: {
685
+ default: {
686
+ callables: never[];
687
+ id: string;
688
+ name: string;
689
+ online: boolean;
690
+ properties: {
691
+ intensity: number;
692
+ state: string;
693
+ temperature: number;
694
+ };
695
+ protocol: string;
696
+ require_staff: boolean;
697
+ type: string;
698
+ };
699
+ };
700
+
701
+ interface LimaProperties extends Record<string, unknown> {
702
+ state: 'READY' | 'ACQUIRING' | 'CONFIGURATION' | 'FAULT' | 'UNKNOWN' | 'OFFLINE';
703
+ static: {
704
+ lima_version: string;
705
+ lima_type: string;
706
+ camera_type: string;
707
+ camera_model: string;
708
+ camera_pixelsize: [number, number];
709
+ image_max_dim: [number, number];
710
+ } | null;
711
+ /**
712
+ * Pixel size of the detector (without binning).
713
+ *
714
+ * It's a read-only property.
715
+ */
716
+ pixel_size: [number, number];
717
+ /**
718
+ * Max exposition time of a single sub frame in accumulation.
719
+ *
720
+ * It is used (together with the exposure time) to determine the
721
+ * nb of sub frames and the expo time of a single sub frame.
722
+ * See `guessSubframes`.
723
+ */
724
+ acc_max_expo_time: number | null;
725
+ /**
726
+ * Flip applied to the resulting image
727
+ */
728
+ flip: [boolean, boolean];
729
+ /**
730
+ * Rotation applied to the resulting image.
731
+ *
732
+ * One of 0, 90, 180, 270
733
+ */
734
+ rotation: 0 | 90 | 180 | 270;
735
+ /**
736
+ * Binning applied to the resulting image
737
+ */
738
+ binning: [number, number];
739
+ /**
740
+ * Binning mode applied to the resulting image
741
+ *
742
+ * Introduced in BLISS 2.3, Lima 1.10.4
743
+ */
744
+ binning_mode?: 'SUM' | 'MEAN';
745
+ /**
746
+ * Location and size of the ROI in the raw image.
747
+ *
748
+ * When binning=[1, 1] flip=[false, false], rotation=0
749
+ */
750
+ raw_roi: [number, number, number, number];
751
+ /**
752
+ * Location of the ROI in the transformed image.
753
+ */
754
+ roi: [number, number, number, number];
755
+ /**
756
+ * Final size of the detector. Including the crop of the ROI.
757
+ */
758
+ size: [number, number];
759
+ }
760
+ /**
761
+ * Hardware as exposed by Redux
762
+ */
763
+ type LimaSchema = Hardware<LimaProperties>;
764
+ declare function isLimaHardware(entity: Hardware): entity is LimaSchema;
765
+ declare function useLimaHardware(name: string | null): LimaSchema | null;
766
+ /**
767
+ * Compute the nb sub frames which will be used for a specific exposure time
768
+ */
769
+ declare function limaGuessSubframes(exposureTime: number, accMaxExpoTime: number): [number, number];
770
+ declare const LimaHardwareDesc: HardwareDesc<LimaSchema>;
771
+
772
+ declare function LimaBinning(props: HardwareWidgetProps<LimaSchema, EditableHardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
773
+
774
+ declare function LimaDefault(props: HardwareWidgetProps<LimaSchema>): react_jsx_runtime.JSX.Element;
775
+
776
+ declare function TomoDetectorSize$2(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
777
+
778
+ declare function TomoDetectorSize$1(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
779
+
780
+ declare function TomoDetectorSize(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
781
+
782
+ declare function LimaTransformation(props: HardwareWidgetProps<LimaSchema, EditableHardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
783
+
784
+ declare function LimaRoiShape(props: HardwareWidgetProps<LimaSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
785
+
786
+ declare function LimaState(props: {
787
+ hardware: LimaSchema;
788
+ }): react_jsx_runtime.JSX.Element;
789
+
790
+ declare const Mocks$g: {
791
+ default: {
792
+ id: string;
793
+ name: string;
794
+ protocol: string;
795
+ type: string;
796
+ online: boolean;
797
+ require_staff: boolean;
798
+ properties: {
799
+ static: {
800
+ lima_version: string;
801
+ lima_type: string;
802
+ camera_type: string;
803
+ camera_model: string;
804
+ camera_pixelsize: number[];
805
+ image_max_dim: number[];
806
+ };
807
+ acc_max_expo_time: number;
808
+ binning: number[];
809
+ flip: boolean[];
810
+ pixel_size: number[];
811
+ raw_roi: number[];
812
+ roi: number[];
813
+ rotation: number;
814
+ size: number[];
815
+ state: string;
816
+ };
817
+ };
818
+ flip: {
819
+ id: string;
820
+ name: string;
821
+ protocol: string;
822
+ type: string;
823
+ online: boolean;
824
+ require_staff: boolean;
825
+ properties: {
826
+ static: {
827
+ lima_version: string;
828
+ lima_type: string;
829
+ camera_type: string;
830
+ camera_model: string;
831
+ camera_pixelsize: number[];
832
+ image_max_dim: number[];
833
+ };
834
+ acc_max_expo_time: number;
835
+ binning: number[];
836
+ flip: boolean[];
837
+ pixel_size: number[];
838
+ raw_roi: number[];
839
+ roi: number[];
840
+ rotation: number;
841
+ size: number[];
842
+ state: string;
843
+ };
844
+ };
845
+ rot: {
846
+ id: string;
847
+ name: string;
848
+ protocol: string;
849
+ type: string;
850
+ online: boolean;
851
+ require_staff: boolean;
852
+ properties: {
853
+ static: {
854
+ lima_version: string;
855
+ lima_type: string;
856
+ camera_type: string;
857
+ camera_model: string;
858
+ camera_pixelsize: number[];
859
+ image_max_dim: number[];
860
+ };
861
+ acc_max_expo_time: number;
862
+ binning: number[];
863
+ flip: boolean[];
864
+ pixel_size: number[];
865
+ raw_roi: number[];
866
+ roi: number[];
867
+ rotation: number;
868
+ size: number[];
869
+ state: string;
870
+ };
871
+ };
872
+ roicenter: {
873
+ id: string;
874
+ name: string;
875
+ protocol: string;
876
+ type: string;
877
+ online: boolean;
878
+ require_staff: boolean;
879
+ properties: {
880
+ static: {
881
+ lima_version: string;
882
+ lima_type: string;
883
+ camera_type: string;
884
+ camera_model: string;
885
+ camera_pixelsize: number[];
886
+ image_max_dim: number[];
887
+ };
888
+ acc_max_expo_time: number;
889
+ binning: number[];
890
+ flip: boolean[];
891
+ pixel_size: number[];
892
+ raw_roi: number[];
893
+ roi: number[];
894
+ rotation: number;
895
+ size: number[];
896
+ state: string;
897
+ };
898
+ };
899
+ squaredetector: {
900
+ id: string;
901
+ name: string;
902
+ protocol: string;
903
+ type: string;
904
+ online: boolean;
905
+ require_staff: boolean;
906
+ properties: {
907
+ static: {
908
+ lima_version: string;
909
+ lima_type: string;
910
+ camera_type: string;
911
+ camera_model: string;
912
+ camera_pixelsize: number[];
913
+ image_max_dim: number[];
914
+ };
915
+ acc_max_expo_time: number;
916
+ binning: number[];
917
+ flip: boolean[];
918
+ pixel_size: number[];
919
+ raw_roi: number[];
920
+ roi: number[];
921
+ rotation: number;
922
+ size: number[];
923
+ state: string;
924
+ };
925
+ };
926
+ };
927
+
928
+ declare function LimaSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
929
+
930
+ interface MeasurementGroupProperties extends Record<string, unknown> {
931
+ /** List of available counters */
932
+ available: string[];
933
+ /** List of disabled counters.
934
+ *
935
+ * It is a subset of the `available` list.
936
+ */
937
+ disabled: string[];
938
+ }
939
+ /**
940
+ * Hardware as exposed by Redux
941
+ */
942
+ type MeasurementGroupSchema = Hardware<MeasurementGroupProperties>;
943
+ declare const MeasurementGroupHardwareDesc: HardwareDesc<MeasurementGroupSchema>;
944
+
945
+ declare function MeasurementGroup(props: HardwareWidgetProps<MeasurementGroupSchema>): react_jsx_runtime.JSX.Element;
946
+
947
+ declare const Mocks$f: {
948
+ default: {
949
+ callables: never[];
950
+ id: string;
951
+ name: string;
952
+ online: boolean;
953
+ properties: {
954
+ available: string[];
955
+ disabled: string[];
956
+ };
957
+ protocol: string;
958
+ require_staff: boolean;
959
+ type: string;
960
+ };
961
+ };
962
+
963
+ declare function MeasurementGroupSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
964
+
965
+ type MotorSchema = Hardware<{
966
+ position: number | null;
967
+ /**
968
+ * Target of the actual motion.
969
+ *
970
+ * If there is no motion, it is `null`.
971
+ */
972
+ target: number | null;
973
+ tolerance: number;
974
+ acceleration: number;
975
+ velocity: number;
976
+ limits: [number, number];
977
+ state: string[];
978
+ unit: string;
979
+ offset: number;
980
+ sign: number;
981
+ display_digits: number | null;
982
+ }>;
983
+ /**
984
+ * Exposes the standard supported motor states
985
+ */
986
+ interface MotorStates {
987
+ READY?: true;
988
+ MOVING?: true;
989
+ FAULT?: true;
990
+ HIGHLIMIT?: true;
991
+ LOWLIMIT?: true;
992
+ HOME?: true;
993
+ OFF?: true;
994
+ DISABLED?: true;
995
+ UNKNOWN?: true;
996
+ NOT_READY?: true;
997
+ }
998
+ /**
999
+ * Normalize the motor state exposed by the hardware.
1000
+ *
1001
+ * This does not exposes the custom states in a useful maner.
1002
+ *
1003
+ * Store states are changed depending of existing user tags
1004
+ *
1005
+ * - `auto_on`: This allow to move the motor even if `OFF` is enabled.
1006
+ * When `OFF` is enabled `READY` is turned to true.
1007
+ * - `auto_ready`: This allow to move the motor even if `NOT_READY` is enabled.
1008
+ *
1009
+ * TODO: An improvement would be to normalize that when redux is populated.
1010
+ * instead of storing a list.
1011
+ *
1012
+ * @param state: List of the controller state
1013
+ * @param userTags: List of the hardware user tags
1014
+ */
1015
+ declare function useMotorStates(state: string[] | undefined, userTags?: string[]): MotorStates;
1016
+ declare function isMotorHardware(entity: Hardware): entity is MotorSchema;
1017
+ /**
1018
+ * Return a motor from it's hardware name.
1019
+ *
1020
+ * Return `null` if the name refers to nothing or a mismatching hardware.
1021
+ *
1022
+ * @param name: An hardware identifier
1023
+ */
1024
+ declare function useMotorHardware(name: string | null): MotorSchema | null;
1025
+ /**
1026
+ * True if the motor positon is clock wise.
1027
+ *
1028
+ * This is based on dial metadata, and user sign.
1029
+ */
1030
+ declare function isMotorClockWise(hardware: MotorSchema, options?: {
1031
+ clockwise?: boolean;
1032
+ }): boolean;
1033
+ /**
1034
+ * Normalize the limits as finite values or `undefined`.
1035
+ */
1036
+ declare function motorLimits(hardware: MotorSchema): [number | undefined, number | undefined];
1037
+ declare const MotorHardwareDesc: HardwareDesc<MotorSchema>;
1038
+
1039
+ interface MotorDefaultOptions extends HardwareWidgetOptions {
1040
+ /** Default step size to use for up / down arrows */
1041
+ step?: number;
1042
+ /** Array of selectable step sizes */
1043
+ steps?: number[];
1044
+ /** Number of decimals to show */
1045
+ precision?: number;
1046
+ /** Whether to show popup to configure extended parameters */
1047
+ extended?: boolean;
1048
+ /** Whether this widget is read only */
1049
+ readOnly?: boolean;
1050
+ /** Whether this widget can only be changed using steps */
1051
+ stepOnly?: boolean;
1052
+ /** Kind of header displayed */
1053
+ header?: string;
1054
+ /** Specify a fontawesome to inc the value */
1055
+ incicon?: string;
1056
+ /** Specify a fontawesome to dec the value */
1057
+ decicon?: string;
1058
+ /** If true inc and dec icon are swapped */
1059
+ swapincdec?: boolean;
1060
+ /** Show the step arrows horizontally instead of vertically */
1061
+ horizontalarrows?: boolean;
1062
+ /** Show large step arrows */
1063
+ largearrows?: boolean;
1064
+ /**
1065
+ * Enforce the way the positive direction is displayed.
1066
+ *
1067
+ * For example this can change the behavior of a knob representation.
1068
+ */
1069
+ clockwise?: boolean;
1070
+ }
1071
+
1072
+ /**
1073
+ * The default motor widget
1074
+ */
1075
+ declare function MotorDefault(props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>): react_jsx_runtime.JSX.Element;
1076
+
1077
+ /**
1078
+ * The default motor widget
1079
+ */
1080
+ declare function MotorText(props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>): react_jsx_runtime.JSX.Element;
1081
+
1082
+ declare function MotorRotation(props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>): react_jsx_runtime.JSX.Element;
1083
+
1084
+ /**
1085
+ * A motor have a set of flags as state.
1086
+ *
1087
+ * For example an axis can expose `READY` and `MOVING` at the same time.
1088
+ * It means the controller is ready to change it's target, even
1089
+ * during a motion.
1090
+ *
1091
+ * For now we only display a "main" state.
1092
+ */
1093
+ declare function MotorState(props: {
1094
+ hardware: MotorSchema;
1095
+ }): react_jsx_runtime.JSX.Element;
1096
+
1097
+ declare const Mocks$e: {
1098
+ default: {
1099
+ callables: string[];
1100
+ id: string;
1101
+ name: string;
1102
+ online: boolean;
1103
+ properties: {
1104
+ offset: number;
1105
+ sign: number;
1106
+ acceleration: number;
1107
+ limits: number[];
1108
+ position: number;
1109
+ state: string[];
1110
+ tolerance: number;
1111
+ unit: string;
1112
+ velocity: number;
1113
+ display_digits: number;
1114
+ };
1115
+ protocol: string;
1116
+ require_staff: boolean;
1117
+ type: string;
1118
+ user_tags: never[];
1119
+ };
1120
+ halfMotor: {
1121
+ callables: string[];
1122
+ id: string;
1123
+ name: string;
1124
+ online: boolean;
1125
+ properties: {
1126
+ offset: number;
1127
+ sign: number;
1128
+ acceleration: number;
1129
+ limits: number[];
1130
+ position: number;
1131
+ state: string[];
1132
+ tolerance: number;
1133
+ unit: string;
1134
+ velocity: number;
1135
+ };
1136
+ protocol: string;
1137
+ require_staff: boolean;
1138
+ type: string;
1139
+ user_tags: never[];
1140
+ };
1141
+ unknownMotor: {
1142
+ callables: string[];
1143
+ id: string;
1144
+ name: string;
1145
+ online: boolean;
1146
+ properties: {
1147
+ acceleration: null;
1148
+ limits: null[];
1149
+ offset: null;
1150
+ position: number;
1151
+ sign: null;
1152
+ state: string[];
1153
+ target: null;
1154
+ tolerance: number;
1155
+ unit: string;
1156
+ velocity: null;
1157
+ };
1158
+ protocol: string;
1159
+ require_staff: boolean;
1160
+ type: string;
1161
+ user_tags: never[];
1162
+ };
1163
+ notReadyMotor: {
1164
+ callables: string[];
1165
+ id: string;
1166
+ name: string;
1167
+ online: boolean;
1168
+ properties: {
1169
+ acceleration: null;
1170
+ limits: null[];
1171
+ offset: null;
1172
+ position: number;
1173
+ sign: null;
1174
+ state: never[];
1175
+ target: null;
1176
+ tolerance: number;
1177
+ unit: string;
1178
+ velocity: null;
1179
+ };
1180
+ protocol: string;
1181
+ require_staff: boolean;
1182
+ type: string;
1183
+ user_tags: never[];
1184
+ };
1185
+ disconnectedMotor: {
1186
+ callables: string[];
1187
+ id: string;
1188
+ name: string;
1189
+ online: boolean;
1190
+ properties: {};
1191
+ protocol: string;
1192
+ require_staff: boolean;
1193
+ type: string;
1194
+ user_tags: never[];
1195
+ };
1196
+ powerOffMotor: {
1197
+ callables: string[];
1198
+ id: string;
1199
+ name: string;
1200
+ online: boolean;
1201
+ properties: {
1202
+ acceleration: null;
1203
+ limits: null[];
1204
+ offset: null;
1205
+ position: number;
1206
+ sign: null;
1207
+ state: string[];
1208
+ target: null;
1209
+ tolerance: number;
1210
+ unit: string;
1211
+ velocity: null;
1212
+ };
1213
+ protocol: string;
1214
+ require_staff: boolean;
1215
+ type: string;
1216
+ user_tags: never[];
1217
+ };
1218
+ };
1219
+
1220
+ declare function createMotorMock(name: string, position: number): {
1221
+ id: string;
1222
+ name: string;
1223
+ type: string;
1224
+ properties: {
1225
+ position: number;
1226
+ unit: string;
1227
+ limits: number[];
1228
+ };
1229
+ online: boolean;
1230
+ };
1231
+
1232
+ interface Props$c {
1233
+ name?: string;
1234
+ minLimit?: number;
1235
+ maxLimit?: number;
1236
+ initialPosition?: number;
1237
+ initialVelocity?: number;
1238
+ useHardwareContext?: () => {
1239
+ actions: {
1240
+ updateHardware: (name: string, hardware: Hardware) => void;
1241
+ updateHardwareChangeActions: (name: string, actions: HardwareChangeActions) => void;
1242
+ };
1243
+ };
1244
+ }
1245
+ declare function MotorSimulator(props: Props$c): react_jsx_runtime.JSX.Element;
1246
+
1247
+ type MultipositionSchema = Hardware<{
1248
+ /**
1249
+ * Actual position
1250
+ */
1251
+ position: string | 'unknown' | null;
1252
+ /**
1253
+ * Actual state of the device.
1254
+ *
1255
+ * Can be any state of a motor.
1256
+ */
1257
+ state: 'MOVING' | 'OFF' | 'READY' | 'FAULT' | 'DISABLED' | 'UNKNOWN';
1258
+ /**
1259
+ * Described positions
1260
+ */
1261
+ positions: {
1262
+ /**
1263
+ * Identifier of the position
1264
+ */
1265
+ position: string;
1266
+ /**
1267
+ * Human readable description
1268
+ */
1269
+ description?: string;
1270
+ /**
1271
+ * Location of this position represented by a set of motor/position
1272
+ */
1273
+ target: {
1274
+ object: string;
1275
+ destination: number | string;
1276
+ tolerance?: number;
1277
+ }[];
1278
+ }[];
1279
+ }>;
1280
+ declare const MultipositionHardwareDesc: HardwareDesc<MultipositionSchema>;
1281
+
1282
+ declare function Multiposition$1(props: HardwareWidgetProps<MultipositionSchema>): react_jsx_runtime.JSX.Element;
1283
+
1284
+ interface MultipositionDefault2Options extends HardwareWidgetOptions {
1285
+ /**
1286
+ * Display a search input
1287
+ */
1288
+ search?: boolean;
1289
+ }
1290
+ declare function Multiposition(props: HardwareWidgetProps<MultipositionSchema, MultipositionDefault2Options>): react_jsx_runtime.JSX.Element;
1291
+
1292
+ declare const Mocks$d: {
1293
+ default: {
1294
+ callables: string[];
1295
+ id: string;
1296
+ name: string;
1297
+ online: boolean;
1298
+ properties: {
1299
+ position: string;
1300
+ positions: {
1301
+ description: string;
1302
+ position: string;
1303
+ target: {
1304
+ destination: number;
1305
+ tolerance: number;
1306
+ }[];
1307
+ }[];
1308
+ state: string;
1309
+ };
1310
+ protocol: string;
1311
+ require_staff: boolean;
1312
+ type: string;
1313
+ };
1314
+ };
1315
+
1316
+ declare function MultipositionSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
1317
+
1318
+ interface OpticProperties extends Record<string, unknown> {
1319
+ state: string;
1320
+ magnification: number;
1321
+ available_magnifications: number[] | null;
1322
+ /**
1323
+ * Target of the actual motion.
1324
+ *
1325
+ * If there is no motion, it is `null `.
1326
+ */
1327
+ target_magnification: number | null;
1328
+ magnification_range: [number, number] | null;
1329
+ }
1330
+ /**
1331
+ * Hardware as exposed by Redux
1332
+ */
1333
+ type OpticSchema = Hardware<OpticProperties>;
1334
+ declare function isOpticHardware(entity: Hardware): entity is OpticSchema;
1335
+ declare const OpticHardwareDesc: HardwareDesc<OpticSchema>;
1336
+
1337
+ interface OpticWidgetOptions extends HardwareWidgetOptions {
1338
+ readonly?: boolean;
1339
+ digits?: number;
1340
+ allowtuning?: boolean;
1341
+ }
1342
+ declare function Optic(props: HardwareWidgetProps<OpticSchema, OpticWidgetOptions>): react_jsx_runtime.JSX.Element;
1343
+
1344
+ declare function OpticState(props: {
1345
+ hardware: OpticSchema;
1346
+ }): react_jsx_runtime.JSX.Element;
1347
+
1348
+ declare const Mocks$c: {
1349
+ default: {
1350
+ callables: string[];
1351
+ id: string;
1352
+ name: string;
1353
+ online: boolean;
1354
+ properties: {
1355
+ state: string;
1356
+ magnification: number;
1357
+ target_magnification: null;
1358
+ available_magnifications: number[];
1359
+ magnification_range: null;
1360
+ };
1361
+ protocol: string;
1362
+ require_staff: boolean;
1363
+ type: string;
1364
+ };
1365
+ fixed: {
1366
+ callables: string[];
1367
+ id: string;
1368
+ name: string;
1369
+ online: boolean;
1370
+ properties: {
1371
+ state: string;
1372
+ magnification: number;
1373
+ target_magnification: null;
1374
+ available_magnifications: number[];
1375
+ magnification_range: null;
1376
+ };
1377
+ protocol: string;
1378
+ require_staff: boolean;
1379
+ type: string;
1380
+ };
1381
+ off: {
1382
+ callables: string[];
1383
+ id: string;
1384
+ name: string;
1385
+ online: boolean;
1386
+ properties: {
1387
+ state: string;
1388
+ magnification: number;
1389
+ target_magnification: null;
1390
+ available_magnifications: number[];
1391
+ magnification_range: null;
1392
+ };
1393
+ protocol: string;
1394
+ require_staff: boolean;
1395
+ type: string;
1396
+ };
1397
+ range: {
1398
+ callables: string[];
1399
+ id: string;
1400
+ name: string;
1401
+ online: boolean;
1402
+ properties: {
1403
+ state: string;
1404
+ magnification: number;
1405
+ target_magnification: null;
1406
+ available_magnifications: number[];
1407
+ magnification_range: null;
1408
+ };
1409
+ protocol: string;
1410
+ require_staff: boolean;
1411
+ type: string;
1412
+ };
1413
+ };
1414
+
1415
+ interface Props$b {
1416
+ kind: 'fixed' | 'range' | 'multi';
1417
+ }
1418
+ declare function OpticSimulator(props: PropsWithSimulator<Props$b>): react_jsx_runtime.JSX.Element;
1419
+
1420
+ type ProcedureSchema = Hardware<{
1421
+ state: string;
1422
+ previous_run_state: string;
1423
+ previous_run_exception: string | null;
1424
+ parameters: Record<string, any>;
1425
+ }>;
1426
+ declare const ProcedureHardwareDesc: HardwareDesc<ProcedureSchema>;
1427
+
1428
+ interface HardwareFromProcedure {
1429
+ __type__: 'hardware';
1430
+ name: string;
1431
+ }
1432
+ interface ScanFromProcedure {
1433
+ __type__: 'scan';
1434
+ key?: string;
1435
+ }
1436
+ interface ExceptionFromProcedure {
1437
+ __type__: 'exception';
1438
+ class: string;
1439
+ message: string;
1440
+ traceback: Record<string, any>;
1441
+ }
1442
+ declare function isProcedureHardware(entity: Hardware): entity is ProcedureSchema;
1443
+ /**
1444
+ * Return a procedure from it's hardware name.
1445
+ *
1446
+ * Return `null` if the name refers to nothing or a mismatching hardware.
1447
+ *
1448
+ * @param name: An hardware identifier
1449
+ */
1450
+ declare function useProcedureHardware(name: string | null): ProcedureSchema | null;
1451
+
1452
+ declare function FinishedState(props: {
1453
+ hardware: EditableHardware<ProcedureSchema>;
1454
+ }): react_jsx_runtime.JSX.Element;
1455
+ declare function ProcedureExecution(props: HardwareWidgetProps<ProcedureSchema>): react_jsx_runtime.JSX.Element;
1456
+
1457
+ interface ProcedureOptions extends HardwareWidgetOptions {
1458
+ /**
1459
+ * If true, execute the procedure in the BLISS session foreground.
1460
+ *
1461
+ * As result, the terminal first have to be available to
1462
+ * start the procedure, else it fails.
1463
+ *
1464
+ * Also, as it takes the prompt, it is visible by the users,
1465
+ * so they have to kill or to wait for the end before doing
1466
+ * anything else.
1467
+ */
1468
+ foreground?: boolean;
1469
+ }
1470
+ declare function Actions(props: {
1471
+ hardware: EditableHardware<ProcedureSchema>;
1472
+ disabled: boolean;
1473
+ options: ProcedureOptions;
1474
+ }): react_jsx_runtime.JSX.Element;
1475
+ declare function ProcedureManage(props: HardwareWidgetProps<ProcedureSchema, ProcedureOptions>): react_jsx_runtime.JSX.Element;
1476
+
1477
+ declare function ProcedureValidate(props: HardwareWidgetProps<ProcedureSchema>): react_jsx_runtime.JSX.Element;
1478
+
1479
+ declare function ProcedureState(props: {
1480
+ hardware: ProcedureSchema;
1481
+ }): react_jsx_runtime.JSX.Element;
1482
+
1483
+ declare const Mocks$b: {
1484
+ standby: {
1485
+ callables: string[];
1486
+ type: string;
1487
+ id: string;
1488
+ name: string;
1489
+ protocol: string;
1490
+ require_staff: boolean;
1491
+ online: boolean;
1492
+ properties: {
1493
+ state: string;
1494
+ previous_run_state: string;
1495
+ previous_run_exception: null;
1496
+ parameters: {
1497
+ my_number: number;
1498
+ my_string: string;
1499
+ my_null: null;
1500
+ my_boolean: boolean;
1501
+ my_dict: {
1502
+ a: number;
1503
+ b: string;
1504
+ c: boolean;
1505
+ };
1506
+ my_list: (string | number | boolean)[];
1507
+ "my_scan_1.11": {
1508
+ __type__: string;
1509
+ node: string;
1510
+ mmh3: number;
1511
+ };
1512
+ "my_scan_2.0": {
1513
+ __type__: string;
1514
+ key: string;
1515
+ mmh3: number;
1516
+ };
1517
+ my_quantity: {
1518
+ __type__: string;
1519
+ scalar: number;
1520
+ unit: string;
1521
+ };
1522
+ my_nan: {
1523
+ __type__: string;
1524
+ };
1525
+ my_posinf: {
1526
+ __type__: string;
1527
+ };
1528
+ my_neginf: {
1529
+ __type__: string;
1530
+ };
1531
+ my_obj: {
1532
+ __type__: string;
1533
+ name: string;
1534
+ };
1535
+ };
1536
+ };
1537
+ };
1538
+ };
1539
+
1540
+ /**
1541
+ * Hardware as exposed by Redux
1542
+ */
1543
+ type RegulationSchema = Hardware<{
1544
+ state: string;
1545
+ is_monitoring: boolean;
1546
+ is_softloop: boolean;
1547
+ setpoint: number;
1548
+ input_value: number;
1549
+ output_value: number;
1550
+ input_unit: string;
1551
+ output_unit: string;
1552
+ deadband?: number;
1553
+ }>;
1554
+ declare const RegulationHardwareDesc: HardwareDesc<RegulationSchema>;
1555
+
1556
+ /**
1557
+ * Mirrors react-bootstrap's `Placement` (itself re-exported from
1558
+ * `@restart/ui`/`@popperjs/core` via an inline `import()` type), spelled out
1559
+ * as a literal union so widget-options codegen (which walks these
1560
+ * interfaces with the TypeScript compiler API to produce a JSON Schema) can
1561
+ * represent it — codegen can't resolve through the `import()` type node.
1562
+ */
1563
+ type PopupPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
1564
+ interface RegulationOptions extends HardwareWidgetOptions {
1565
+ /** Default step size to use for up / down arrows */
1566
+ step?: number;
1567
+ /** Array of selectable step sizes */
1568
+ steps?: number[];
1569
+ /** Plot height */
1570
+ plotHeight?: string;
1571
+ /** Plot width */
1572
+ plotWidth?: string;
1573
+ /** Show output details
1574
+ * @default true
1575
+ */
1576
+ showOutput?: boolean;
1577
+ /** Popup button title */
1578
+ buttonTitle?: string;
1579
+ /** Popup placement */
1580
+ popupPlacement?: PopupPlacement;
1581
+ }
1582
+
1583
+ declare function RegulationLoop(props: HardwareWidgetProps<RegulationSchema, RegulationOptions>): react_jsx_runtime.JSX.Element;
1584
+
1585
+ declare function RegulationPlot(props: HardwareWidgetProps<RegulationSchema, RegulationOptions>): react_jsx_runtime.JSX.Element;
1586
+
1587
+ declare const Mocks$a: {
1588
+ default: {
1589
+ alias: null;
1590
+ errors: never[];
1591
+ locked: null;
1592
+ name: string;
1593
+ online: boolean;
1594
+ properties: {
1595
+ deadband: number;
1596
+ input_unit: string;
1597
+ input_value: number;
1598
+ is_monitoring: boolean;
1599
+ output_unit: string;
1600
+ output_value: number;
1601
+ setpoint: number;
1602
+ state: string;
1603
+ };
1604
+ type: string;
1605
+ user_tags: never[];
1606
+ };
1607
+ };
1608
+
1609
+ declare function RegulationSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
1610
+
1611
+ type ShutterSchema = Hardware<{
1612
+ state: string;
1613
+ status: string;
1614
+ valid: boolean;
1615
+ open_text: string;
1616
+ closed_text: string;
1617
+ }>;
1618
+ declare const ShutterHardwareDesc: HardwareDesc<ShutterSchema>;
1619
+
1620
+ declare function ShutterDefault(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
1621
+
1622
+ declare function ShutterProtected(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
1623
+
1624
+ declare function ShutterState(props: {
1625
+ hardware: ShutterSchema;
1626
+ useReadyState?: boolean;
1627
+ }): react_jsx_runtime.JSX.Element;
1628
+
1629
+ declare const Mocks$9: {
1630
+ default: {
1631
+ callables: string[];
1632
+ id: string;
1633
+ name: string;
1634
+ online: boolean;
1635
+ properties: {
1636
+ closed_text: string;
1637
+ open_text: string;
1638
+ state: string;
1639
+ status: string;
1640
+ valid: boolean;
1641
+ };
1642
+ protocol: string;
1643
+ require_staff: boolean;
1644
+ type: string;
1645
+ };
1646
+ closed: {
1647
+ callables: string[];
1648
+ id: string;
1649
+ name: string;
1650
+ online: boolean;
1651
+ properties: {
1652
+ closed_text: string;
1653
+ open_text: string;
1654
+ state: string;
1655
+ status: string;
1656
+ valid: boolean;
1657
+ };
1658
+ protocol: string;
1659
+ require_staff: boolean;
1660
+ type: string;
1661
+ };
1662
+ };
1663
+
1664
+ declare function ShutterSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
1665
+
1666
+ /**
1667
+ * Hardware as exposed by Redux
1668
+ */
1669
+ type SlitSchema = Hardware<{
1670
+ state: string;
1671
+ type: 'vertical' | 'horizontal' | 'both';
1672
+ hgap: string;
1673
+ vgap: string;
1674
+ hoffset: string;
1675
+ voffset: string;
1676
+ }>;
1677
+ interface SlitDefaultOptions extends HardwareWidgetOptions {
1678
+ /** Number of decimals to show */
1679
+ precision?: number;
1680
+ /** Setup the widget to be read only */
1681
+ readonly?: boolean;
1682
+ }
1683
+ declare const SlitHardwareDesc: HardwareDesc<SlitSchema>;
1684
+
1685
+ declare function SlitDefault(props: HardwareWidgetProps<SlitSchema, SlitDefaultOptions>): react_jsx_runtime.JSX.Element;
1686
+
1687
+ declare function SlitState(props: {
1688
+ hardware: SlitSchema;
1689
+ }): react_jsx_runtime.JSX.Element;
1690
+
1691
+ declare const Mocks$8: {
1692
+ default: {
1693
+ id: string;
1694
+ name: string;
1695
+ online: boolean;
1696
+ properties: {
1697
+ vgap: string;
1698
+ voffset: string;
1699
+ hgap: string;
1700
+ hoffset: string;
1701
+ };
1702
+ type: string;
1703
+ };
1704
+ horizontal: {
1705
+ id: string;
1706
+ name: string;
1707
+ online: boolean;
1708
+ properties: {
1709
+ vgap: string;
1710
+ voffset: string;
1711
+ hgap: string;
1712
+ hoffset: string;
1713
+ };
1714
+ type: string;
1715
+ };
1716
+ vertical: {
1717
+ id: string;
1718
+ name: string;
1719
+ online: boolean;
1720
+ properties: {
1721
+ vgap: string;
1722
+ voffset: string;
1723
+ hgap: string;
1724
+ hoffset: string;
1725
+ };
1726
+ type: string;
1727
+ };
1728
+ };
1729
+
1730
+ /**
1731
+ * Hardware as exposed by Redux
1732
+ */
1733
+ type PumpSchema = Hardware<{
1734
+ state: string;
1735
+ status: string;
1736
+ pressure: number;
1737
+ voltage: number;
1738
+ current: number;
1739
+ unit?: string;
1740
+ }>;
1741
+ declare const PumpHardwareDesc: HardwareDesc<PumpSchema>;
1742
+
1743
+ interface PumpWidgetOptions extends HardwareWidgetOptions {
1744
+ unit?: string;
1745
+ precision?: number;
1746
+ }
1747
+ declare function Pump(props: HardwareWidgetProps<PumpSchema, PumpWidgetOptions>): react_jsx_runtime.JSX.Element;
1748
+
1749
+ declare const Mocks$7: {
1750
+ default: {
1751
+ callables: string[];
1752
+ id: string;
1753
+ name: string;
1754
+ online: boolean;
1755
+ properties: {
1756
+ current: number;
1757
+ pressure: number;
1758
+ state: string;
1759
+ status: string;
1760
+ voltage: number;
1761
+ };
1762
+ protocol: string;
1763
+ require_staff: boolean;
1764
+ type: string;
1765
+ };
1766
+ };
1767
+
1768
+ /**
1769
+ * Hardware as exposed by Redux
1770
+ */
1771
+ type PusherSchema = Hardware<{
1772
+ state: string;
1773
+ }>;
1774
+ declare const PusherHardwareDesc: HardwareDesc<PusherSchema>;
1775
+
1776
+ interface PusherOptions extends HardwareWidgetOptions {
1777
+ /**
1778
+ * Orientation of the push action.
1779
+ *
1780
+ * This changes the way the widget is displayed.
1781
+ *
1782
+ * One of:
1783
+ * - `right-left`: Push the sample from the right to the left (default)
1784
+ * - `left-right`: Push the sample from the left to the right
1785
+ */
1786
+ orientation?: 'right-left' | 'left-right';
1787
+ }
1788
+
1789
+ declare function Pusher(props: HardwareWidgetProps<PusherSchema, PusherOptions>): react_jsx_runtime.JSX.Element;
1790
+
1791
+ declare function PusherState(props: {
1792
+ hardware: PusherSchema;
1793
+ }): react_jsx_runtime.JSX.Element;
1794
+
1795
+ declare const Mocks$6: {
1796
+ default: {
1797
+ callables: string[];
1798
+ id: string;
1799
+ name: string;
1800
+ online: boolean;
1801
+ properties: {
1802
+ state: string;
1803
+ };
1804
+ protocol: string;
1805
+ require_staff: boolean;
1806
+ type: string;
1807
+ };
1808
+ };
1809
+
1810
+ declare function PusherSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
1811
+
1812
+ /**
1813
+ * Hardware as exposed by Redux
1814
+ */
1815
+ type ServiceSchema = Hardware<{
1816
+ state: 'STOPPED' | 'STARTING' | 'RUNNING' | 'BACKOFF' | 'STOPPING' | 'EXITED' | 'FATAL' | 'UNKNOWN';
1817
+ }>;
1818
+ declare const ServiceHardwareDesc: HardwareDesc<ServiceSchema>;
1819
+
1820
+ declare function ServiceDefault(props: HardwareWidgetProps<ServiceSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
1821
+
1822
+ interface ServiceProectedOptions extends HardwareWidgetOptions {
1823
+ /** Direction to drop the menu */
1824
+ dropDirection?: string;
1825
+ }
1826
+ declare function ServiceProtected(props: HardwareWidgetProps<ServiceSchema, ServiceProectedOptions>): react_jsx_runtime.JSX.Element;
1827
+
1828
+ declare function ServiceState(props: {
1829
+ hardware: ServiceSchema;
1830
+ }): react_jsx_runtime.JSX.Element;
1831
+
1832
+ declare const Mocks$5: {
1833
+ default: {
1834
+ callables: string[];
1835
+ id: string;
1836
+ name: string;
1837
+ online: boolean;
1838
+ properties: {
1839
+ state: string;
1840
+ };
1841
+ protocol: string;
1842
+ require_staff: boolean;
1843
+ type: string;
1844
+ };
1845
+ };
1846
+
1847
+ interface TomoFlatMotionStep {
1848
+ /** Axis reference, following the pattern `hardware:my_axis` */
1849
+ axisRef: string;
1850
+ absolute_position: number | null;
1851
+ relative_position: number | null;
1852
+ }
1853
+ interface TomoFlatMotionProperties extends Record<string, unknown> {
1854
+ state: 'READY' | 'IN' | 'OUT' | 'MOVING_IN' | 'MOVING_OUT' | 'LOST' | 'UNKNOWN';
1855
+ available_axes: string[];
1856
+ motion: TomoFlatMotionStep[];
1857
+ move_in_parallel: boolean;
1858
+ power_onoff: boolean;
1859
+ settle_time: number;
1860
+ }
1861
+ /**
1862
+ * Hardware as exposed by Redux
1863
+ */
1864
+ type TomoFlatMotionSchema = Hardware<TomoFlatMotionProperties>;
1865
+ declare const TomoFlatMotionHardwareDesc: HardwareDesc<TomoFlatMotionSchema>;
1866
+
1867
+ declare function isTomoFlatMotionHardware(entity: Hardware): entity is TomoFlatMotionSchema;
1868
+ declare function useTomoFlatMotionHardware(name: string | null): TomoFlatMotionSchema | null;
1869
+
1870
+ declare function TomoFlatMotionDefault(props: HardwareWidgetProps<TomoFlatMotionSchema>): react_jsx_runtime.JSX.Element;
1871
+
1872
+ declare function TomoFlatMotionSmall(props: HardwareWidgetProps<TomoFlatMotionSchema>): react_jsx_runtime.JSX.Element;
1873
+
1874
+ declare function TomoFlatMotionState(props: {
1875
+ hardware: TomoFlatMotionSchema;
1876
+ }): react_jsx_runtime.JSX.Element;
1877
+
1878
+ declare const Mocks$4: {
1879
+ default: {
1880
+ id: string;
1881
+ name: string;
1882
+ online: boolean;
1883
+ properties: {
1884
+ state: string;
1885
+ settle_time: number;
1886
+ power_onoff: boolean;
1887
+ move_in_parallel: boolean;
1888
+ available_axes: string[];
1889
+ motion: {
1890
+ axisRef: string;
1891
+ absolute_position: null;
1892
+ relative_position: number;
1893
+ }[];
1894
+ };
1895
+ protocol: string;
1896
+ require_staff: boolean;
1897
+ type: string;
1898
+ };
1899
+ sy: {
1900
+ callables: string[];
1901
+ id: string;
1902
+ name: string;
1903
+ online: boolean;
1904
+ properties: {
1905
+ offset: number;
1906
+ sign: number;
1907
+ acceleration: number;
1908
+ limits: number[];
1909
+ position: number;
1910
+ state: string[];
1911
+ tolerance: number;
1912
+ unit: string;
1913
+ velocity: number;
1914
+ display_digits: number;
1915
+ };
1916
+ protocol: string;
1917
+ require_staff: boolean;
1918
+ type: string;
1919
+ user_tags: never[];
1920
+ };
1921
+ sy2: {
1922
+ callables: string[];
1923
+ id: string;
1924
+ name: string;
1925
+ online: boolean;
1926
+ properties: {
1927
+ offset: number;
1928
+ sign: number;
1929
+ acceleration: number;
1930
+ limits: number[];
1931
+ position: number;
1932
+ state: string[];
1933
+ tolerance: number;
1934
+ unit: string;
1935
+ velocity: number;
1936
+ display_digits: number;
1937
+ };
1938
+ protocol: string;
1939
+ require_staff: boolean;
1940
+ type: string;
1941
+ user_tags: never[];
1942
+ };
1943
+ };
1944
+
1945
+ declare function TomoFlatMotionSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
1946
+
1947
+ /**
1948
+ * Hardware as exposed by Redux
1949
+ */
1950
+ type TomoReferencePositionSchema = Hardware<Record<string, never>>;
1951
+ declare function isTomoReferencePositionHardware(entity: Hardware): entity is TomoReferencePositionSchema;
1952
+ declare const TomoReferencePositionHardwareDesc: HardwareDesc<TomoReferencePositionSchema>;
1953
+
1954
+ interface TomoReferencePositionDefaultOptions extends HardwareWidgetOptions {
1955
+ /**
1956
+ * If defined, this label is displayed in the button.
1957
+ */
1958
+ label?: string;
1959
+ }
1960
+ declare function TomoReferencePositionDefault(props: HardwareWidgetProps<TomoReferencePositionSchema, TomoReferencePositionDefaultOptions>): react_jsx_runtime.JSX.Element;
1961
+
1962
+ /**
1963
+ * Hardware as exposed by Redux
1964
+ */
1965
+ type TomoDetectorSchema = Hardware<{
1966
+ state: string;
1967
+ user_sample_pixel_size: number | null;
1968
+ sample_pixel_size_mode: string;
1969
+ sample_pixel_size: number | null;
1970
+ field_of_view: number;
1971
+ detector: string;
1972
+ optic: string;
1973
+ source_distance: number | null;
1974
+ acq_mode: 'MANUAL' | 'SINGLE' | 'ACCUMULATION';
1975
+ }>;
1976
+ declare const TomoDetectorHardwareDesc: HardwareDesc<TomoDetectorSchema>;
1977
+
1978
+ declare function isTomoDetectorHardware(entity: Hardware): entity is TomoDetectorSchema;
1979
+ declare function useTomoDetectorHardware(name: string | null): TomoDetectorSchema | null;
1980
+
1981
+ declare function TomoDetectorAcquisitionMode(props: HardwareWidgetProps<TomoDetectorSchema, HardwareWidgetOptions>): react_jsx_runtime.JSX.Element;
1982
+
1983
+ interface TomoDetectorSamplePixelSizeOptions extends HardwareWidgetOptions {
1984
+ display_unit?: string | null;
1985
+ }
1986
+ declare function TomoDetectorSamplePixelSize(props: HardwareWidgetProps<TomoDetectorSchema, TomoDetectorSamplePixelSizeOptions>): react_jsx_runtime.JSX.Element;
1987
+
1988
+ declare function TomoDetectorState(props: {
1989
+ hardware: TomoDetectorSchema;
1990
+ }): react_jsx_runtime.JSX.Element;
1991
+
1992
+ interface TomoDetectorFieldOfViewOptions extends HardwareWidgetOptions {
1993
+ /**
1994
+ * The unit to be used to display the field of view.
1995
+ */
1996
+ display_unit?: string;
1997
+ /**
1998
+ * Number of digits
1999
+ */
2000
+ digits?: number;
2001
+ }
2002
+
2003
+ declare const Mocks$3: {
2004
+ default: {
2005
+ id: string;
2006
+ name: string;
2007
+ online: boolean;
2008
+ properties: {
2009
+ state: string;
2010
+ sample_pixel_size_mode: string;
2011
+ user_sample_pixel_size: number;
2012
+ sample_pixel_size: number;
2013
+ detector: string;
2014
+ optic: string;
2015
+ source_distance: number;
2016
+ acq_mode: string;
2017
+ };
2018
+ protocol: string;
2019
+ require_staff: boolean;
2020
+ type: string;
2021
+ };
2022
+ };
2023
+
2024
+ /**
2025
+ * Hardware as exposed by Redux
2026
+ */
2027
+ type TomoDetectorsSchema = Hardware<{
2028
+ state: string;
2029
+ detectors: string[];
2030
+ active_detector: string;
2031
+ target_detector?: string;
2032
+ }>;
2033
+ declare const TomoDetectorsHardwareDesc: HardwareDesc<TomoDetectorsSchema>;
2034
+
2035
+ declare function isTomoDetectorsHardware(entity: Hardware): entity is TomoDetectorsSchema;
2036
+ declare function useTomoDetectorsHardware(name: string | null): TomoDetectorsSchema | null;
2037
+
2038
+ declare function TomoDetectors(props: HardwareWidgetProps<TomoDetectorsSchema>): react_jsx_runtime.JSX.Element;
2039
+
2040
+ declare function TomoDetectorsState(props: {
2041
+ hardware: TomoDetectorsSchema;
2042
+ }): react_jsx_runtime.JSX.Element;
2043
+
2044
+ declare const Mocks$2: {
2045
+ default: {
2046
+ id: string;
2047
+ name: string;
2048
+ online: boolean;
2049
+ properties: {
2050
+ state: string;
2051
+ active_detector: string;
2052
+ detectors: string[];
2053
+ };
2054
+ protocol: string;
2055
+ require_staff: boolean;
2056
+ type: string;
2057
+ };
2058
+ };
2059
+
2060
+ /**
2061
+ * Hardware as exposed by Redux
2062
+ */
2063
+ type TomoImagingSchema = Hardware<{
2064
+ state: string;
2065
+ update_on_move: boolean;
2066
+ exposure_time: number;
2067
+ settle_time: number;
2068
+ }>;
2069
+ declare const TomoImagingHardwareDesc: HardwareDesc<TomoImagingSchema>;
2070
+
2071
+ interface TomoImagingActionsOptions extends HardwareWidgetOptions {
2072
+ /**
2073
+ * If true, the default, the sample location is restored after the action.
2074
+ */
2075
+ restore_sample?: boolean;
2076
+ }
2077
+ declare function TomoImagingActions(props: HardwareWidgetProps<TomoImagingSchema, TomoImagingActionsOptions>): react_jsx_runtime.JSX.Element;
2078
+
2079
+ declare function TomoImagingDefault(props: HardwareWidgetProps<TomoImagingSchema>): react_jsx_runtime.JSX.Element;
2080
+
2081
+ interface TomoImagingOptions extends HardwareWidgetOptions {
2082
+ /** Number of digits for the time */
2083
+ digits?: number;
2084
+ /** Unit tailed for the time (if undefined the default is 's' for second) */
2085
+ unit?: string;
2086
+ }
2087
+
2088
+ declare function TomoImagingExposureTime(props: HardwareWidgetProps<TomoImagingSchema, TomoImagingOptions>): react_jsx_runtime.JSX.Element;
2089
+
2090
+ declare function TomoImagingSettleTime(props: HardwareWidgetProps<TomoImagingSchema>): react_jsx_runtime.JSX.Element;
2091
+
2092
+ declare function TomoImagingUpdateMode(props: HardwareWidgetProps<TomoImagingSchema>): react_jsx_runtime.JSX.Element;
2093
+
2094
+ declare function TomoImagingState(props: {
2095
+ hardware: TomoImagingSchema;
2096
+ }): react_jsx_runtime.JSX.Element;
2097
+
2098
+ declare const Mocks$1: {
2099
+ default: {
2100
+ id: string;
2101
+ name: string;
2102
+ online: boolean;
2103
+ properties: {
2104
+ state: string;
2105
+ update_on_move: boolean;
2106
+ exposure_time: number;
2107
+ };
2108
+ protocol: string;
2109
+ require_staff: boolean;
2110
+ type: string;
2111
+ };
2112
+ };
2113
+
2114
+ declare function TomoImagingSimulator(props: PropsWithSimulator): react_jsx_runtime.JSX.Element;
2115
+
2116
+ /**
2117
+ * Hardware as exposed by Redux
2118
+ */
2119
+ type TomoSampleStageSchema = Hardware<{
2120
+ sx: string;
2121
+ sy: string;
2122
+ sz: string;
2123
+ somega: string;
2124
+ sampx: string;
2125
+ sampy: string;
2126
+ sampu: string;
2127
+ sampv: string;
2128
+ x_axis_focal_pos: number | null;
2129
+ detector_center: [number | null, number | null];
2130
+ }>;
2131
+ declare const TomoSampleStageHardwareDesc: HardwareDesc<TomoSampleStageSchema>;
2132
+
2133
+ declare function isTomoSampleStageHardware(entity: Hardware): entity is TomoSampleStageSchema;
2134
+ declare function useTomoSampleStageHardware(name: string | null): TomoSampleStageSchema | null;
2135
+
2136
+ /**
2137
+ * Hardware as exposed by Redux
2138
+ */
2139
+ type TomoConfigSchema = Hardware<{
2140
+ sample_stage: string;
2141
+ sxbeam: string;
2142
+ detectors: string;
2143
+ holotomo: string;
2144
+ latency_time: number;
2145
+ }>;
2146
+ declare const TomoConfigHardwareDesc: HardwareDesc<TomoConfigSchema>;
2147
+
2148
+ declare function isTomoConfigHardware(entity: Hardware): entity is TomoConfigSchema;
2149
+ declare function useTomoConfigHardware(name: string | null): TomoConfigSchema | null;
2150
+
2151
+ declare function TomoConfigLatencyTime(props: HardwareWidgetProps<TomoConfigSchema>): react_jsx_runtime.JSX.Element;
2152
+
2153
+ interface TomoHoloDistance {
2154
+ z1: number;
2155
+ position: number;
2156
+ pixel_size: number;
2157
+ }
2158
+ /**
2159
+ * Hardware as exposed by Redux
2160
+ */
2161
+ type TomoHoloSchema = Hardware<{
2162
+ state: string;
2163
+ settle_time: number;
2164
+ pixel_size: number | null;
2165
+ nb_distances: number;
2166
+ distances: TomoHoloDistance[];
2167
+ }>;
2168
+ declare const TomoHoloHardwareDesc: HardwareDesc<TomoHoloSchema>;
2169
+
2170
+ declare function isTomoHoloHardware(entity: Hardware): entity is TomoHoloSchema;
2171
+ declare function useTomoHoloHardware(name: string | null): TomoHoloSchema | null;
2172
+
2173
+ declare function TomoHoloState(props: {
2174
+ hardware: TomoHoloSchema;
2175
+ }): react_jsx_runtime.JSX.Element;
2176
+
2177
+ /**
2178
+ * Hardware as exposed by Redux
2179
+ */
2180
+ type ValveSchema = Hardware<{
2181
+ state: string;
2182
+ status: string;
2183
+ }>;
2184
+ declare const ValveHardwareDesc: HardwareDesc<ValveSchema>;
2185
+
2186
+ declare function Valve(props: HardwareWidgetProps<ValveSchema>): react_jsx_runtime.JSX.Element;
2187
+
2188
+ declare const Mocks: {
2189
+ default: {
2190
+ callables: string[];
2191
+ id: string;
2192
+ name: string;
2193
+ online: boolean;
2194
+ properties: {
2195
+ state: string;
2196
+ status: string;
2197
+ };
2198
+ protocol: string;
2199
+ require_staff: boolean;
2200
+ type: string;
2201
+ };
2202
+ };
2203
+
2204
+ interface Props$a {
2205
+ online: boolean;
2206
+ activeMessage?: string;
2207
+ inactiveMessage?: string;
2208
+ message?: string;
2209
+ icon: string;
2210
+ name: string;
2211
+ }
2212
+ declare function TypeIcon(props: Props$a): react_jsx_runtime.JSX.Element;
2213
+
2214
+ interface Props$9 {
2215
+ hardware: Hardware;
2216
+ headerMode?: string;
2217
+ widgetIcon: ReactElement;
2218
+ widgetState: ReactElement;
2219
+ widgetContent: ReactElement;
2220
+ }
2221
+ /**
2222
+ * Normalized way to compose hardware component in order to provide the same
2223
+ * kind of layout
2224
+ */
2225
+ declare function HardwareTemplate(props: Props$9): react_jsx_runtime.JSX.Element;
2226
+
2227
+ /**
2228
+ * Input number synchronized with a hardware.
2229
+ *
2230
+ * Input related to hardware have specificities because the hardware state can
2231
+ * change during the user interaction.
2232
+ *
2233
+ * TODO: Maybe normalize `precision` and `step` together
2234
+ */
2235
+ declare function HardwareInputNumber(props: {
2236
+ hardwareValue: number;
2237
+ hardwareIsDisabled: boolean;
2238
+ hardwareIsMoving?: boolean;
2239
+ hardwareIsReady?: boolean;
2240
+ onMoveRequested: (value: number) => Promise<void> | null;
2241
+ onAbortRequested?: () => void;
2242
+ readOnly?: boolean;
2243
+ precision?: number;
2244
+ step?: number;
2245
+ }): react_jsx_runtime.JSX.Element;
2246
+
2247
+ /**
2248
+ * NumericStep handled hardware properties.
2249
+ *
2250
+ * Input related to hardware have specificities because the hardware state can
2251
+ * change during the user interaction.
2252
+ */
2253
+ declare function HardwareNumericStep(props: {
2254
+ hardwareValue: number | null;
2255
+ hardwareIsDisabled: boolean;
2256
+ hardwareIsMoving: boolean;
2257
+ hardwareIsReady: boolean;
2258
+ onMoveRequested: (value: number) => Promise<void> | null;
2259
+ onAbortRequested: () => void;
2260
+ /** Default step size to use for up / down arrows */
2261
+ step?: number | string;
2262
+ /** Array of selectable step sizes */
2263
+ steps?: (number | string)[];
2264
+ /** Number of decimals to show */
2265
+ precision?: number;
2266
+ /** Whether this widget is read only */
2267
+ readOnly?: boolean;
2268
+ /** Whether this widget can only be changed using steps */
2269
+ stepOnly?: boolean;
2270
+ /** Specify a fontawesome to inc the value */
2271
+ incIcon?: string;
2272
+ /** Specify a fontawesome to dec the value */
2273
+ decIcon?: string;
2274
+ /** If true inc and dec icon are swapped */
2275
+ swapIncDec?: boolean;
2276
+ /** Show the step arrows horizontally instead of vertically */
2277
+ horizontalArrows?: boolean;
2278
+ /** Show large step arrows */
2279
+ largeArrows?: boolean;
2280
+ /** Identifier passed to the input element */
2281
+ id?: string;
2282
+ }): react_jsx_runtime.JSX.Element;
2283
+
2284
+ /**
2285
+ * Normalize the way to display an hardware state.
2286
+ *
2287
+ * If `minWidth` is pecified (in `em`) it ensure the widget width will stay the
2288
+ * same when the state change
2289
+ *
2290
+ * A `hardwareStatus` can be defined, which is a human readable global description
2291
+ * of the state of the device.
2292
+ */
2293
+ declare function State$1(props: {
2294
+ state: string;
2295
+ variant: string;
2296
+ minWidth?: number;
2297
+ description?: string;
2298
+ hardwareStatus?: string;
2299
+ }): react_jsx_runtime.JSX.Element;
2300
+ /**
2301
+ * Normalize the way to display an hardware exposing multiple states.
2302
+ *
2303
+ * - `states` is the states exposed by the hardware.
2304
+ * - `variants` contains a variant for each of this states, else `fatal` is used.
2305
+ * - `descriptions` can be provided to add a description to the state.
2306
+ * - `hardwareStatus` A global description of the state of the device
2307
+ *
2308
+ * If `minWidth` is pecified (in `em`) it ensure the widget width will stay the
2309
+ * same when the state change
2310
+ */
2311
+ declare function MultiState(props: {
2312
+ states: string[];
2313
+ variants?: Record<string, string>;
2314
+ descriptions?: Record<string, string>;
2315
+ minWidth?: number;
2316
+ hardwareStatus?: string;
2317
+ }): react_jsx_runtime.JSX.Element;
2318
+
2319
+ declare function formatEng(scalar: number): {
2320
+ scalar: number;
2321
+ prefix: string;
2322
+ multiplier: number;
2323
+ };
2324
+ /**
2325
+ * Returns the argument as capitalized string.
2326
+ */
2327
+ declare function ucfirst(str: string): string;
2328
+ declare function toHoursMins(seconds: number): string;
2329
+ declare function toEnergy(wavelength: number): string | 0;
2330
+ declare function round(value: number, digits: number): number;
2331
+
2332
+ declare const formatting_d_formatEng: typeof formatEng;
2333
+ declare const formatting_d_round: typeof round;
2334
+ declare const formatting_d_toEnergy: typeof toEnergy;
2335
+ declare const formatting_d_toHoursMins: typeof toHoursMins;
2336
+ declare const formatting_d_ucfirst: typeof ucfirst;
2337
+ declare namespace formatting_d {
2338
+ 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 };
2339
+ }
2340
+
2341
+ interface NoObjectProps$5 {
2342
+ id: string;
2343
+ name?: string;
2344
+ options: {
2345
+ header?: string;
2346
+ emptyifnone?: boolean;
2347
+ };
2348
+ }
2349
+ declare function NoObject$1(props: NoObjectProps$5): react_jsx_runtime.JSX.Element;
2350
+
2351
+ interface NoObjectProps$4 {
2352
+ id: string;
2353
+ name?: string;
2354
+ options: {
2355
+ header?: string;
2356
+ };
2357
+ }
2358
+ declare function LoadingObject(props: NoObjectProps$4): react_jsx_runtime.JSX.Element;
2359
+
2360
+ interface NoObjectProps$3 {
2361
+ id: string;
2362
+ name?: string;
2363
+ options: {
2364
+ header?: string;
2365
+ emptyifnone?: boolean;
2366
+ };
2367
+ }
2368
+ declare function MissingObject(props: NoObjectProps$3): react_jsx_runtime.JSX.Element;
2369
+
2370
+ interface NoObjectProps$2 {
2371
+ id: string;
2372
+ name?: string;
2373
+ properties?: {
2374
+ message?: string;
2375
+ };
2376
+ options: {
2377
+ header?: string;
2378
+ };
2379
+ }
2380
+ declare function ErrorObject(props: NoObjectProps$2): react_jsx_runtime.JSX.Element;
2381
+
2382
+ interface NoObjectProps$1 {
2383
+ id: string;
2384
+ name?: string;
2385
+ type?: string;
2386
+ options: {
2387
+ variant?: string;
2388
+ header?: string;
2389
+ emptyifnone?: boolean;
2390
+ };
2391
+ }
2392
+ declare function MissingComponentObject(props: NoObjectProps$1): react_jsx_runtime.JSX.Element;
2393
+
2394
+ interface NoObjectProps {
2395
+ id: string;
2396
+ name?: string;
2397
+ options: {
2398
+ header?: string;
2399
+ emptyifnone?: boolean;
2400
+ };
2401
+ }
2402
+ declare function NoObject(props: NoObjectProps): react_jsx_runtime.JSX.Element;
2403
+
2404
+ interface Props$8 {
2405
+ className?: string;
2406
+ }
2407
+ declare function FullSizer(props: PropsWithChildren<Props$8>): react_jsx_runtime.JSX.Element;
2408
+
2409
+ interface Props$7 {
2410
+ size: number;
2411
+ value?: number | null;
2412
+ target?: number | null;
2413
+ min?: number;
2414
+ max?: number;
2415
+ disabled?: boolean;
2416
+ readOnly?: boolean;
2417
+ origin?: 'up' | 'down' | 'left' | 'right';
2418
+ direction?: 'clockwise' | 'anticlockwise';
2419
+ onChange?: (value: number) => void;
2420
+ onInteractiveChange?: (value: number) => void;
2421
+ className: string;
2422
+ }
2423
+ /**
2424
+ * Widget to handle cyclic angle value in degree displayed as an infinite knob
2425
+ */
2426
+ declare function InfiniteKnob360(props: Props$7): react_jsx_runtime.JSX.Element;
2427
+
2428
+ declare function Gauge(props: {
2429
+ size: number;
2430
+ value: number | null;
2431
+ min: number;
2432
+ max: number;
2433
+ lowWarning?: number;
2434
+ hiWarning?: number;
2435
+ lowDanger?: number;
2436
+ hiDanger?: number;
2437
+ }): react_jsx_runtime.JSX.Element;
2438
+
2439
+ interface Props$6 {
2440
+ step?: number | string;
2441
+ steps?: (number | string)[];
2442
+ disabled: boolean;
2443
+ stepOnly?: boolean;
2444
+ id?: string;
2445
+ unit?: string;
2446
+ overlay?: ReactNode | null;
2447
+ incIcon?: string;
2448
+ decIcon?: string;
2449
+ swapIncDec?: boolean;
2450
+ className?: string;
2451
+ type?: 'number' | 'text';
2452
+ precision?: number;
2453
+ horizontalArrows?: boolean;
2454
+ largeArrows?: boolean;
2455
+ onBlur: () => void;
2456
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
2457
+ onStep: (params: {
2458
+ target: HTMLInputElement;
2459
+ }) => void;
2460
+ onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
2461
+ }
2462
+ declare const NumericStep: react.ForwardRefExoticComponent<Props$6 & react.RefAttributes<HTMLInputElement>>;
2463
+
2464
+ declare function PanelHeader(props: PropsWithChildren<{
2465
+ style?: Record<string, any>;
2466
+ }>): react_jsx_runtime.JSX.Element;
2467
+ declare function PanelContents(props: PropsWithChildren<{
2468
+ style?: Record<string, any>;
2469
+ className?: string;
2470
+ }>): react_jsx_runtime.JSX.Element;
2471
+ interface Props$5 {
2472
+ style?: Record<string, any>;
2473
+ scroll?: boolean;
2474
+ className?: string;
2475
+ }
2476
+ declare function Panel(props: PropsWithChildren<Props$5>): react_jsx_runtime.JSX.Element;
2477
+ declare namespace Panel {
2478
+ var Header: typeof PanelHeader;
2479
+ var Contents: typeof PanelContents;
2480
+ }
2481
+
2482
+ interface YamlNode {
2483
+ type: string;
2484
+ children?: YamlNode[];
2485
+ _parentNode: YamlNode | null;
2486
+ _indexFromParent: number | null;
2487
+ }
2488
+ interface YamlRoot extends YamlNode {
2489
+ name: string;
2490
+ error: string;
2491
+ }
2492
+ interface AnyYamlNode extends YamlNode {
2493
+ [key: string]: any;
2494
+ }
2495
+ interface YamlComponent {
2496
+ providers?: Record<string, any>;
2497
+ yamlNode: YamlNode;
2498
+ [option: string]: unknown;
2499
+ }
2500
+
2501
+ interface YamlTodoOptions {
2502
+ /** Message to display, defaults to "TODO" */
2503
+ message?: string;
2504
+ }
2505
+ declare function Yaml$1(props: YamlComponent & YamlTodoOptions): react_jsx_runtime.JSX.Element;
2506
+
2507
+ declare function Yaml(props: YamlComponent): react_jsx_runtime.JSX.Element;
2508
+
2509
+ /**
2510
+ * Component which display the state of a hardware.
2511
+ *
2512
+ * It is based on the type of the hardware, and fallback to the
2513
+ * `AnyHardwareState` component if no components are available.
2514
+ */
2515
+ declare function HardwareState(props: {
2516
+ hardware: AnyHardware | null;
2517
+ options?: {
2518
+ emptyifnone?: boolean;
2519
+ };
2520
+ }): react_jsx_runtime.JSX.Element;
2521
+
2522
+ interface StateComparator {
2523
+ /** The state comparator */
2524
+ comparator: string;
2525
+ /** The state value to compare */
2526
+ comparison: string;
2527
+ /** Optionally, a color for this comparison */
2528
+ color?: string;
2529
+ }
2530
+ interface SynopticElementType {
2531
+ /** The svg element class name */
2532
+ name: string;
2533
+ /** Which property to use as the value, i.e. `s1b.position` */
2534
+ value?: string;
2535
+ /** How many digits to display */
2536
+ value_display_digits?: number;
2537
+ /** Optionally, Which property to use to display the state. If left blank, the aggregated state from each element in `ids` below will be used */
2538
+ state?: string;
2539
+ /** Optionally, a comparison, can be a single comparison for red/green or a list of comparisons with colors */
2540
+ state_comparison?: StateComparator | StateComparator[];
2541
+ /** A list of hardware object ids to display on click */
2542
+ ids?: string[];
2543
+ }
2544
+ interface SynopticType {
2545
+ /** A list of elements to be mapped to their classes in the svg */
2546
+ elements: SynopticElementType[];
2547
+ /** The synoptic file to load */
2548
+ synoptic: string;
2549
+ /** Whether to enable daiquiri `colorisation` of icons */
2550
+ color_icons: boolean;
2551
+ }
2552
+ interface Props$4 {
2553
+ fetchSVG: (image: string) => Promise<{
2554
+ data: any;
2555
+ }>;
2556
+ getHardwareGroupComponent: (ids: string[]) => JSX.Element;
2557
+ hardwareObjects: Record<string, AnyHardware>;
2558
+ synoptic: SynopticType;
2559
+ }
2560
+ declare function Synoptic(props: Props$4): react_jsx_runtime.JSX.Element;
2561
+
2562
+ interface Props$3 {
2563
+ testid: string;
2564
+ layout: YamlRoot;
2565
+ className?: string;
2566
+ unhandledComponentDidCatch?: (error: Error, setStateCallback: (data: Record<string, any>) => void) => void;
2567
+ UnhandledErrorComponent?: React.ComponentType<any>;
2568
+ }
2569
+ declare function Main(props: Props$3): react_jsx_runtime.JSX.Element;
2570
+
2571
+ interface State {
2572
+ hasError: boolean;
2573
+ message: string;
2574
+ error?: Error;
2575
+ }
2576
+ interface Props$2 {
2577
+ resetKey?: any;
2578
+ unhandledComponentDidCatch?: (error: Error, setStateCallback: (data: Record<string, any>) => void) => void;
2579
+ UnhandledErrorComponent?: react__default.ComponentType<any>;
2580
+ }
2581
+ declare class ErrorBoundary extends Component<PropsWithChildren<Props$2>, State> {
2582
+ constructor(props: Props$2);
2583
+ static getDerivedStateFromError(): {
2584
+ hasError: boolean;
2585
+ };
2586
+ private readonly reload;
2587
+ componentDidCatch(error: Error): void;
2588
+ componentDidUpdate(prevProps: Props$2, prevState: State): void;
2589
+ render(): string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<react__default.ReactNode> | null | undefined;
2590
+ }
2591
+
2592
+ /**
2593
+ * Render a Yaml node using registred component from the node type
2594
+ */
2595
+ declare function renderYamlNode(yamlNode: AnyYamlNode, key: number | string, panel?: boolean): react_jsx_runtime.JSX.Element;
2596
+ declare class LayoutError extends Error {
2597
+ readonly yamlNode: YamlNode;
2598
+ constructor(message: string, yamlNode: YamlNode);
2599
+ }
2600
+ declare class MissingKeysError extends LayoutError {
2601
+ readonly keys: string[];
2602
+ constructor(yamlNode: YamlNode, missingKeys: string[]);
2603
+ }
2604
+ declare class KeyError extends LayoutError {
2605
+ readonly key: string;
2606
+ readonly keyMessage: string;
2607
+ constructor(yamlNode: YamlNode, key: string, message: string);
2608
+ }
2609
+
2610
+ /**
2611
+ * Store the mapping from Yaml `type` to React component handling the
2612
+ * rendering of such Yaml node
2613
+ */
2614
+ declare const yamlContainers: Record<string, ComponentType<any>>;
2615
+ /**
2616
+ * Register the Yaml type with the component used to render this Yaml node.
2617
+ */
2618
+ declare function registerYamlContainer(name: string, component: ComponentType<any>): void;
2619
+ declare const yamlComponents: Record<string, ComponentType<any>>;
2620
+ /**
2621
+ * Register a yaml component.
2622
+ *
2623
+ * Such component is wrapped inside a `Panel`.
2624
+ */
2625
+ declare function registerYamlComponent(name: string, component: ComponentType<any>): void;
2626
+ /**
2627
+ * Register multiple yaml components.
2628
+ *
2629
+ * Such components are wrapped inside a `Panel`.
2630
+ */
2631
+ declare function registerYamlComponents(map: Record<string, ComponentType<any>>): void;
2632
+ /**
2633
+ * Get the current mapping from Yaml `type` to registered component.
2634
+ */
2635
+ declare function getYamlComponents(): Record<string, ComponentType<any>>;
2636
+ /**
2637
+ * Get the current mapping from Yaml `type` to registered container.
2638
+ */
2639
+ declare function getYamlContainers(): Record<string, ComponentType<any>>;
2640
+
2641
+ type Defined<T> = T extends undefined ? never : T;
2642
+ declare function assertKeyExpected<T>(yamlNode: YamlNode | undefined, key: string, value: T): asserts value is Defined<T>;
2643
+ declare function assertString(yamlNode: YamlNode, key: string, value: any): asserts value is string;
2644
+ declare function assertBoolean(yamlNode: YamlNode, key: string, value: unknown): asserts value is boolean;
2645
+ declare function assertNumber(yamlNode: YamlNode, key: string, value: unknown): asserts value is number;
2646
+ declare function assertOptionalBoolean(yamlNode: YamlNode, key: string, value: unknown): asserts value is boolean | undefined;
2647
+ declare function assertOptionalString(yamlNode: YamlNode, key: string, value: unknown): asserts value is string | undefined;
2648
+ declare function assertStringList(yamlNode: YamlNode, key: string, value: unknown): asserts value is string[];
2649
+ declare function assertOptionalStringOrStringList(yamlNode: YamlNode, key: string, value: unknown): asserts value is string | string[] | undefined;
2650
+ declare function assertOptionalStringList(yamlNode: YamlNode, key: string, value: unknown): asserts value is string[] | undefined;
2651
+ declare function assertOptionalNumber(yamlNode: YamlNode, key: string, value: unknown): asserts value is number | undefined;
2652
+ declare function assertOptionalNumberList(yamlNode: YamlNode, key: string, value: unknown): asserts value is string[] | undefined;
2653
+ declare function assertOptionalListOfType<Y>(yamlNode: YamlNode, key: string, value: unknown, isType: (value: Y) => boolean, typeName: string): asserts value is Y[] | undefined;
2654
+ declare function assertNoUnknownKeys(yamlNode: YamlNode | undefined, remainingContent: Record<string, any>): void;
2655
+ declare function assertDataCollectionId(yamlNode: YamlNode, key: string, value: unknown): asserts value is number | 'last';
2656
+ declare function assertOptionalBackend(yamlNode: YamlNode, key: string, value: unknown): asserts value is 'plotly' | 'h5web' | undefined;
2657
+ /**
2658
+ * Assert function for generic 'args' as used in python
2659
+ * function with `*args`.
2660
+ *
2661
+ * The argument is validated as a list of unknown items.
2662
+ */
2663
+ declare function assertOptionalArgs(yamlNode: YamlNode, key: string, value: unknown): asserts value is unknown[] | undefined;
2664
+ /**
2665
+ * Assert function for generic 'kwargs' as used in python
2666
+ * function with `**kwargs`.
2667
+ *
2668
+ * The argument is validated as a record from string to unknown values.
2669
+ */
2670
+ declare function assertOptionalKwargs(yamlNode: YamlNode, key: string, value: unknown): asserts value is Record<string, unknown> | undefined;
2671
+ /**
2672
+ * Type a schema from it;s typescript description.
2673
+ *
2674
+ * See `assertStringMappingRecord`
2675
+ */
2676
+ type Schema<T> = Record<keyof T, (yamlNode: YamlNode, key: string, value: unknown) => void>;
2677
+ /**
2678
+ * Assert function for generic record of string.
2679
+ *
2680
+ * Can be used as the basis of a specific assertion.
2681
+ *
2682
+ * The argument is validated as a record from string to unknown values.
2683
+ *
2684
+ * @param options: Parsing parameters
2685
+ */
2686
+ declare function assertStringMappingRecord<T extends Partial<Record<string, any>>>(yamlNode: YamlNode, key: string, value: unknown, options: {
2687
+ /** If true, the value can be `undefined` */
2688
+ optional?: boolean;
2689
+ /** Mapping from expected keys to the relative assert function */
2690
+ schema: Record<string, (yamlNode: YamlNode, key: string, value: unknown) => void>;
2691
+ }): asserts value is T;
2692
+
2693
+ type asserts_d_Schema<T> = Schema<T>;
2694
+ declare const asserts_d_assertBoolean: typeof assertBoolean;
2695
+ declare const asserts_d_assertDataCollectionId: typeof assertDataCollectionId;
2696
+ declare const asserts_d_assertKeyExpected: typeof assertKeyExpected;
2697
+ declare const asserts_d_assertNoUnknownKeys: typeof assertNoUnknownKeys;
2698
+ declare const asserts_d_assertNumber: typeof assertNumber;
2699
+ declare const asserts_d_assertOptionalArgs: typeof assertOptionalArgs;
2700
+ declare const asserts_d_assertOptionalBackend: typeof assertOptionalBackend;
2701
+ declare const asserts_d_assertOptionalBoolean: typeof assertOptionalBoolean;
2702
+ declare const asserts_d_assertOptionalKwargs: typeof assertOptionalKwargs;
2703
+ declare const asserts_d_assertOptionalListOfType: typeof assertOptionalListOfType;
2704
+ declare const asserts_d_assertOptionalNumber: typeof assertOptionalNumber;
2705
+ declare const asserts_d_assertOptionalNumberList: typeof assertOptionalNumberList;
2706
+ declare const asserts_d_assertOptionalString: typeof assertOptionalString;
2707
+ declare const asserts_d_assertOptionalStringList: typeof assertOptionalStringList;
2708
+ declare const asserts_d_assertOptionalStringOrStringList: typeof assertOptionalStringOrStringList;
2709
+ declare const asserts_d_assertString: typeof assertString;
2710
+ declare const asserts_d_assertStringList: typeof assertStringList;
2711
+ declare const asserts_d_assertStringMappingRecord: typeof assertStringMappingRecord;
2712
+ declare namespace asserts_d {
2713
+ export { type asserts_d_Schema as Schema, 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_assertOptionalArgs as assertOptionalArgs, asserts_d_assertOptionalBackend as assertOptionalBackend, asserts_d_assertOptionalBoolean as assertOptionalBoolean, asserts_d_assertOptionalKwargs as assertOptionalKwargs, asserts_d_assertOptionalListOfType as assertOptionalListOfType, 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, asserts_d_assertStringMappingRecord as assertStringMappingRecord };
2714
+ }
2715
+
2716
+ interface YamlRowOptions {
2717
+ /** Inline CSS styles applied to the row */
2718
+ style?: Record<string, any>;
2719
+ }
2720
+
2721
+ interface YamlColOptions {
2722
+ /** Inline CSS styles applied to the column */
2723
+ style?: Record<string, any>;
2724
+ /** Bootstrap column width (1-12) */
2725
+ xs?: number;
2726
+ }
2727
+
2728
+ interface YamlContainerOptions {
2729
+ /** Options spread onto the underlying Container */
2730
+ options?: Record<string, any>;
2731
+ /** Inline CSS styles applied to the row */
2732
+ style?: Record<string, any>;
2733
+ }
2734
+
2735
+ interface YamlGridOptions {
2736
+ /** Grid panel title */
2737
+ title?: string;
2738
+ /** CSS grid-template-columns value */
2739
+ columns?: string;
2740
+ /** CSS grid-template-rows value */
2741
+ rows?: string;
2742
+ /** Inline CSS styles applied to the column */
2743
+ style?: Record<string, any>;
2744
+ }
2745
+ /** Options for an individual cell within a grid. */
2746
+ interface YamlGridCellOptions {
2747
+ /** Number of grid columns this cell spans */
2748
+ columnSpan?: number;
2749
+ /** Number of grid rows this cell spans */
2750
+ rowSpan?: number;
2751
+ }
2752
+
2753
+ interface YamlPanelOptions {
2754
+ /** Options spread onto the underlying Panel */
2755
+ options?: Record<string, any>;
2756
+ /** Panel title */
2757
+ title?: string;
2758
+ /** Center the panel's contents */
2759
+ centerContent?: boolean;
2760
+ /** Inline CSS styles applied to the underlying Panel */
2761
+ style?: Record<string, any>;
2762
+ }
2763
+
2764
+ /** Options for an individual tab within Tabs */
2765
+ interface YamlTabsRowOptions {
2766
+ /** Tab header */
2767
+ title?: string;
2768
+ /** Inline CSS styles applied to the tab's content pane */
2769
+ style?: Record<string, any>;
2770
+ }
2771
+ interface YamlTabsOptions {
2772
+ /** Options spread onto the underlying Panel */
2773
+ options?: Record<string, any>;
2774
+ /** Tabs panel title */
2775
+ title: string;
2776
+ /** Inline CSS styles applied to the underlying Panel */
2777
+ style?: Record<string, any>;
2778
+ }
2779
+
2780
+ /** A section header spanning both columns of the form grid. */
2781
+ interface YamlFormHeaderOptions {
2782
+ type: 'formheader';
2783
+ /** Header text */
2784
+ title?: string;
2785
+ /** Inline CSS styles applied to the form's content grid */
2786
+ style?: Record<string, any>;
2787
+ }
2788
+
2789
+ /** A single labelled row of the form, rendering its content in the second column. */
2790
+ interface YamlFormRowOptions {
2791
+ /** Type of the node rendered in the row's content column (e.g. 'hardware') */
2792
+ type: string;
2793
+ /** Row title shown in the first column; for hardware rows, defaults to the hardware id's name if unset */
2794
+ title: string;
2795
+ /** For hardware rows, show the hardware state under the title */
2796
+ stateinheader?: boolean;
2797
+ /** CSS align-self applied to the title cell */
2798
+ titlealign?: string;
2799
+ /** Hardware id, used for the default title and passed to the rendered content node */
2800
+ id?: string;
2801
+ /** Hardware variant passed to the rendered content node */
2802
+ variant?: string;
2803
+ /** Passed through to the rendered content node */
2804
+ options?: Record<string, any>;
2805
+ /** Passed through to the rendered content node */
2806
+ even: boolean;
2807
+ }
2808
+ interface YamlFormOptions {
2809
+ /** Form panel title */
2810
+ title?: string;
2811
+ /** Options spread onto the underlying Panel */
2812
+ options?: Record<string, any>;
2813
+ /** Inline CSS styles applied to the form's content grid */
2814
+ style?: Record<string, any>;
2815
+ }
2816
+
2817
+ interface YamlLabelOptions {
2818
+ /** Text to display */
2819
+ label: string;
2820
+ }
2821
+
2822
+ interface RuntimeHooks {
2823
+ useHardware?: (id: string | null) => AnyHardware | null;
2824
+ useHardwareChangeActions?: (name: string | null) => HardwareChangeActions;
2825
+ useHardwareSchema?: (hardware: {
2826
+ id: string;
2827
+ type: string;
2828
+ } | null) => HardwareSchemaDescription | null;
2829
+ useOperator?: () => boolean;
2830
+ useScanRunning?: () => boolean;
2831
+ }
2832
+ declare function registerRuntimeHook(hooks: Partial<RuntimeHooks>): void;
2833
+ /**
2834
+ * Return a hardware from it's hardware name.
2835
+ *
2836
+ * Return `null` if the name refers to nothing.
2837
+ *
2838
+ * @param name: An hardware identifier, or null
2839
+ */
2840
+ declare function useHardware(id: string | null): AnyHardware | null;
2841
+ /**
2842
+ * Expose the generic actions provided by a specific hardware.
2843
+ *
2844
+ * If null is passed, dummy actions are exposed.
2845
+ *
2846
+ * @param name: Am hardware identifier, or null
2847
+ */
2848
+ declare function useHardwareChangeActions(name: string | null): HardwareChangeActions;
2849
+ /**
2850
+ * Expose the generic actions provided by a specific hardware.
2851
+ *
2852
+ * If null is passed, dummy actions are exposed.
2853
+ *
2854
+ * @param name: Am hardware identifier, or null
2855
+ */
2856
+ declare function useHardwareSchema(hardware: {
2857
+ id: string;
2858
+ type: string;
2859
+ } | null): HardwareSchemaDescription | null;
2860
+ /**
2861
+ * True if the actual user can control the beamline (like moving motors)
2862
+ */
2863
+ declare function useOperator(): boolean;
2864
+ /**
2865
+ * True if a scan is actually running
2866
+ */
2867
+ declare function useScanRunning(): boolean;
2868
+
2869
+ interface Monitor {
2870
+ /**
2871
+ * Title shown above the value.
2872
+ */
2873
+ name: string;
2874
+ /**
2875
+ * Describe the kind of widget.
2876
+ *
2877
+ * NOTE: New components can be registered with `registerMonitorComponent`
2878
+ */
2879
+ type?: string;
2880
+ }
2881
+
2882
+ /** Valid `comparator` values for a Monitor's `comparator`/`comparison` pair — see `dynamicOp`. */
2883
+ declare const COMPARATORS: string[];
2884
+ declare const dynamicOp: (op: string, a1: any, b1: any) => boolean | undefined;
2885
+ interface MonitorHardwarePropertyOptions {
2886
+ /**
2887
+ * The value to display, a path, for example `omega.position`
2888
+ */
2889
+ value: string;
2890
+ /**
2891
+ * An optional second value shown in a tooltip on
2892
+ * hover. Again a path.
2893
+ */
2894
+ overlay?: string;
2895
+ /**
2896
+ * One of `COMPARATORS`, green if the comparison holds,
2897
+ * red otherwise, grey if either `comparator` or `comparison` is unset.
2898
+ */
2899
+ comparator?: string;
2900
+ /**
2901
+ * The value `comparator` compares the
2902
+ * live `value` against.schema
2903
+ */
2904
+ comparison?: any;
2905
+ /**
2906
+ * A fixed unit string (e.g. `mA`)
2907
+ */
2908
+ unit?: string;
2909
+ }
2910
+ interface Props$1 {
2911
+ monitor: MonitorHardwarePropertyOptions & Monitor;
2912
+ }
2913
+ declare function MonitorHardwareProperty(props: Props$1): react_jsx_runtime.JSX.Element;
2914
+
2915
+ interface MonitorHardwareOptions {
2916
+ /**
2917
+ * The hardware id to render
2918
+ */
2919
+ id?: string;
2920
+ }
2921
+ interface Props {
2922
+ monitor: MonitorHardwareOptions & Monitor;
2923
+ }
2924
+ /**
2925
+ * HardwareMonitor which provide callback to get the
2926
+ * component from the hardware type.
2927
+ */
2928
+ declare function MonitorHardware(props: Props): react_jsx_runtime.JSX.Element;
2929
+
2930
+ interface MonitorMapping {
2931
+ [name: string]: ComponentType<any>;
2932
+ }
2933
+ declare function registerMonitorComponent(name: string, component: React.ComponentType<any>): void;
2934
+ declare function getAllMonitors(): MonitorMapping;
2935
+ interface MonitorPanelProps {
2936
+ monitors: Monitor[];
2937
+ margin?: 'start' | null;
2938
+ bg?: 'light' | null;
2939
+ }
2940
+ declare function MonitorPanel(props: MonitorPanelProps): react_jsx_runtime.JSX.Element;
2941
+
2942
+ interface MonitorPanelItemProps {
2943
+ className?: string;
2944
+ style?: Record<string, unknown>;
2945
+ }
2946
+ /**
2947
+ * Component for any item displayed in the monitor panel.
2948
+ *
2949
+ * The implementation with `forwardRef` and `...rest` allow
2950
+ * to use it inside a `OverlayTrigger`
2951
+ *
2952
+ * @param rest: Passthough to allow to wrap the component inside
2953
+ * OverlayTrigger. It contains callbacks.
2954
+ */
2955
+ declare const MonitorPanelItem: react.ForwardRefExoticComponent<MonitorPanelItemProps & {
2956
+ children?: react.ReactNode | undefined;
2957
+ } & react.RefAttributes<HTMLDivElement>>;
2958
+
2959
+ /**
2960
+ * Drop the leading `$` from a hardware id reference (e.g. `$sampz`).
2961
+ *
2962
+ * @todo: In the future this should be done earlier and
2963
+ * should raise a parsing error
2964
+ */
2965
+ declare function normalizeId(id: unknown): string | null;
2966
+
2967
+ /**
2968
+ * Register an hardware variant.
2969
+ */
2970
+ declare function registerHardwareVariant(type: string, variant: string, component: HardwareComponentType<AnySchema>): void;
2971
+ /**
2972
+ * Return a hardware variant component.
2973
+ *
2974
+ * - Check first if a hardware type and variant
2975
+ * is registered, return it.
2976
+ * - Else, check if the 'base' type and variant
2977
+ * is registered, return it
2978
+ * - Else, return null
2979
+ *
2980
+ * @param type: Type of the hardware
2981
+ * @param variant: Variant requested
2982
+ */
2983
+ declare function getHardwareVariantComponent(type: string, variant: string): HardwareComponentType | null;
2984
+ /**
2985
+ * Get the full list of hardware descriptions.
2986
+ */
2987
+ declare function getAllHardwareDesc(): Record<string, HardwareDesc<AnyHardware>>;
2988
+
2989
+ export { type ActuatorSchema, AirBearing, AirBearingHardwareDesc, Mocks$p as AirBearingMocks, AirBearingProtected, type AirBearingSchema, AirBearingSimulator, AirBearingState, type AnyHardware, type AnySchema, type BaseHardware, BaseHardwareDesc, Info as BaseInfo, type BaseInfoWidgetOptions, Mocks$q as BaseMocks, Name as BaseName, type BaseNameWidgetOptions, Property as BaseProperty, type BasePropertyWidgetOptions, DefaultState$1 as BaseState, BeamlineHardwareDesc, Beamviewer, BeamviewerHardwareDesc, Mocks$o as BeamviewerMocks, type BeamviewerSchema, BeamviewerSimulator, COMPARATORS, EnergyManagerDefault, EnergyManagerHardwareDesc, Mocks$n as EnergyManagerMocks, type EnergyManagerSchema, EnergyManagerSimulator, EnergyManagerState, ErrorObject, type ExceptionFromProcedure, FiltersetDefault, FiltersetHardwareDesc, Mocks$m as FiltersetMocks, type FiltersetSchema, FiltersetSimulator, DefaultState as FiltersetState, formatting_d as Formatting, Frontend, FrontendHardwareDesc, Mocks$l as FrontendMocks, type FrontendSchema, FullSizer, Gauge$1 as Gauge, GaugeHardwareDesc, Gauge as GaugeIndicator, Mocks$k as GaugeMocks, type GaugeSchema, type GaugeWidgetOptions, type GenericSchema, type Hardware, type HardwareComponentType, type HardwareDesc, type HardwareFromProcedure, HardwareInputNumber, HardwareNumericStep, type HardwareObjectProps, schema_d as HardwareSchema, HardwareState, HardwareTemplate, types_d as HardwareTypes, type HardwareVariant, InfiniteKnob360, KeyError, Laser, LaserHardwareDesc, LaserHeating, LaserHeatingHardwareDesc, Mocks$i as LaserHeatingMocks, type LaserHeatingSchema, type LaserHeatingWidgetOptions, Mocks$j as LaserMocks, type LaserSchema, type LaserWidgetOptions, Light, LightHardwareDesc, Mocks$h as LightMocks, type LightSchema, LimaBinning, LimaDefault, TomoDetectorSize$2 as LimaDescription, LimaHardwareDesc, TomoDetectorSize$1 as LimaImageRoi, Mocks$g as LimaMocks, type LimaSchema, LimaRoiShape as LimaShape, LimaSimulator, TomoDetectorSize as LimaSize, LimaState, LimaTransformation, LoadingObject, MeasurementGroup as MeasurementGroupDefault, MeasurementGroupHardwareDesc, Mocks$f as MeasurementGroupMocks, type MeasurementGroupSchema, MeasurementGroupSimulator, MissingComponentObject, MissingKeysError, MissingObject, type Monitor, MonitorHardware, MonitorHardwareProperty, MonitorPanel, MonitorPanelItem, type MonitorPanelProps, MotorDefault, type MotorDefaultOptions, MotorHardwareDesc, Mocks$e as MotorMocks, MotorRotation, type MotorSchema, MotorSimulator, MotorState, MotorText, MultiState, Multiposition$1 as Multiposition, Multiposition as MultipositionDefault2, type MultipositionDefault2Options, MultipositionHardwareDesc, Mocks$d as MultipositionMocks, type MultipositionSchema, MultipositionSimulator, NoObject$1 as NoObject, Yaml as None, NoObject as NullObject, NumericStep, Optic as OpticDefault, OpticHardwareDesc, Mocks$c as OpticMocks, type OpticSchema, OpticSimulator, OpticState, type OpticWidgetOptions, Panel, Actions as ProcedureActions, ProcedureExecution, FinishedState as ProcedureFinishedState, ProcedureHardwareDesc, ProcedureManage, Mocks$b as ProcedureMocks, type ProcedureOptions, type ProcedureSchema, ProcedureState, ProcedureValidate, Pump as PumpDefault, PumpHardwareDesc, Mocks$7 as PumpMocks, type PumpSchema, Pusher as PusherDefault, PusherHardwareDesc, Mocks$6 as PusherMocks, type PusherOptions, type PusherSchema, PusherSimulator, PusherState, RegulationLoop as RegulationDefault, RegulationHardwareDesc, Mocks$a as RegulationMocks, type RegulationOptions, RegulationPlot, type RegulationSchema, RegulationSimulator, type ScanFromProcedure, ServiceDefault, ServiceHardwareDesc, Mocks$5 as ServiceMocks, ServiceProtected, type ServiceSchema, ServiceState, ShutterDefault, ShutterHardwareDesc, Mocks$9 as ShutterMocks, ShutterProtected, type ShutterSchema, ShutterSimulator, ShutterState, SlitDefault, SlitHardwareDesc, Mocks$8 as SlitMocks, type SlitSchema, SlitState, State$1 as State, Synoptic, type SynopticElementType, type SynopticType, Yaml$1 as Todo, TomoConfigHardwareDesc, TomoConfigLatencyTime, type TomoConfigSchema, TomoDetectorAcquisitionMode, type TomoDetectorFieldOfViewOptions, TomoDetectorHardwareDesc, Mocks$3 as TomoDetectorMocks, TomoDetectorSamplePixelSize, type TomoDetectorSchema, TomoDetectorState, TomoDetectors as TomoDetectorsDefault, TomoDetectorsHardwareDesc, Mocks$2 as TomoDetectorsMocks, type TomoDetectorsSchema, TomoDetectorsState, TomoFlatMotionDefault, TomoFlatMotionHardwareDesc, Mocks$4 as TomoFlatMotionMocks, type TomoFlatMotionSchema, TomoFlatMotionSimulator, TomoFlatMotionSmall, TomoFlatMotionState, type TomoFlatMotionStep, type TomoHoloDistance, TomoHoloHardwareDesc, type TomoHoloSchema, TomoHoloState, TomoImagingActions, TomoImagingDefault, TomoImagingExposureTime, TomoImagingHardwareDesc, Mocks$1 as TomoImagingMocks, type TomoImagingOptions, type TomoImagingSchema, TomoImagingSettleTime, TomoImagingSimulator, TomoImagingState, TomoImagingUpdateMode, TomoReferencePositionDefault, TomoReferencePositionHardwareDesc, type TomoReferencePositionSchema, TomoSampleStageHardwareDesc, type TomoSampleStageSchema, TypeIcon, type Props$a as TypeIconOptions, Valve as ValveDefault, ValveHardwareDesc, Mocks as ValveMocks, type ValveSchema, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlColOptions, type YamlComponent, type YamlContainerOptions, type YamlFormHeaderOptions, type YamlFormOptions, type YamlFormRowOptions, type YamlGridCellOptions, type YamlGridOptions, type YamlLabelOptions, type YamlNode, type YamlPanelOptions, type YamlRowOptions, type YamlTabsOptions, type YamlTabsRowOptions, type YamlTodoOptions, createMotorMock, dynamicOp, getAllHardwareDesc, getAllMonitors, getHardwareVariantComponent, getYamlComponents, getYamlContainers, isLimaHardware, isMotorClockWise, isMotorHardware, isOpticHardware, isProcedureHardware, isTomoConfigHardware, isTomoDetectorHardware, isTomoDetectorsHardware, isTomoFlatMotionHardware, isTomoHoloHardware, isTomoReferencePositionHardware, isTomoSampleStageHardware, limaGuessSubframes, motorLimits, normalizeId, registerHardwareVariant, registerMonitorComponent, registerRuntimeHook, registerYamlComponent, registerYamlComponents, registerYamlContainer, renderYamlNode, useHardware, useHardwareChangeActions, useHardwareSchema, useLimaHardware, useMotorHardware, useMotorStates, useOperator, useProcedureHardware, useScanRunning, useTomoConfigHardware, useTomoDetectorHardware, useTomoDetectorsHardware, useTomoFlatMotionHardware, useTomoHoloHardware, useTomoSampleStageHardware, yamlComponents, yamlContainers };