@esrf/daiquiri-lib 0.0.2-alpha.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @esrf/daiquiri-lib
2
+
3
+ Shared UI components and associated machinary from the [daiquiri-ui](https://gitlab.esrf.fr/ui/daiquiri-ui) project for beamline control and data acquisition. These shared components allow for a consistent look and feel for projects outside of the [daiquiri](https://ui.gitlab-pages.esrf.fr/daiquiri-landing/) core.
4
+
5
+ The library currently exports the YAML layout language, validator, and renderer, and a selection of hardware components.
6
+
7
+ See our [documentation](https://ui.gitlab-pages.esrf.fr/daiquiri-ui/daiquiri-lib) for more information.
package/dist/index.d.ts CHANGED
@@ -229,7 +229,7 @@ declare function Property(props: HardwareWidgetProps<GenericSchema, PropertyWidg
229
229
 
230
230
  declare function ShutterDefault(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): JSX.Element;
231
231
 
232
- interface Props$5 {
232
+ interface Props$b {
233
233
  online: boolean;
234
234
  activeMessage?: string;
235
235
  inactiveMessage?: string;
@@ -237,9 +237,9 @@ interface Props$5 {
237
237
  icon: string;
238
238
  name: string;
239
239
  }
240
- declare function TypeIcon(props: Props$5): JSX.Element;
240
+ declare function TypeIcon(props: Props$b): JSX.Element;
241
241
 
242
- interface Props$4 {
242
+ interface Props$a {
243
243
  hardware: Hardware;
244
244
  headerMode?: string;
245
245
  widgetIcon: ReactElement;
@@ -250,7 +250,7 @@ interface Props$4 {
250
250
  * Normalized way to compose hardware component in order to provide the same
251
251
  * kind of layout
252
252
  */
253
- declare function HardwareTemplate(props: Props$4): JSX.Element;
253
+ declare function HardwareTemplate(props: Props$a): JSX.Element;
254
254
 
255
255
  /**
256
256
  * Input number synchronized with a hardware.
@@ -367,12 +367,12 @@ declare class HardwareVariant extends Component<HardwareVariantOptions, void> {
367
367
  render(): JSX.Element;
368
368
  }
369
369
 
370
- interface Props$3 {
370
+ interface Props$9 {
371
371
  className?: string;
372
372
  }
373
- declare function FullSizer(props: PropsWithChildren<Props$3>): JSX.Element;
373
+ declare function FullSizer(props: PropsWithChildren<Props$9>): JSX.Element;
374
374
 
375
- interface Props$2 {
375
+ interface Props$8 {
376
376
  step?: number;
377
377
  steps?: number[];
378
378
  disabled: boolean;
@@ -394,7 +394,7 @@ interface Props$2 {
394
394
  }) => void;
395
395
  onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
396
396
  }
397
- declare const NumericStep: react.ForwardRefExoticComponent<Props$2 & react.RefAttributes<HTMLInputElement>>;
397
+ declare const NumericStep: react.ForwardRefExoticComponent<Props$8 & react.RefAttributes<HTMLInputElement>>;
398
398
 
399
399
  interface YamlNode {
400
400
  type: string;
@@ -409,14 +409,131 @@ interface YamlRoot extends YamlNode {
409
409
  interface AnyYamlNode extends YamlNode {
410
410
  [key: string]: any;
411
411
  }
412
- interface YamlComponent {
412
+ interface YamlComponent$1 {
413
413
  providers?: Record<string, any>;
414
414
  yamlNode: YamlNode;
415
415
  [option: string]: unknown;
416
416
  }
417
417
 
418
+ interface Props$7 {
419
+ yamlNode: AnyYamlNode;
420
+ panel: boolean;
421
+ }
422
+ declare function YamlRow({ yamlNode, panel }: Props$7): JSX.Element;
423
+
424
+ interface Props$6 {
425
+ yamlNode: AnyYamlNode;
426
+ panel: boolean;
427
+ }
428
+ declare function YamlCol({ yamlNode, panel }: Props$6): JSX.Element;
429
+
418
430
  declare function registerComponent(name: string, component: React.ComponentType<any>): void;
431
+ interface YamlComponentNode extends YamlNode {
432
+ type: string;
433
+ [name: string]: any;
434
+ scroll?: boolean;
435
+ style?: Record<string, any>;
436
+ title?: string;
437
+ }
438
+ declare function YamlComponent(props: {
439
+ yamlNode: YamlComponentNode;
440
+ panel: boolean;
441
+ }): JSX.Element;
442
+
443
+ interface Props$5 {
444
+ yamlNode: {
445
+ children: any[];
446
+ options?: Record<string, any>;
447
+ };
448
+ panel: boolean;
449
+ }
450
+ declare function YamlContainer({ yamlNode, panel }: Props$5): JSX.Element;
451
+
452
+ interface Props$4 {
453
+ yamlNode: {
454
+ children: any[];
455
+ options?: Record<string, any>;
456
+ title?: string;
457
+ };
458
+ panel: boolean;
459
+ }
460
+ declare function YamlPanel(props: Props$4): ReactElement;
461
+
462
+ interface Props$3 {
463
+ yamlNode: {
464
+ children: any[];
465
+ options?: Record<string, any>;
466
+ title: string;
467
+ };
468
+ panel: boolean;
469
+ }
470
+ declare function YamlTabs({ yamlNode, panel }: Props$3): JSX.Element;
471
+
472
+ interface YamlFormHeaderNode extends YamlNode {
473
+ type: 'formheader';
474
+ title?: string;
475
+ }
476
+ interface YamlFormRowNode extends YamlNode {
477
+ type: string;
478
+ title: string;
479
+ component?: string;
480
+ stateinheader?: boolean;
481
+ titlealign?: string;
482
+ id?: string;
483
+ variant?: string;
484
+ options?: Record<string, any>;
485
+ even: boolean;
486
+ }
487
+ interface YamlFormNode extends YamlNode {
488
+ children: (YamlFormHeaderNode | YamlFormRowNode)[];
489
+ title?: string;
490
+ [key: string]: any;
491
+ }
492
+ declare function YamlForm(props: {
493
+ yamlNode: YamlFormNode;
494
+ panel: boolean;
495
+ }): JSX.Element;
496
+
497
+ interface YamlGridNode extends YamlNode {
498
+ children: YamlGridCellNode[];
499
+ title?: string;
500
+ columns?: string;
501
+ rows?: string;
502
+ }
503
+ interface YamlGridCellNode extends YamlNode {
504
+ columnSpan?: number;
505
+ rowSpan?: number;
506
+ }
507
+ declare function YamlGrid(props: {
508
+ yamlNode: YamlGridNode;
509
+ panel: boolean;
510
+ }): JSX.Element;
419
511
 
512
+ interface Props$2 {
513
+ yamlNode: {
514
+ children: any[];
515
+ options?: {
516
+ [name: string]: any;
517
+ scroll?: boolean;
518
+ style?: Record<string, any>;
519
+ };
520
+ label?: string;
521
+ };
522
+ panel: boolean;
523
+ }
524
+ declare function YamlLabel({ yamlNode, panel }: Props$2): JSX.Element;
525
+
526
+ declare const yamlMap: {
527
+ row: typeof YamlRow;
528
+ col: typeof YamlCol;
529
+ container: typeof YamlContainer;
530
+ component: typeof YamlComponent;
531
+ panel: typeof YamlPanel;
532
+ tabs: typeof YamlTabs;
533
+ form: typeof YamlForm;
534
+ grid: typeof YamlGrid;
535
+ label: typeof YamlLabel;
536
+ };
420
537
  interface Props$1 {
421
538
  id: string;
422
539
  layout: YamlRoot;
@@ -535,4 +652,31 @@ declare namespace HardwareObject_d {
535
652
  */
536
653
  declare function registerHardwareComponent(name: string, component: React.ComponentType<any>): void;
537
654
 
538
- export { formatting_d as Formatting, Frontend, FullSizer, HardwareObject_d as HWObject, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, HardwareVariant, Info, KeyError, MissingKeysError, MotorDefault, type MotorDefaultOptions, Multiposition, NoObject, NumericStep, Property, ShutterDefault, TypeIcon, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent, type YamlNode, registerHardwareComponent, registerComponent as registerYamlComponent, registerYamlType, renderYamlNode };
655
+ interface Monitor {
656
+ name: string;
657
+ type?: string;
658
+ value: string;
659
+ overlay?: string;
660
+ comparator?: string;
661
+ comparison?: any;
662
+ unit?: string;
663
+ }
664
+
665
+ declare function registerRuntimeHook(name: string, hook: (id: string | null) => Hardware | null): void;
666
+ declare const dynamicOp: (op: string, a1: any, b1: any) => boolean | undefined;
667
+ declare function MonitorHardware(props: {
668
+ monitor: Monitor;
669
+ }): JSX.Element;
670
+
671
+ declare function registerMonitorComponent(name: string, component: React.ComponentType<any>): void;
672
+ interface MonitorPanelProps {
673
+ monitors: Monitor[];
674
+ margin?: 'start' | null;
675
+ bg?: 'light' | null;
676
+ }
677
+ declare function MonitorPanel(props: MonitorPanelProps): JSX.Element;
678
+ interface MonitorPanelItemProps {
679
+ }
680
+ declare function MonitorPanelItem(props: PropsWithChildren<MonitorPanelItemProps>): JSX.Element;
681
+
682
+ export { formatting_d as Formatting, Frontend, FullSizer, HardwareObject_d as HWObject, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, HardwareVariant, Info, type InfoOptions, KeyError, MissingKeysError, type Monitor, MonitorHardware, MonitorPanel, MonitorPanelItem, type MonitorPanelProps, MotorDefault, type MotorDefaultOptions, Multiposition, NoObject, NumericStep, Property, ShutterDefault, TypeIcon, type Props$b as TypeIconOptions, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent$1 as YamlComponent, type YamlNode, dynamicOp, registerHardwareComponent, registerMonitorComponent, registerRuntimeHook, registerComponent as registerYamlComponent, registerYamlType, renderYamlNode, yamlMap };