@procaaso/alphinity-ui-components 1.11.0 → 1.13.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 +3 -0
- package/dist/index.cjs +901 -644
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +327 -92
- package/dist/index.d.ts +327 -92
- package/dist/index.js +713 -464
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import * as _emotion_styled from '@emotion/styled';
|
|
4
4
|
import * as _emotion_react from '@emotion/react';
|
|
5
5
|
import * as _mui_system from '@mui/system';
|
|
6
6
|
import * as _mui_material from '@mui/material';
|
|
7
7
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
8
8
|
|
|
9
|
-
interface ButtonProps extends
|
|
9
|
+
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
10
|
variant?: 'primary' | 'secondary';
|
|
11
|
-
children:
|
|
11
|
+
children: React__default.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare const Button:
|
|
13
|
+
declare const Button: React__default.FC<ButtonProps>;
|
|
14
14
|
|
|
15
15
|
interface SelectorOption {
|
|
16
16
|
/** Unique value for the option */
|
|
@@ -22,7 +22,7 @@ interface SelectorOption {
|
|
|
22
22
|
/** Optional description for tooltip or additional context */
|
|
23
23
|
description?: string;
|
|
24
24
|
}
|
|
25
|
-
interface SelectorProps extends Omit<
|
|
25
|
+
interface SelectorProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
26
26
|
/** Currently selected value */
|
|
27
27
|
value: string;
|
|
28
28
|
/** Callback when selection changes */
|
|
@@ -42,12 +42,17 @@ interface SelectorProps extends Omit<react__default.HTMLAttributes<HTMLDivElemen
|
|
|
42
42
|
/** Whether the dropdown should open upward */
|
|
43
43
|
dropdownUp?: boolean;
|
|
44
44
|
}
|
|
45
|
-
declare const Selector:
|
|
45
|
+
declare const Selector: React__default.FC<SelectorProps>;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Status levels for telemetry values
|
|
48
|
+
* Status levels for telemetry values.
|
|
49
|
+
*
|
|
50
|
+
* `unknown` marks a value the backend does not trust. OPC UA publishes this
|
|
51
|
+
* condition as StatusCode severity Bad. This library never derives `unknown`
|
|
52
|
+
* from a number or a threshold. This library only displays an `unknown`
|
|
53
|
+
* value that the backend has already published.
|
|
49
54
|
*/
|
|
50
|
-
type TelemetryStatus$1 = 'normal' | 'warning' | 'alarm' | 'fault' | 'off';
|
|
55
|
+
type TelemetryStatus$1 = 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'unknown';
|
|
51
56
|
/**
|
|
52
57
|
* Marks a value as a maintenance force rather than a measured reading
|
|
53
58
|
* (alphinity-tffi issue #3607, unit U11). A forced value is a deliberate
|
|
@@ -171,6 +176,7 @@ interface TelemetryBinding {
|
|
|
171
176
|
alarm?: string;
|
|
172
177
|
fault?: string;
|
|
173
178
|
off?: string;
|
|
179
|
+
unknown?: string;
|
|
174
180
|
};
|
|
175
181
|
/** Display configuration */
|
|
176
182
|
display?: {
|
|
@@ -225,7 +231,7 @@ interface ModeConfig {
|
|
|
225
231
|
/** Precision for second setpoint */
|
|
226
232
|
secondPrecision?: number;
|
|
227
233
|
}
|
|
228
|
-
interface ControlPanelProps extends
|
|
234
|
+
interface ControlPanelProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
229
235
|
/** Panel title/identifier */
|
|
230
236
|
title: string;
|
|
231
237
|
/** Currently selected mode */
|
|
@@ -310,14 +316,26 @@ interface ControlPanelProps extends react__default.HTMLAttributes<HTMLDivElement
|
|
|
310
316
|
/** Custom stop button text */
|
|
311
317
|
stopButtonText?: string;
|
|
312
318
|
}
|
|
313
|
-
declare const ControlPanel:
|
|
319
|
+
declare const ControlPanel: React__default.FC<ControlPanelProps>;
|
|
314
320
|
|
|
315
|
-
interface StatusIndicatorProps extends
|
|
316
|
-
/**
|
|
317
|
-
|
|
321
|
+
interface StatusIndicatorProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
322
|
+
/**
|
|
323
|
+
* Status state determining color and behavior.
|
|
324
|
+
*
|
|
325
|
+
* `unknown` marks a value the backend does not trust. Set `unknown` only
|
|
326
|
+
* from a published bad-quality read. Do not derive `unknown` from a number
|
|
327
|
+
* or a threshold in this component.
|
|
328
|
+
*/
|
|
329
|
+
status: 'off' | 'normal' | 'alarm' | 'warning' | 'active' | 'fault' | 'unknown';
|
|
318
330
|
/** Size of the indicator */
|
|
319
331
|
size?: 'small' | 'medium' | 'large';
|
|
320
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Animation behavior. Default is `none`.
|
|
334
|
+
*
|
|
335
|
+
* ISA-18.2 reserves blinking for an unacknowledged alarm. The `unknown`
|
|
336
|
+
* status does not clamp this prop to `none`. Pass `animation` only when
|
|
337
|
+
* the alarm state of the point needs it.
|
|
338
|
+
*/
|
|
321
339
|
animation?: 'none' | 'pulse' | 'blink' | 'flash';
|
|
322
340
|
/** Label text to display next to indicator */
|
|
323
341
|
label?: string;
|
|
@@ -346,9 +364,9 @@ interface StatusIndicatorProps extends react__default.HTMLAttributes<HTMLDivElem
|
|
|
346
364
|
*/
|
|
347
365
|
realValue?: string;
|
|
348
366
|
}
|
|
349
|
-
declare const StatusIndicator:
|
|
367
|
+
declare const StatusIndicator: React__default.FC<StatusIndicatorProps>;
|
|
350
368
|
|
|
351
|
-
interface ValueEntryProps extends Omit<
|
|
369
|
+
interface ValueEntryProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
352
370
|
/** Current value */
|
|
353
371
|
value: number | string;
|
|
354
372
|
/** Callback when value changes */
|
|
@@ -383,9 +401,9 @@ interface ValueEntryProps extends Omit<react__default.InputHTMLAttributes<HTMLIn
|
|
|
383
401
|
*/
|
|
384
402
|
realValue?: number | string;
|
|
385
403
|
}
|
|
386
|
-
declare const ValueEntry:
|
|
404
|
+
declare const ValueEntry: React__default.FC<ValueEntryProps>;
|
|
387
405
|
|
|
388
|
-
interface LegacyValueEntryProps extends Omit<
|
|
406
|
+
interface LegacyValueEntryProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
389
407
|
/** Current value */
|
|
390
408
|
value: number | string;
|
|
391
409
|
/** Callback when value changes */
|
|
@@ -417,7 +435,7 @@ interface LegacyValueEntryProps extends Omit<react__default.InputHTMLAttributes<
|
|
|
417
435
|
*/
|
|
418
436
|
realValue?: number | string;
|
|
419
437
|
}
|
|
420
|
-
declare const LegacyValueEntry:
|
|
438
|
+
declare const LegacyValueEntry: React__default.FC<LegacyValueEntryProps>;
|
|
421
439
|
|
|
422
440
|
interface NodeControlConfig {
|
|
423
441
|
/** Node ID */
|
|
@@ -461,7 +479,7 @@ interface NodeControlConfig {
|
|
|
461
479
|
/** Whether setpoint is read-only */
|
|
462
480
|
readOnly?: boolean;
|
|
463
481
|
}
|
|
464
|
-
interface NodeControlsPanelProps extends
|
|
482
|
+
interface NodeControlsPanelProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
465
483
|
/** Control configuration for the selected node */
|
|
466
484
|
config: NodeControlConfig | null;
|
|
467
485
|
/** Callback to close the panel */
|
|
@@ -480,7 +498,7 @@ interface NodeControlsPanelProps extends react__default.HTMLAttributes<HTMLDivEl
|
|
|
480
498
|
* - Clear visual feedback
|
|
481
499
|
* - Bottom or side slide-in animation
|
|
482
500
|
*/
|
|
483
|
-
declare const NodeControlsPanel:
|
|
501
|
+
declare const NodeControlsPanel: React__default.FC<NodeControlsPanelProps>;
|
|
484
502
|
|
|
485
503
|
/**
|
|
486
504
|
* A custom action button rendered in the device control panel (e.g. Tare, Zero).
|
|
@@ -587,8 +605,12 @@ interface ControlState {
|
|
|
587
605
|
isRunning?: boolean;
|
|
588
606
|
/** Is device in alarm state? */
|
|
589
607
|
hasAlarm?: boolean;
|
|
590
|
-
/**
|
|
591
|
-
|
|
608
|
+
/**
|
|
609
|
+
* Current status. `unknown` marks an untrusted read (OPC UA StatusCode
|
|
610
|
+
* severity Bad). This library never infers `unknown`; it only displays a
|
|
611
|
+
* value the backend has already published as `unknown`.
|
|
612
|
+
*/
|
|
613
|
+
status?: 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping' | 'unknown';
|
|
592
614
|
/** Status message */
|
|
593
615
|
statusMessage?: string;
|
|
594
616
|
/** Last command timestamp */
|
|
@@ -676,6 +698,7 @@ interface DeviceControlBinding {
|
|
|
676
698
|
off?: string;
|
|
677
699
|
starting?: string;
|
|
678
700
|
stopping?: string;
|
|
701
|
+
unknown?: string;
|
|
679
702
|
};
|
|
680
703
|
};
|
|
681
704
|
}
|
|
@@ -795,9 +818,9 @@ interface DeviceControlPanelProps {
|
|
|
795
818
|
* its live values move, so the memo bails only on genuinely idle ticks - the
|
|
796
819
|
* win is proportional to how often values are flat at display precision.
|
|
797
820
|
*/
|
|
798
|
-
declare function DeviceControlPanelImpl({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, showBuiltInToast, embedded, }: DeviceControlPanelProps):
|
|
821
|
+
declare function DeviceControlPanelImpl({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, showBuiltInToast, embedded, }: DeviceControlPanelProps): React__default.JSX.Element | null;
|
|
799
822
|
/** Memo boundary - see DeviceControlPanelImpl doc comment (kiosk heap-leak fix). */
|
|
800
|
-
declare const DeviceControlPanel:
|
|
823
|
+
declare const DeviceControlPanel: React__default.MemoExoticComponent<typeof DeviceControlPanelImpl>;
|
|
801
824
|
|
|
802
825
|
interface NumpadDialogProps {
|
|
803
826
|
/** Whether the dialog is open */
|
|
@@ -846,7 +869,7 @@ interface NumpadDialogProps {
|
|
|
846
869
|
* out-of-range values are rejected (never silently clamped). The field pre-fills
|
|
847
870
|
* with the current value so an operator never blind-zeroes a live setpoint.
|
|
848
871
|
*/
|
|
849
|
-
declare const NumpadDialog:
|
|
872
|
+
declare const NumpadDialog: React__default.FC<NumpadDialogProps>;
|
|
850
873
|
|
|
851
874
|
type DisplayMode = 'standard' | 'dashboard';
|
|
852
875
|
interface FullscreenContainerProps {
|
|
@@ -857,9 +880,9 @@ type OverlayTheme = 'tank' | 'pressure' | 'vessel' | 'flow';
|
|
|
857
880
|
interface SVGLockedOverlayProps {
|
|
858
881
|
svgX: number;
|
|
859
882
|
svgY: number;
|
|
860
|
-
children:
|
|
883
|
+
children: React__default.ReactNode;
|
|
861
884
|
theme?: OverlayTheme;
|
|
862
|
-
style?:
|
|
885
|
+
style?: React__default.CSSProperties;
|
|
863
886
|
className?: string;
|
|
864
887
|
onClick?: () => void;
|
|
865
888
|
containerSelector?: string;
|
|
@@ -931,7 +954,7 @@ interface EquipmentIndicatorProps {
|
|
|
931
954
|
color: string;
|
|
932
955
|
label: string;
|
|
933
956
|
size?: number;
|
|
934
|
-
style?:
|
|
957
|
+
style?: React__default.CSSProperties;
|
|
935
958
|
className?: string;
|
|
936
959
|
/**
|
|
937
960
|
* True when this equipment's state is a maintenance force, not a measured
|
|
@@ -943,14 +966,14 @@ interface EquipmentIndicatorProps {
|
|
|
943
966
|
interface FullscreenWorkspaceTab {
|
|
944
967
|
label: string;
|
|
945
968
|
value: string;
|
|
946
|
-
content:
|
|
947
|
-
}
|
|
948
|
-
interface FullscreenWorkspaceProps extends
|
|
949
|
-
svgContent:
|
|
950
|
-
overlays?:
|
|
951
|
-
leftPanel?:
|
|
952
|
-
rightPanel?:
|
|
953
|
-
footer?:
|
|
969
|
+
content: React__default.ReactNode;
|
|
970
|
+
}
|
|
971
|
+
interface FullscreenWorkspaceProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
972
|
+
svgContent: React__default.ReactNode;
|
|
973
|
+
overlays?: React__default.ReactNode;
|
|
974
|
+
leftPanel?: React__default.ReactNode;
|
|
975
|
+
rightPanel?: React__default.ReactNode;
|
|
976
|
+
footer?: React__default.ReactNode;
|
|
954
977
|
tabs?: FullscreenWorkspaceTab[];
|
|
955
978
|
activeTab?: string;
|
|
956
979
|
onTabChange?: (value: string) => void;
|
|
@@ -971,60 +994,60 @@ interface FullscreenWorkspaceProps extends react__default.HTMLAttributes<HTMLDiv
|
|
|
971
994
|
zoomDisabled?: boolean;
|
|
972
995
|
}
|
|
973
996
|
|
|
974
|
-
declare const FullscreenContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
997
|
+
declare const FullscreenContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
975
998
|
theme?: _emotion_react.Theme;
|
|
976
999
|
} & FullscreenContainerProps, {}, {}>;
|
|
977
|
-
declare const LeftPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1000
|
+
declare const LeftPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
978
1001
|
theme?: _emotion_react.Theme;
|
|
979
1002
|
} & {
|
|
980
1003
|
collapsed: boolean;
|
|
981
1004
|
}, {}, {}>;
|
|
982
|
-
declare const RightPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1005
|
+
declare const RightPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
983
1006
|
theme?: _emotion_react.Theme;
|
|
984
1007
|
} & {
|
|
985
1008
|
collapsed: boolean;
|
|
986
1009
|
}, {}, {}>;
|
|
987
|
-
declare const SVGArea: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1010
|
+
declare const SVGArea: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
988
1011
|
theme?: _emotion_react.Theme;
|
|
989
1012
|
}, {}, {}>;
|
|
990
|
-
declare const LeftToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
1013
|
+
declare const LeftToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "className" | "disabled" | "style" | "tabIndex" | "color" | "size" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator"> & {
|
|
991
1014
|
theme?: _emotion_react.Theme;
|
|
992
1015
|
} & {
|
|
993
1016
|
collapsed: boolean;
|
|
994
1017
|
}, {}, {}>;
|
|
995
|
-
declare const RightToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
1018
|
+
declare const RightToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "className" | "disabled" | "style" | "tabIndex" | "color" | "size" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator"> & {
|
|
996
1019
|
theme?: _emotion_react.Theme;
|
|
997
1020
|
} & {
|
|
998
1021
|
collapsed: boolean;
|
|
999
1022
|
}, {}, {}>;
|
|
1000
|
-
declare const DisplayModeToggle: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
1023
|
+
declare const DisplayModeToggle: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "className" | "disabled" | "style" | "tabIndex" | "color" | "size" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator"> & {
|
|
1001
1024
|
theme?: _emotion_react.Theme;
|
|
1002
1025
|
} & {
|
|
1003
1026
|
mode: DisplayMode;
|
|
1004
1027
|
}, {}, {}>;
|
|
1005
|
-
declare const ZoomControls: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1028
|
+
declare const ZoomControls: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
1006
1029
|
theme?: _emotion_react.Theme;
|
|
1007
1030
|
}, {}, {}>;
|
|
1008
|
-
declare const ZoomButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
1031
|
+
declare const ZoomButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "className" | "disabled" | "style" | "tabIndex" | "color" | "size" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator"> & {
|
|
1009
1032
|
theme?: _emotion_react.Theme;
|
|
1010
1033
|
}, {}, {}>;
|
|
1011
|
-
declare const FooterPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1034
|
+
declare const FooterPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
1012
1035
|
theme?: _emotion_react.Theme;
|
|
1013
1036
|
}, {}, {}>;
|
|
1014
|
-
declare const PanelTabs: _emotion_styled.StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
1037
|
+
declare const PanelTabs: _emotion_styled.StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "variant" | "children" | "className" | "value" | "style" | "aria-label" | "aria-labelledby" | "onChange" | "orientation" | "sx" | "classes" | "action" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar" | "slots" | "slotProps"> & {
|
|
1015
1038
|
theme?: _emotion_react.Theme;
|
|
1016
1039
|
}, {}, {}>;
|
|
1017
|
-
declare const PanelContent: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1040
|
+
declare const PanelContent: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
1018
1041
|
theme?: _emotion_react.Theme;
|
|
1019
1042
|
}, {}, {}>;
|
|
1020
1043
|
declare const FixedSVGContainer: _emotion_styled.StyledComponent<{
|
|
1021
1044
|
theme?: _emotion_react.Theme;
|
|
1022
1045
|
as?: React.ElementType;
|
|
1023
|
-
},
|
|
1046
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1024
1047
|
declare const ScrollableSVGWrapper: _emotion_styled.StyledComponent<{
|
|
1025
1048
|
theme?: _emotion_react.Theme;
|
|
1026
1049
|
as?: React.ElementType;
|
|
1027
|
-
},
|
|
1050
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1028
1051
|
|
|
1029
1052
|
declare const baseOverlayStyles: {
|
|
1030
1053
|
readonly tank: {
|
|
@@ -1077,8 +1100,8 @@ declare const baseOverlayStyles: {
|
|
|
1077
1100
|
};
|
|
1078
1101
|
};
|
|
1079
1102
|
declare const overlayStyles: Record<OverlayTheme, typeof baseOverlayStyles[OverlayTheme]>;
|
|
1080
|
-
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) =>
|
|
1081
|
-
declare const DashboardCard: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
1103
|
+
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) => React$1.JSX.Element;
|
|
1104
|
+
declare const DashboardCard: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
1082
1105
|
theme?: _emotion_react.Theme;
|
|
1083
1106
|
} & {
|
|
1084
1107
|
svgX: number;
|
|
@@ -1090,23 +1113,23 @@ declare const CardHeader: _emotion_styled.StyledComponent<{
|
|
|
1090
1113
|
as?: React.ElementType;
|
|
1091
1114
|
} & {
|
|
1092
1115
|
color?: string;
|
|
1093
|
-
},
|
|
1116
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1094
1117
|
declare const CardValue: _emotion_styled.StyledComponent<{
|
|
1095
1118
|
theme?: _emotion_react.Theme;
|
|
1096
1119
|
as?: React.ElementType;
|
|
1097
|
-
},
|
|
1120
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1098
1121
|
declare const CardUnit: _emotion_styled.StyledComponent<{
|
|
1099
1122
|
theme?: _emotion_react.Theme;
|
|
1100
1123
|
as?: React.ElementType;
|
|
1101
|
-
},
|
|
1124
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1102
1125
|
|
|
1103
|
-
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, forced, }: TrendLineProps) =>
|
|
1104
|
-
declare const CircularGauge: ({ value, max, unit, label, size, color, forced, realValue, }: CircularGaugeProps) =>
|
|
1105
|
-
declare const Sparkline: ({ data, width, height, color, forced }: SparklineProps) =>
|
|
1106
|
-
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, forced, }: EquipmentIndicatorWithSparklineProps) =>
|
|
1107
|
-
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, forced, }: EquipmentIndicatorProps) =>
|
|
1126
|
+
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, forced, }: TrendLineProps) => React$1.JSX.Element;
|
|
1127
|
+
declare const CircularGauge: ({ value, max, unit, label, size, color, forced, realValue, }: CircularGaugeProps) => React$1.JSX.Element;
|
|
1128
|
+
declare const Sparkline: ({ data, width, height, color, forced }: SparklineProps) => React$1.JSX.Element | null;
|
|
1129
|
+
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, forced, }: EquipmentIndicatorWithSparklineProps) => React$1.JSX.Element;
|
|
1130
|
+
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, forced, }: EquipmentIndicatorProps) => React$1.JSX.Element;
|
|
1108
1131
|
|
|
1109
|
-
declare function FullscreenWorkspace({ svgContent, overlays, leftPanel, rightPanel, footer, tabs, activeTab, onTabChange, defaultLeftCollapsed, defaultRightCollapsed, leftCollapsed: leftCollapsedProp, rightCollapsed: rightCollapsedProp, onLeftCollapseChange, onRightCollapseChange, displayMode, defaultDisplayMode, onDisplayModeChange, showDisplayModeToggle, showZoomControls, onZoomIn, onZoomOut, onResetZoom, zoomDisabled, className, ...rest }: FullscreenWorkspaceProps):
|
|
1132
|
+
declare function FullscreenWorkspace({ svgContent, overlays, leftPanel, rightPanel, footer, tabs, activeTab, onTabChange, defaultLeftCollapsed, defaultRightCollapsed, leftCollapsed: leftCollapsedProp, rightCollapsed: rightCollapsedProp, onLeftCollapseChange, onRightCollapseChange, displayMode, defaultDisplayMode, onDisplayModeChange, showDisplayModeToggle, showZoomControls, onZoomIn, onZoomOut, onResetZoom, zoomDisabled, className, ...rest }: FullscreenWorkspaceProps): React__default.ReactElement;
|
|
1110
1133
|
|
|
1111
1134
|
type Theme = 'modern' | 'hmi';
|
|
1112
1135
|
interface ThemeContextType {
|
|
@@ -1116,17 +1139,17 @@ interface ThemeContextType {
|
|
|
1116
1139
|
}
|
|
1117
1140
|
declare const useTheme: () => ThemeContextType;
|
|
1118
1141
|
interface ThemeProviderProps {
|
|
1119
|
-
children:
|
|
1142
|
+
children: React__default.ReactNode;
|
|
1120
1143
|
}
|
|
1121
|
-
declare const ThemeProvider:
|
|
1144
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1122
1145
|
|
|
1123
|
-
interface ThemeToggleProps extends
|
|
1146
|
+
interface ThemeToggleProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1124
1147
|
/** Size of the toggle */
|
|
1125
1148
|
size?: 'small' | 'medium' | 'large';
|
|
1126
1149
|
/** Position of the toggle */
|
|
1127
1150
|
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inline';
|
|
1128
1151
|
}
|
|
1129
|
-
declare const ThemeToggle:
|
|
1152
|
+
declare const ThemeToggle: React__default.FC<ThemeToggleProps>;
|
|
1130
1153
|
|
|
1131
1154
|
/**
|
|
1132
1155
|
* ISA-101 High Performance HMI — Unified Status Color System
|
|
@@ -1135,8 +1158,15 @@ declare const ThemeToggle: react__default.FC<ThemeToggleProps>;
|
|
|
1135
1158
|
* Used by NodeRenderer (SVG fill/stroke), DeviceControlPanel (status indicator),
|
|
1136
1159
|
* and DataOverlay (telemetry badge).
|
|
1137
1160
|
*/
|
|
1138
|
-
/**
|
|
1139
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* Canonical device status vocabulary.
|
|
1163
|
+
*
|
|
1164
|
+
* `unknown` marks a value the backend does not trust. OPC UA publishes this
|
|
1165
|
+
* condition as StatusCode severity Bad. The library never derives `unknown`
|
|
1166
|
+
* from a number or a threshold. The library only displays an `unknown` value
|
|
1167
|
+
* that the backend has already published.
|
|
1168
|
+
*/
|
|
1169
|
+
type DeviceStatus = 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping' | 'unknown';
|
|
1140
1170
|
/** Color entry covering both SVG node and overlay/panel needs */
|
|
1141
1171
|
interface StatusColorEntry {
|
|
1142
1172
|
/** Fill color for SVG node symbols */
|
|
@@ -1152,6 +1182,43 @@ interface StatusColorEntry {
|
|
|
1152
1182
|
}
|
|
1153
1183
|
/** Partial map for consumer overrides — only specify statuses you want to change */
|
|
1154
1184
|
type StatusColorMap = Partial<Record<DeviceStatus, Partial<StatusColorEntry>>>;
|
|
1185
|
+
/**
|
|
1186
|
+
* The ISA unknown token, shared with the consuming application.
|
|
1187
|
+
*
|
|
1188
|
+
* The same token already marks an untrusted value on the consumer's Sidebar
|
|
1189
|
+
* and Interlocks screens. The library reuses it so one meaning has one
|
|
1190
|
+
* appearance across both products. See views-library issue #27.
|
|
1191
|
+
*
|
|
1192
|
+
* The library uses this one token for both unknown triggers: a node with
|
|
1193
|
+
* `status: 'unknown'` (an untrusted device) and a node with
|
|
1194
|
+
* `positionUnknown: true` (a disclaimed position). Both mean that the system
|
|
1195
|
+
* cannot confirm the state, so both get the same appearance.
|
|
1196
|
+
*
|
|
1197
|
+
* The hatch carries the meaning, not the fill. The flat `bg` sits a CIEDE2000
|
|
1198
|
+
* delta-E of 0.45 from the `off` fill after greyscale conversion, so the fill
|
|
1199
|
+
* alone cannot separate an untrusted device from a confirmed-off one. Any
|
|
1200
|
+
* surface that uses this token must also carry the hatch or a glyph.
|
|
1201
|
+
*
|
|
1202
|
+
* The hue is deliberate. Periwinkle at hue 240 sits between override violet
|
|
1203
|
+
* and interaction blue, so an operator cannot confuse the three.
|
|
1204
|
+
*/
|
|
1205
|
+
declare const ISA_UNKNOWN: {
|
|
1206
|
+
readonly fg: "#4f4f8a";
|
|
1207
|
+
readonly bg: "#ebebf5";
|
|
1208
|
+
readonly border: "#8f8fc2";
|
|
1209
|
+
};
|
|
1210
|
+
/**
|
|
1211
|
+
* The dark-theme counterpart of `ISA_UNKNOWN`.
|
|
1212
|
+
*
|
|
1213
|
+
* `DEFAULT_STATUS_COLORS` carries the light values. Wiring a theme switch is
|
|
1214
|
+
* not part of this change; the constant exists so a consumer and a later
|
|
1215
|
+
* change can use the agreed values rather than inventing new ones.
|
|
1216
|
+
*/
|
|
1217
|
+
declare const ISA_UNKNOWN_DARK: {
|
|
1218
|
+
readonly fg: "#b9bbdb";
|
|
1219
|
+
readonly bg: "#23263a";
|
|
1220
|
+
readonly border: "#6f74a3";
|
|
1221
|
+
};
|
|
1155
1222
|
/**
|
|
1156
1223
|
* ISA-101 defaults.
|
|
1157
1224
|
*
|
|
@@ -1162,6 +1229,20 @@ type StatusColorMap = Partial<Record<DeviceStatus, Partial<StatusColorEntry>>>;
|
|
|
1162
1229
|
* - off: light grey (matches canvas default #edeeef)
|
|
1163
1230
|
* - starting: light green (transitional)
|
|
1164
1231
|
* - stopping: amber (transitional)
|
|
1232
|
+
* - unknown: periwinkle (untrusted read; OPC UA severity Bad). Derived
|
|
1233
|
+
* from ISA_UNKNOWN above, the shared token.
|
|
1234
|
+
*
|
|
1235
|
+
* The unknown entry deliberately does NOT rely on its fill. The flat fill
|
|
1236
|
+
* sits a CIEDE2000 delta-E of 0.45 from the off fill after greyscale
|
|
1237
|
+
* conversion, so the two are indistinguishable without colour.
|
|
1238
|
+
*
|
|
1239
|
+
* Every unknown surface therefore carries a second channel that does not
|
|
1240
|
+
* depend on colour. Fixed-layout surfaces add a glyph. The P&ID symbol adds
|
|
1241
|
+
* a hatch. A surface that shows this fill alone reproduces the defect the
|
|
1242
|
+
* unknown status exists to close.
|
|
1243
|
+
*
|
|
1244
|
+
* This palette is not fully greyscale-separable: normal and alarm sit 1.6
|
|
1245
|
+
* apart. That is why unknown never relies on colour anywhere.
|
|
1165
1246
|
*/
|
|
1166
1247
|
declare const DEFAULT_STATUS_COLORS: Record<DeviceStatus, StatusColorEntry>;
|
|
1167
1248
|
/**
|
|
@@ -1176,17 +1257,15 @@ declare const DEFAULT_STATUS_COLORS: Record<DeviceStatus, StatusColorEntry>;
|
|
|
1176
1257
|
*/
|
|
1177
1258
|
declare const FORCED_MARK_COLOR: StatusColorEntry;
|
|
1178
1259
|
/**
|
|
1179
|
-
*
|
|
1180
|
-
* DEFAULT_STATUS_COLORS, for the same reason as FORCED_MARK_COLOR: a device
|
|
1181
|
-
* whose position the control system has disclaimed is not a health status,
|
|
1182
|
-
* and must not compete with warning/alarm/fault. Values match the consuming
|
|
1183
|
-
* HMI ISA token module (light theme).
|
|
1260
|
+
* Normalize a status string to its canonical `DeviceStatus` key.
|
|
1184
1261
|
*
|
|
1185
|
-
*
|
|
1262
|
+
* The function lowercases the value and follows `STATUS_ALIASES`. Every
|
|
1263
|
+
* caller that must decide "is this status X?" uses this function. A caller
|
|
1264
|
+
* that compares a raw string instead can disagree with `resolveStatusColor`
|
|
1265
|
+
* once an alias changes, which would let one surface paint a status the
|
|
1266
|
+
* other surface does not recognise.
|
|
1186
1267
|
*/
|
|
1187
|
-
declare
|
|
1188
|
-
/** Dark-theme values for UNKNOWN_MARK_COLOR. */
|
|
1189
|
-
declare const UNKNOWN_MARK_COLOR_DARK: StatusColorEntry;
|
|
1268
|
+
declare function normalizeDeviceStatus(status: string | undefined): DeviceStatus;
|
|
1190
1269
|
/**
|
|
1191
1270
|
* Resolve a status string to a full color entry.
|
|
1192
1271
|
*
|
|
@@ -1195,6 +1274,117 @@ declare const UNKNOWN_MARK_COLOR_DARK: StatusColorEntry;
|
|
|
1195
1274
|
*/
|
|
1196
1275
|
declare function resolveStatusColor(status: string | undefined, customMap?: StatusColorMap): StatusColorEntry;
|
|
1197
1276
|
|
|
1277
|
+
/**
|
|
1278
|
+
* Shared glyph for the `unknown` device status (KTD10).
|
|
1279
|
+
*
|
|
1280
|
+
* `StatusIndicator`, `DataOverlay`, and `DeviceControlPanel` import this one
|
|
1281
|
+
* module. One drawing keeps the marker consistent. An operator learns the
|
|
1282
|
+
* marker once and recognises it on every surface.
|
|
1283
|
+
*
|
|
1284
|
+
* The glyph is a question mark inside a dashed ring. The dashed ring is a
|
|
1285
|
+
* second channel that does not depend on colour. A broken outline reads as
|
|
1286
|
+
* an incomplete circuit.
|
|
1287
|
+
*/
|
|
1288
|
+
/** Size keys the glyph accepts. These match `StatusIndicator`'s `size` prop. */
|
|
1289
|
+
type UnknownGlyphSize = 'small' | 'medium' | 'large';
|
|
1290
|
+
/**
|
|
1291
|
+
* CSS custom property that colours the glyph.
|
|
1292
|
+
*
|
|
1293
|
+
* A consumer sets this property on any ancestor to retheme the glyph.
|
|
1294
|
+
* `StatusIndicator` scopes it under the `ui-status-indicator--unknown` class.
|
|
1295
|
+
* The overlay and the control panel carry no such class, so a consumer sets
|
|
1296
|
+
* the property directly on those hosts. The glyph falls back to
|
|
1297
|
+
* `currentColor` when the consumer sets nothing, so the package never has to
|
|
1298
|
+
* ship CSS for it.
|
|
1299
|
+
*/
|
|
1300
|
+
declare const UNKNOWN_STATUS_GLYPH_COLOR_VAR = "--ui-status-indicator-unknown-glyph-color";
|
|
1301
|
+
/**
|
|
1302
|
+
* Dash rhythm of the glyph's ring.
|
|
1303
|
+
*
|
|
1304
|
+
* The P&ID node symbol reuses this value for its own dashed outline. The
|
|
1305
|
+
* canvas cannot host a centred glyph, so it carries the same rhythm on the
|
|
1306
|
+
* symbol outline instead. Sharing the value keeps the two treatments in step.
|
|
1307
|
+
*/
|
|
1308
|
+
declare const UNKNOWN_GLYPH_RING_DASH: string;
|
|
1309
|
+
interface UnknownStatusGlyphProps extends Omit<React__default.SVGProps<SVGSVGElement>, 'children' | 'viewBox'> {
|
|
1310
|
+
/** Size of the glyph. Sets the stroke weight (see `UNKNOWN_GLYPH_STROKE_WEIGHTS`). */
|
|
1311
|
+
size?: UnknownGlyphSize;
|
|
1312
|
+
/**
|
|
1313
|
+
* Counter-rotate the glyph.
|
|
1314
|
+
*
|
|
1315
|
+
* Set this to `true` when the host element applies `transform: rotate(45deg)`,
|
|
1316
|
+
* such as the `diamond` shape in `StatusIndicator`. The glyph then reads
|
|
1317
|
+
* upright instead of inheriting the host rotation.
|
|
1318
|
+
*
|
|
1319
|
+
* The counter-rotation is a fixed -45 degrees. It assumes the 45-degree
|
|
1320
|
+
* rotation that the documented `ui-status-indicator--diamond` rule applies.
|
|
1321
|
+
* A consumer that rotates the host by another angle must not set this flag.
|
|
1322
|
+
*/
|
|
1323
|
+
counterRotate?: boolean;
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Renders the `unknown` status glyph as an inline `svg`.
|
|
1327
|
+
*
|
|
1328
|
+
* The glyph carries no CSS class dependency. It needs no stylesheet, so it
|
|
1329
|
+
* survives server-side rendering and needs no CSP nonce (KTD1).
|
|
1330
|
+
*
|
|
1331
|
+
* The `svg` is `aria-hidden` and `focusable="false"`. A separate unit adds
|
|
1332
|
+
* the accessible description.
|
|
1333
|
+
*
|
|
1334
|
+
* Remaining `svg` props pass straight through. An HTML host sizes the glyph
|
|
1335
|
+
* with `style`; an SVG host places it with `x`, `y`, `width`, and `height`,
|
|
1336
|
+
* because a nested `svg` accepts those as user-unit attributes.
|
|
1337
|
+
*/
|
|
1338
|
+
declare function UnknownStatusGlyph({ size, counterRotate, style, ...rest }: UnknownStatusGlyphProps): React__default.ReactElement;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* A corner badge slot on a node (#33).
|
|
1342
|
+
*
|
|
1343
|
+
* A badge marks a condition that is NOT a health severity (`NodeInstance.status`)
|
|
1344
|
+
* and must never replace the node's body color. A device can be tripped AND
|
|
1345
|
+
* blocked at the same time; `status` shows the trip, the badge shows the
|
|
1346
|
+
* block, and both render at once. This is a general slot, not a fixed
|
|
1347
|
+
* prohibition badge: the consumer names the glyph, the colors, the corner,
|
|
1348
|
+
* the size, and the motion. Register additional glyphs with
|
|
1349
|
+
* `registerBadgeGlyph` (`src/diagram/badges`) rather than hardcoding a new
|
|
1350
|
+
* one here.
|
|
1351
|
+
*/
|
|
1352
|
+
interface NodeBadgeAppearance {
|
|
1353
|
+
/**
|
|
1354
|
+
* Which glyph to draw. `'prohibit'` (a circle with a slash) ships with the
|
|
1355
|
+
* library. The set is extensible: register more with `registerBadgeGlyph`
|
|
1356
|
+
* / `registerBadgeGlyphs` and reference them by id here, the same way
|
|
1357
|
+
* `symbolId` references a registered symbol.
|
|
1358
|
+
*/
|
|
1359
|
+
glyph: 'prohibit' | string;
|
|
1360
|
+
/** Glyph color (stroke/fill). Consumer picks; no status-driven default. */
|
|
1361
|
+
color?: string;
|
|
1362
|
+
/** Disc background color behind the glyph. Consumer picks. */
|
|
1363
|
+
backgroundColor?: string;
|
|
1364
|
+
/** Which corner of the node's bounding box the badge anchors to. Defaults to 'top-right'. */
|
|
1365
|
+
corner?: NodeBadgeCorner;
|
|
1366
|
+
/** Badge disc diameter, in the symbol's local SVG units. Defaults to 14. */
|
|
1367
|
+
size?: number;
|
|
1368
|
+
/** Accessible label read by assistive tech (e.g. "Start blocked"). */
|
|
1369
|
+
label?: string;
|
|
1370
|
+
}
|
|
1371
|
+
type NodeBadgeCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
1372
|
+
/**
|
|
1373
|
+
* Motion for a `NodeBadge`. Steady by default. A consumer that turns on
|
|
1374
|
+
* `blink` MUST supply `blinkPeriodMs` - the library has no default period.
|
|
1375
|
+
* TFFi drives its status tower, its batch bar, and this badge off one shared
|
|
1376
|
+
* constant so all three beat together; a period fixed in the library would
|
|
1377
|
+
* break that agreement, so there is deliberately no fallback value here.
|
|
1378
|
+
*/
|
|
1379
|
+
type NodeBadgeMotion = {
|
|
1380
|
+
blink?: false;
|
|
1381
|
+
} | {
|
|
1382
|
+
blink: true;
|
|
1383
|
+
blinkPeriodMs: number;
|
|
1384
|
+
};
|
|
1385
|
+
/** The full badge: appearance plus motion. This is the type `NodeInstance.badge` carries. */
|
|
1386
|
+
type NodeBadge = NodeBadgeAppearance & NodeBadgeMotion;
|
|
1387
|
+
|
|
1198
1388
|
interface NodeInstance {
|
|
1199
1389
|
id: string;
|
|
1200
1390
|
symbolId: string;
|
|
@@ -1207,7 +1397,7 @@ interface NodeInstance {
|
|
|
1207
1397
|
y: number;
|
|
1208
1398
|
};
|
|
1209
1399
|
labelFontSize?: number;
|
|
1210
|
-
status?: 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping' | string;
|
|
1400
|
+
status?: 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping' | 'unknown' | string;
|
|
1211
1401
|
customColors?: {
|
|
1212
1402
|
fill?: string;
|
|
1213
1403
|
stroke?: string;
|
|
@@ -1219,6 +1409,13 @@ interface NodeInstance {
|
|
|
1219
1409
|
* symbol. Default off. Wins over status and customColors.
|
|
1220
1410
|
*/
|
|
1221
1411
|
positionUnknown?: boolean;
|
|
1412
|
+
/**
|
|
1413
|
+
* A corner badge for a condition that is NOT a health severity (#33),
|
|
1414
|
+
* e.g. a device blocked from starting. Stacks on top of `status` /
|
|
1415
|
+
* `customColors` / `positionUnknown` - it never replaces the node's body
|
|
1416
|
+
* color, so a node can show `status: 'fault'` and a badge at once.
|
|
1417
|
+
*/
|
|
1418
|
+
badge?: NodeBadge;
|
|
1222
1419
|
metadata?: Record<string, unknown>;
|
|
1223
1420
|
}
|
|
1224
1421
|
interface Transform {
|
|
@@ -1487,8 +1684,15 @@ declare function useTelemetry(options?: UseTelemetryOptions): UseTelemetryResult
|
|
|
1487
1684
|
interface UseTelemetryStatusOptions {
|
|
1488
1685
|
/** Whether status sync is enabled (default: true) */
|
|
1489
1686
|
enabled?: boolean;
|
|
1490
|
-
/**
|
|
1491
|
-
|
|
1687
|
+
/**
|
|
1688
|
+
* Custom status mapping function.
|
|
1689
|
+
*
|
|
1690
|
+
* A custom mapper replaces the default entirely. It must handle every
|
|
1691
|
+
* member of `TelemetryStatus`, including `unknown`. A mapper that returns
|
|
1692
|
+
* a healthy-looking status for `unknown` reintroduces the defect the
|
|
1693
|
+
* default mapping closes.
|
|
1694
|
+
*/
|
|
1695
|
+
mapStatus?: (telemetryStatus: TelemetryStatus$1) => string;
|
|
1492
1696
|
}
|
|
1493
1697
|
/**
|
|
1494
1698
|
* Hook to sync telemetry status to node instance status for dynamic coloring
|
|
@@ -1498,6 +1702,7 @@ interface UseTelemetryStatusOptions {
|
|
|
1498
1702
|
* - 'warning' → 'warning'
|
|
1499
1703
|
* - 'alarm' / 'fault' → 'alarm'
|
|
1500
1704
|
* - 'off' → 'stopped'
|
|
1705
|
+
* - 'unknown' → 'unknown' (untrusted read; must not read as stopped)
|
|
1501
1706
|
*
|
|
1502
1707
|
* @param telemetry - Telemetry map from useTelemetry
|
|
1503
1708
|
* @param diagram - Current diagram state
|
|
@@ -1653,13 +1858,13 @@ interface PIDCanvasFeatures {
|
|
|
1653
1858
|
/** Background color for canvas (default: '#ffffff') */
|
|
1654
1859
|
backgroundColor?: string;
|
|
1655
1860
|
}
|
|
1656
|
-
interface PIDCanvasProps extends
|
|
1861
|
+
interface PIDCanvasProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1657
1862
|
/** The diagram to render */
|
|
1658
1863
|
diagram: Diagram;
|
|
1659
1864
|
/** Optional className for the container */
|
|
1660
1865
|
className?: string;
|
|
1661
1866
|
/** Optional inline styles for the container */
|
|
1662
|
-
style?:
|
|
1867
|
+
style?: React__default.CSSProperties;
|
|
1663
1868
|
/** Enable interactive features (pan, zoom, selection, telemetry, dragNodes) */
|
|
1664
1869
|
features?: PIDCanvasFeatures;
|
|
1665
1870
|
/** Callback when selection changes */
|
|
@@ -1715,20 +1920,20 @@ interface PIDCanvasControls {
|
|
|
1715
1920
|
*
|
|
1716
1921
|
* Future: Editing tools, symbol library UI
|
|
1717
1922
|
*/
|
|
1718
|
-
declare function PIDCanvasImpl({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, statusColorMap, ...props }: PIDCanvasProps):
|
|
1923
|
+
declare function PIDCanvasImpl({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, statusColorMap, ...props }: PIDCanvasProps): React__default.ReactElement;
|
|
1719
1924
|
/**
|
|
1720
1925
|
* Memo boundary - see PIDCanvasImpl doc comment (renderer-OOM fix). Shallow
|
|
1721
1926
|
* compare: `diagram`, `telemetry`, `features`, `style`, `statusColorMap`, and
|
|
1722
1927
|
* every callback are compared by identity; hosts that keep them stable skip
|
|
1723
1928
|
* the full-canvas re-render entirely when unrelated screen state changes.
|
|
1724
1929
|
*/
|
|
1725
|
-
declare const PIDCanvas:
|
|
1930
|
+
declare const PIDCanvas: React__default.MemoExoticComponent<typeof PIDCanvasImpl>;
|
|
1726
1931
|
|
|
1727
1932
|
interface SymbolLibraryProps {
|
|
1728
1933
|
/** Optional className for styling */
|
|
1729
1934
|
className?: string;
|
|
1730
1935
|
/** Callback when a symbol drag starts */
|
|
1731
|
-
onSymbolDragStart?: (symbolId: string, event:
|
|
1936
|
+
onSymbolDragStart?: (symbolId: string, event: React__default.DragEvent) => void;
|
|
1732
1937
|
/** Show category filter */
|
|
1733
1938
|
showCategories?: boolean;
|
|
1734
1939
|
/** Custom symbol categories */
|
|
@@ -1740,7 +1945,7 @@ interface SymbolLibraryProps {
|
|
|
1740
1945
|
* Displays available symbols organized by category
|
|
1741
1946
|
* Supports drag-and-drop to add new nodes to diagrams
|
|
1742
1947
|
*/
|
|
1743
|
-
declare function SymbolLibrary({ className, onSymbolDragStart, showCategories, categories, }: SymbolLibraryProps):
|
|
1948
|
+
declare function SymbolLibrary({ className, onSymbolDragStart, showCategories, categories, }: SymbolLibraryProps): React__default.ReactElement;
|
|
1744
1949
|
|
|
1745
1950
|
interface NodeConfigPanelProps {
|
|
1746
1951
|
/** Selected node to configure */
|
|
@@ -1762,7 +1967,7 @@ interface NodeConfigPanelProps {
|
|
|
1762
1967
|
/** Additional CSS class name */
|
|
1763
1968
|
className?: string;
|
|
1764
1969
|
/** Custom styles */
|
|
1765
|
-
style?:
|
|
1970
|
+
style?: React__default.CSSProperties;
|
|
1766
1971
|
}
|
|
1767
1972
|
/**
|
|
1768
1973
|
* NodeConfigPanel - Reusable configuration panel for editing node properties and telemetry
|
|
@@ -1778,7 +1983,7 @@ interface NodeConfigPanelProps {
|
|
|
1778
1983
|
* />
|
|
1779
1984
|
* ```
|
|
1780
1985
|
*/
|
|
1781
|
-
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemoveTelemetry, availableTags, onRemove, className, style, }: NodeConfigPanelProps):
|
|
1986
|
+
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemoveTelemetry, availableTags, onRemove, className, style, }: NodeConfigPanelProps): React__default.JSX.Element;
|
|
1782
1987
|
|
|
1783
1988
|
/**
|
|
1784
1989
|
* Validates a diagram object structure
|
|
@@ -1913,6 +2118,36 @@ declare function readAppearanceValue(node: NodeInstance, field: AppearanceField)
|
|
|
1913
2118
|
/** Produce the NodeInstance update for a new field value. */
|
|
1914
2119
|
declare function writeAppearanceValue(node: NodeInstance, field: AppearanceField, value: AppearanceValue): Partial<NodeInstance>;
|
|
1915
2120
|
|
|
2121
|
+
/**
|
|
2122
|
+
* Registry of badge glyphs for the `NodeBadge` corner slot (#33).
|
|
2123
|
+
*
|
|
2124
|
+
* Mirrors `diagram/symbols/mockSymbolLibrary`'s registration pattern: a
|
|
2125
|
+
* built-in set plus a consumer-registered set, looked up by id. A consumer
|
|
2126
|
+
* calls `registerBadgeGlyph` from its own app code to add a glyph the
|
|
2127
|
+
* library does not ship - the same escape hatch `registerSymbol` already
|
|
2128
|
+
* gives P&ID symbols. This is deliberately NOT a string resolved only
|
|
2129
|
+
* inside the library (the mistake `Overlay.content.component` made, per
|
|
2130
|
+
* #33): the consumer supplies the real markup.
|
|
2131
|
+
*/
|
|
2132
|
+
interface BadgeGlyphDefinition {
|
|
2133
|
+
/** Id a `NodeBadge.glyph` references. */
|
|
2134
|
+
id: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* Raw SVG markup, drawn centered in a 24x24 local box (0,0 to 24,24).
|
|
2137
|
+
* Use `stroke="currentColor"` / `fill="currentColor"` so the glyph picks
|
|
2138
|
+
* up `NodeBadge.color` - the glyph carries no color of its own, only shape.
|
|
2139
|
+
*/
|
|
2140
|
+
svgContent: string;
|
|
2141
|
+
}
|
|
2142
|
+
/** Register a single custom badge glyph, or replace a built-in one by reusing its id. */
|
|
2143
|
+
declare function registerBadgeGlyph(glyph: BadgeGlyphDefinition): void;
|
|
2144
|
+
/** Register multiple custom badge glyphs at once. */
|
|
2145
|
+
declare function registerBadgeGlyphs(glyphs: BadgeGlyphDefinition[] | Record<string, BadgeGlyphDefinition>): void;
|
|
2146
|
+
/** Get a badge glyph definition by id (checks custom glyphs before built-ins). */
|
|
2147
|
+
declare function getBadgeGlyph(glyphId: string): BadgeGlyphDefinition | undefined;
|
|
2148
|
+
/** List every registered badge glyph id (built-in plus custom). */
|
|
2149
|
+
declare function getAvailableBadgeGlyphs(): string[];
|
|
2150
|
+
|
|
1916
2151
|
/**
|
|
1917
2152
|
* Telemetry status type
|
|
1918
2153
|
*/
|
|
@@ -2287,9 +2522,9 @@ interface DeviceConfigPanelProps {
|
|
|
2287
2522
|
* pays off when the host passes identity-stable `binding` and handler props;
|
|
2288
2523
|
* an unstable host degrades gracefully to the old behavior.
|
|
2289
2524
|
*/
|
|
2290
|
-
declare function DeviceConfigPanelImpl({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, showBuiltInToast, embedded, }: DeviceConfigPanelProps):
|
|
2525
|
+
declare function DeviceConfigPanelImpl({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, showBuiltInToast, embedded, }: DeviceConfigPanelProps): React__default.JSX.Element | null;
|
|
2291
2526
|
/** Memo boundary - see DeviceConfigPanelImpl doc comment (kiosk heap-leak fix). */
|
|
2292
|
-
declare const DeviceConfigPanel:
|
|
2527
|
+
declare const DeviceConfigPanel: React__default.MemoExoticComponent<typeof DeviceConfigPanelImpl>;
|
|
2293
2528
|
|
|
2294
2529
|
/**
|
|
2295
2530
|
* Options for simulation behavior
|
|
@@ -2329,4 +2564,4 @@ interface SimulationOptions {
|
|
|
2329
2564
|
*/
|
|
2330
2565
|
declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
|
|
2331
2566
|
|
|
2332
|
-
export { type AnchorType, type AppearanceField, type AppearanceFieldKind, type AppearanceTarget, type AppearanceValue, Button, type ButtonProps, COLOR_PRESETS, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type CommandKind, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, type CustomAction, DEFAULT_STATUS_COLORS, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type DeviceStatus, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FORCED_MARK_COLOR, FixedSVGContainer, FooterPanel, type ForcedState, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, NumpadDialog, type NumpadDialogProps, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, STATUS_LED_APPEARANCE, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, type ScalingMetadata, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, type StatusColorEntry, type StatusColorMap, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps,
|
|
2567
|
+
export { type AnchorType, type AppearanceField, type AppearanceFieldKind, type AppearanceTarget, type AppearanceValue, type BadgeGlyphDefinition, Button, type ButtonProps, COLOR_PRESETS, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type CommandKind, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, type CustomAction, DEFAULT_STATUS_COLORS, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type DeviceStatus, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FORCED_MARK_COLOR, FixedSVGContainer, FooterPanel, type ForcedState, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, ISA_UNKNOWN, ISA_UNKNOWN_DARK, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, type NodeBadge, type NodeBadgeAppearance, type NodeBadgeCorner, type NodeBadgeMotion, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, NumpadDialog, type NumpadDialogProps, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, STATUS_LED_APPEARANCE, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, type ScalingMetadata, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, type StatusColorEntry, type StatusColorMap, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps, UNKNOWN_GLYPH_RING_DASH, UNKNOWN_STATUS_GLYPH_COLOR_VAR, type UnknownGlyphSize, UnknownStatusGlyph, type UnknownStatusGlyphProps, type UseBooleanIndicatorsOptions, type UseDeviceControlsOptions, type UseDragOptions, type UseDragResult, type UseSelectionOptions, type UseSelectionResult, type UseTelemetryOptions, type UseTelemetryResult, type UseTelemetryStatusOptions, type UseViewBoxOptions, type UseViewBoxResult, ValueEntry, type ValueEntryProps, type ViewBox, ZoomButton, ZoomControls, calculateThresholdStatus, createConfigBinding, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAppearanceDefaults, getAppearanceSchema, getAvailableBadgeGlyphs, getAvailableSymbols, getBadgeGlyph, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, normalizeDeviceStatus, overlayStyles, readAppearanceValue, registerBadgeGlyph, registerBadgeGlyphs, registerSymbol, registerSymbols, resolvePresetColor, resolveStatusColor, useBooleanIndicators, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram, writeAppearanceValue };
|