@procaaso/alphinity-ui-components 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +65 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -79
- package/dist/index.d.ts +96 -79
- package/dist/index.js +65 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
3
5
|
import * as _emotion_styled from '@emotion/styled';
|
|
4
6
|
import * as _emotion_react from '@emotion/react';
|
|
5
7
|
import * as _mui_system from '@mui/system';
|
|
6
8
|
import * as _mui_material from '@mui/material';
|
|
7
|
-
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
8
9
|
|
|
9
|
-
interface ButtonProps extends
|
|
10
|
+
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
11
|
variant?: 'primary' | 'secondary';
|
|
11
|
-
children:
|
|
12
|
+
children: React__default.ReactNode;
|
|
12
13
|
}
|
|
13
|
-
declare const Button:
|
|
14
|
+
declare const Button: React__default.FC<ButtonProps>;
|
|
14
15
|
|
|
15
16
|
interface SelectorOption {
|
|
16
17
|
/** Unique value for the option */
|
|
@@ -22,7 +23,7 @@ interface SelectorOption {
|
|
|
22
23
|
/** Optional description for tooltip or additional context */
|
|
23
24
|
description?: string;
|
|
24
25
|
}
|
|
25
|
-
interface SelectorProps extends Omit<
|
|
26
|
+
interface SelectorProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
26
27
|
/** Currently selected value */
|
|
27
28
|
value: string;
|
|
28
29
|
/** Callback when selection changes */
|
|
@@ -42,7 +43,7 @@ interface SelectorProps extends Omit<react__default.HTMLAttributes<HTMLDivElemen
|
|
|
42
43
|
/** Whether the dropdown should open upward */
|
|
43
44
|
dropdownUp?: boolean;
|
|
44
45
|
}
|
|
45
|
-
declare const Selector:
|
|
46
|
+
declare const Selector: React__default.FC<SelectorProps>;
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* Status levels for telemetry values
|
|
@@ -188,7 +189,7 @@ interface ModeConfig {
|
|
|
188
189
|
/** Precision for second setpoint */
|
|
189
190
|
secondPrecision?: number;
|
|
190
191
|
}
|
|
191
|
-
interface ControlPanelProps extends
|
|
192
|
+
interface ControlPanelProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
192
193
|
/** Panel title/identifier */
|
|
193
194
|
title: string;
|
|
194
195
|
/** Currently selected mode */
|
|
@@ -249,9 +250,9 @@ interface ControlPanelProps extends react__default.HTMLAttributes<HTMLDivElement
|
|
|
249
250
|
/** Custom stop button text */
|
|
250
251
|
stopButtonText?: string;
|
|
251
252
|
}
|
|
252
|
-
declare const ControlPanel:
|
|
253
|
+
declare const ControlPanel: React__default.FC<ControlPanelProps>;
|
|
253
254
|
|
|
254
|
-
interface StatusIndicatorProps extends
|
|
255
|
+
interface StatusIndicatorProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
255
256
|
/** Status state determining color and behavior */
|
|
256
257
|
status: 'off' | 'normal' | 'alarm' | 'warning' | 'active' | 'fault';
|
|
257
258
|
/** Size of the indicator */
|
|
@@ -267,9 +268,9 @@ interface StatusIndicatorProps extends react__default.HTMLAttributes<HTMLDivElem
|
|
|
267
268
|
/** Whether the indicator should have a 3D LED effect */
|
|
268
269
|
led?: boolean;
|
|
269
270
|
}
|
|
270
|
-
declare const StatusIndicator:
|
|
271
|
+
declare const StatusIndicator: React__default.FC<StatusIndicatorProps>;
|
|
271
272
|
|
|
272
|
-
interface ValueEntryProps extends Omit<
|
|
273
|
+
interface ValueEntryProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
273
274
|
/** Current value */
|
|
274
275
|
value: number | string;
|
|
275
276
|
/** Callback when value changes */
|
|
@@ -291,9 +292,9 @@ interface ValueEntryProps extends Omit<react__default.InputHTMLAttributes<HTMLIn
|
|
|
291
292
|
/** Whether the input is read-only */
|
|
292
293
|
readOnly?: boolean;
|
|
293
294
|
}
|
|
294
|
-
declare const ValueEntry:
|
|
295
|
+
declare const ValueEntry: React__default.FC<ValueEntryProps>;
|
|
295
296
|
|
|
296
|
-
interface LegacyValueEntryProps extends Omit<
|
|
297
|
+
interface LegacyValueEntryProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
297
298
|
/** Current value */
|
|
298
299
|
value: number | string;
|
|
299
300
|
/** Callback when value changes */
|
|
@@ -315,7 +316,7 @@ interface LegacyValueEntryProps extends Omit<react__default.InputHTMLAttributes<
|
|
|
315
316
|
/** Whether the input is read-only */
|
|
316
317
|
readOnly?: boolean;
|
|
317
318
|
}
|
|
318
|
-
declare const LegacyValueEntry:
|
|
319
|
+
declare const LegacyValueEntry: React__default.FC<LegacyValueEntryProps>;
|
|
319
320
|
|
|
320
321
|
interface NodeControlConfig {
|
|
321
322
|
/** Node ID */
|
|
@@ -353,7 +354,7 @@ interface NodeControlConfig {
|
|
|
353
354
|
/** Whether setpoint is read-only */
|
|
354
355
|
readOnly?: boolean;
|
|
355
356
|
}
|
|
356
|
-
interface NodeControlsPanelProps extends
|
|
357
|
+
interface NodeControlsPanelProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
357
358
|
/** Control configuration for the selected node */
|
|
358
359
|
config: NodeControlConfig | null;
|
|
359
360
|
/** Callback to close the panel */
|
|
@@ -372,8 +373,32 @@ interface NodeControlsPanelProps extends react__default.HTMLAttributes<HTMLDivEl
|
|
|
372
373
|
* - Clear visual feedback
|
|
373
374
|
* - Bottom or side slide-in animation
|
|
374
375
|
*/
|
|
375
|
-
declare const NodeControlsPanel:
|
|
376
|
+
declare const NodeControlsPanel: React__default.FC<NodeControlsPanelProps>;
|
|
376
377
|
|
|
378
|
+
/**
|
|
379
|
+
* A custom action button rendered in the device control panel (e.g. Tare, Zero).
|
|
380
|
+
*/
|
|
381
|
+
interface CustomAction {
|
|
382
|
+
/** Stable action id passed to onCustomAction when clicked. */
|
|
383
|
+
id: string;
|
|
384
|
+
/** Button label. */
|
|
385
|
+
label: string;
|
|
386
|
+
/** Optional leading icon / emoji. */
|
|
387
|
+
icon?: string;
|
|
388
|
+
/** Visual variant (reserved for future styling). */
|
|
389
|
+
variant?: 'primary' | 'secondary' | 'alarm' | 'warning';
|
|
390
|
+
/**
|
|
391
|
+
* When true, the button renders disabled and does NOT fire onCustomAction.
|
|
392
|
+
* Use for actions that are only conditionally available (e.g. a Tare that is
|
|
393
|
+
* not ready).
|
|
394
|
+
*/
|
|
395
|
+
disabled?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Tooltip shown on hover explaining why the action is unavailable. Only
|
|
398
|
+
* meaningful when `disabled` is true.
|
|
399
|
+
*/
|
|
400
|
+
disabledReason?: string;
|
|
401
|
+
}
|
|
377
402
|
/**
|
|
378
403
|
* Device control capabilities and commands
|
|
379
404
|
*/
|
|
@@ -387,12 +412,7 @@ interface ControlCapabilities {
|
|
|
387
412
|
/** Can the device be reset? */
|
|
388
413
|
canReset?: boolean;
|
|
389
414
|
/** Custom actions available */
|
|
390
|
-
customActions?:
|
|
391
|
-
id: string;
|
|
392
|
-
label: string;
|
|
393
|
-
icon?: string;
|
|
394
|
-
variant?: 'primary' | 'secondary' | 'alarm' | 'warning';
|
|
395
|
-
}>;
|
|
415
|
+
customActions?: CustomAction[];
|
|
396
416
|
}
|
|
397
417
|
/**
|
|
398
418
|
* Device control mode option
|
|
@@ -576,10 +596,7 @@ declare function createControlBinding(nodeId: string, deviceConfig: {
|
|
|
576
596
|
capabilities?: {
|
|
577
597
|
canStart?: boolean;
|
|
578
598
|
canStop?: boolean;
|
|
579
|
-
customActions?:
|
|
580
|
-
id: string;
|
|
581
|
-
label: string;
|
|
582
|
-
}>;
|
|
599
|
+
customActions?: CustomAction[];
|
|
583
600
|
};
|
|
584
601
|
status?: string;
|
|
585
602
|
isRunning?: boolean;
|
|
@@ -645,7 +662,7 @@ interface DeviceControlPanelProps {
|
|
|
645
662
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
646
663
|
embedded?: boolean;
|
|
647
664
|
}
|
|
648
|
-
declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps):
|
|
665
|
+
declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
649
666
|
|
|
650
667
|
interface NumpadDialogProps {
|
|
651
668
|
/** Whether the dialog is open */
|
|
@@ -694,7 +711,7 @@ interface NumpadDialogProps {
|
|
|
694
711
|
* out-of-range values are rejected (never silently clamped). The field pre-fills
|
|
695
712
|
* with the current value so an operator never blind-zeroes a live setpoint.
|
|
696
713
|
*/
|
|
697
|
-
declare const NumpadDialog:
|
|
714
|
+
declare const NumpadDialog: React__default.FC<NumpadDialogProps>;
|
|
698
715
|
|
|
699
716
|
type DisplayMode = 'standard' | 'dashboard';
|
|
700
717
|
interface FullscreenContainerProps {
|
|
@@ -705,9 +722,9 @@ type OverlayTheme = 'tank' | 'pressure' | 'vessel' | 'flow';
|
|
|
705
722
|
interface SVGLockedOverlayProps {
|
|
706
723
|
svgX: number;
|
|
707
724
|
svgY: number;
|
|
708
|
-
children:
|
|
725
|
+
children: React__default.ReactNode;
|
|
709
726
|
theme?: OverlayTheme;
|
|
710
|
-
style?:
|
|
727
|
+
style?: React__default.CSSProperties;
|
|
711
728
|
className?: string;
|
|
712
729
|
onClick?: () => void;
|
|
713
730
|
containerSelector?: string;
|
|
@@ -752,20 +769,20 @@ interface EquipmentIndicatorProps {
|
|
|
752
769
|
color: string;
|
|
753
770
|
label: string;
|
|
754
771
|
size?: number;
|
|
755
|
-
style?:
|
|
772
|
+
style?: React__default.CSSProperties;
|
|
756
773
|
className?: string;
|
|
757
774
|
}
|
|
758
775
|
interface FullscreenWorkspaceTab {
|
|
759
776
|
label: string;
|
|
760
777
|
value: string;
|
|
761
|
-
content:
|
|
762
|
-
}
|
|
763
|
-
interface FullscreenWorkspaceProps extends
|
|
764
|
-
svgContent:
|
|
765
|
-
overlays?:
|
|
766
|
-
leftPanel?:
|
|
767
|
-
rightPanel?:
|
|
768
|
-
footer?:
|
|
778
|
+
content: React__default.ReactNode;
|
|
779
|
+
}
|
|
780
|
+
interface FullscreenWorkspaceProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
781
|
+
svgContent: React__default.ReactNode;
|
|
782
|
+
overlays?: React__default.ReactNode;
|
|
783
|
+
leftPanel?: React__default.ReactNode;
|
|
784
|
+
rightPanel?: React__default.ReactNode;
|
|
785
|
+
footer?: React__default.ReactNode;
|
|
769
786
|
tabs?: FullscreenWorkspaceTab[];
|
|
770
787
|
activeTab?: string;
|
|
771
788
|
onTabChange?: (value: string) => void;
|
|
@@ -786,60 +803,60 @@ interface FullscreenWorkspaceProps extends react__default.HTMLAttributes<HTMLDiv
|
|
|
786
803
|
zoomDisabled?: boolean;
|
|
787
804
|
}
|
|
788
805
|
|
|
789
|
-
declare const FullscreenContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
806
|
+
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>> & {
|
|
790
807
|
theme?: _emotion_react.Theme;
|
|
791
808
|
} & FullscreenContainerProps, {}, {}>;
|
|
792
|
-
declare const LeftPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
809
|
+
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>> & {
|
|
793
810
|
theme?: _emotion_react.Theme;
|
|
794
811
|
} & {
|
|
795
812
|
collapsed: boolean;
|
|
796
813
|
}, {}, {}>;
|
|
797
|
-
declare const RightPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
814
|
+
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>> & {
|
|
798
815
|
theme?: _emotion_react.Theme;
|
|
799
816
|
} & {
|
|
800
817
|
collapsed: boolean;
|
|
801
818
|
}, {}, {}>;
|
|
802
|
-
declare const SVGArea: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
819
|
+
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>> & {
|
|
803
820
|
theme?: _emotion_react.Theme;
|
|
804
821
|
}, {}, {}>;
|
|
805
|
-
declare const LeftToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
822
|
+
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"> & {
|
|
806
823
|
theme?: _emotion_react.Theme;
|
|
807
824
|
} & {
|
|
808
825
|
collapsed: boolean;
|
|
809
826
|
}, {}, {}>;
|
|
810
|
-
declare const RightToggleButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
827
|
+
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"> & {
|
|
811
828
|
theme?: _emotion_react.Theme;
|
|
812
829
|
} & {
|
|
813
830
|
collapsed: boolean;
|
|
814
831
|
}, {}, {}>;
|
|
815
|
-
declare const DisplayModeToggle: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
832
|
+
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"> & {
|
|
816
833
|
theme?: _emotion_react.Theme;
|
|
817
834
|
} & {
|
|
818
835
|
mode: DisplayMode;
|
|
819
836
|
}, {}, {}>;
|
|
820
|
-
declare const ZoomControls: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
837
|
+
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>> & {
|
|
821
838
|
theme?: _emotion_react.Theme;
|
|
822
839
|
}, {}, {}>;
|
|
823
|
-
declare const ZoomButton: _emotion_styled.StyledComponent<_mui_material.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
840
|
+
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"> & {
|
|
824
841
|
theme?: _emotion_react.Theme;
|
|
825
842
|
}, {}, {}>;
|
|
826
|
-
declare const FooterPanel: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
843
|
+
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>> & {
|
|
827
844
|
theme?: _emotion_react.Theme;
|
|
828
845
|
}, {}, {}>;
|
|
829
|
-
declare const PanelTabs: _emotion_styled.StyledComponent<_mui_material.TabsOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<
|
|
846
|
+
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" | "sx" | "classes" | "action" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "orientation" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar" | "slots" | "slotProps"> & {
|
|
830
847
|
theme?: _emotion_react.Theme;
|
|
831
848
|
}, {}, {}>;
|
|
832
|
-
declare const PanelContent: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
849
|
+
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>> & {
|
|
833
850
|
theme?: _emotion_react.Theme;
|
|
834
851
|
}, {}, {}>;
|
|
835
852
|
declare const FixedSVGContainer: _emotion_styled.StyledComponent<{
|
|
836
853
|
theme?: _emotion_react.Theme;
|
|
837
854
|
as?: React.ElementType;
|
|
838
|
-
},
|
|
855
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
839
856
|
declare const ScrollableSVGWrapper: _emotion_styled.StyledComponent<{
|
|
840
857
|
theme?: _emotion_react.Theme;
|
|
841
858
|
as?: React.ElementType;
|
|
842
|
-
},
|
|
859
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
843
860
|
|
|
844
861
|
declare const baseOverlayStyles: {
|
|
845
862
|
readonly tank: {
|
|
@@ -892,8 +909,8 @@ declare const baseOverlayStyles: {
|
|
|
892
909
|
};
|
|
893
910
|
};
|
|
894
911
|
declare const overlayStyles: Record<OverlayTheme, typeof baseOverlayStyles[OverlayTheme]>;
|
|
895
|
-
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) =>
|
|
896
|
-
declare const DashboardCard: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<
|
|
912
|
+
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) => react_jsx_runtime.JSX.Element;
|
|
913
|
+
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>> & {
|
|
897
914
|
theme?: _emotion_react.Theme;
|
|
898
915
|
} & {
|
|
899
916
|
svgX: number;
|
|
@@ -905,23 +922,23 @@ declare const CardHeader: _emotion_styled.StyledComponent<{
|
|
|
905
922
|
as?: React.ElementType;
|
|
906
923
|
} & {
|
|
907
924
|
color?: string;
|
|
908
|
-
},
|
|
925
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
909
926
|
declare const CardValue: _emotion_styled.StyledComponent<{
|
|
910
927
|
theme?: _emotion_react.Theme;
|
|
911
928
|
as?: React.ElementType;
|
|
912
|
-
},
|
|
929
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
913
930
|
declare const CardUnit: _emotion_styled.StyledComponent<{
|
|
914
931
|
theme?: _emotion_react.Theme;
|
|
915
932
|
as?: React.ElementType;
|
|
916
|
-
},
|
|
933
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
917
934
|
|
|
918
|
-
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, }: TrendLineProps) =>
|
|
919
|
-
declare const CircularGauge: ({ value, max, unit, label, size, color, }: CircularGaugeProps) =>
|
|
920
|
-
declare const Sparkline: ({ data, width, height, color }: SparklineProps) =>
|
|
921
|
-
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, }: EquipmentIndicatorWithSparklineProps) =>
|
|
922
|
-
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, }: EquipmentIndicatorProps) =>
|
|
935
|
+
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, }: TrendLineProps) => react_jsx_runtime.JSX.Element;
|
|
936
|
+
declare const CircularGauge: ({ value, max, unit, label, size, color, }: CircularGaugeProps) => react_jsx_runtime.JSX.Element;
|
|
937
|
+
declare const Sparkline: ({ data, width, height, color }: SparklineProps) => react_jsx_runtime.JSX.Element | null;
|
|
938
|
+
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, }: EquipmentIndicatorWithSparklineProps) => react_jsx_runtime.JSX.Element;
|
|
939
|
+
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, }: EquipmentIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
923
940
|
|
|
924
|
-
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):
|
|
941
|
+
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;
|
|
925
942
|
|
|
926
943
|
type Theme = 'modern' | 'hmi';
|
|
927
944
|
interface ThemeContextType {
|
|
@@ -931,17 +948,17 @@ interface ThemeContextType {
|
|
|
931
948
|
}
|
|
932
949
|
declare const useTheme: () => ThemeContextType;
|
|
933
950
|
interface ThemeProviderProps {
|
|
934
|
-
children:
|
|
951
|
+
children: React__default.ReactNode;
|
|
935
952
|
}
|
|
936
|
-
declare const ThemeProvider:
|
|
953
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
937
954
|
|
|
938
|
-
interface ThemeToggleProps extends
|
|
955
|
+
interface ThemeToggleProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
939
956
|
/** Size of the toggle */
|
|
940
957
|
size?: 'small' | 'medium' | 'large';
|
|
941
958
|
/** Position of the toggle */
|
|
942
959
|
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inline';
|
|
943
960
|
}
|
|
944
|
-
declare const ThemeToggle:
|
|
961
|
+
declare const ThemeToggle: React__default.FC<ThemeToggleProps>;
|
|
945
962
|
|
|
946
963
|
/**
|
|
947
964
|
* ISA-101 High Performance HMI — Unified Status Color System
|
|
@@ -1410,13 +1427,13 @@ interface PIDCanvasFeatures {
|
|
|
1410
1427
|
/** Background color for canvas (default: '#ffffff') */
|
|
1411
1428
|
backgroundColor?: string;
|
|
1412
1429
|
}
|
|
1413
|
-
interface PIDCanvasProps extends
|
|
1430
|
+
interface PIDCanvasProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1414
1431
|
/** The diagram to render */
|
|
1415
1432
|
diagram: Diagram;
|
|
1416
1433
|
/** Optional className for the container */
|
|
1417
1434
|
className?: string;
|
|
1418
1435
|
/** Optional inline styles for the container */
|
|
1419
|
-
style?:
|
|
1436
|
+
style?: React__default.CSSProperties;
|
|
1420
1437
|
/** Enable interactive features (pan, zoom, selection, telemetry, dragNodes) */
|
|
1421
1438
|
features?: PIDCanvasFeatures;
|
|
1422
1439
|
/** Callback when selection changes */
|
|
@@ -1466,13 +1483,13 @@ interface PIDCanvasControls {
|
|
|
1466
1483
|
*
|
|
1467
1484
|
* Future: Editing tools, symbol library UI
|
|
1468
1485
|
*/
|
|
1469
|
-
declare function PIDCanvas({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, statusColorMap, ...props }: PIDCanvasProps):
|
|
1486
|
+
declare function PIDCanvas({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, statusColorMap, ...props }: PIDCanvasProps): React__default.ReactElement;
|
|
1470
1487
|
|
|
1471
1488
|
interface SymbolLibraryProps {
|
|
1472
1489
|
/** Optional className for styling */
|
|
1473
1490
|
className?: string;
|
|
1474
1491
|
/** Callback when a symbol drag starts */
|
|
1475
|
-
onSymbolDragStart?: (symbolId: string, event:
|
|
1492
|
+
onSymbolDragStart?: (symbolId: string, event: React__default.DragEvent) => void;
|
|
1476
1493
|
/** Show category filter */
|
|
1477
1494
|
showCategories?: boolean;
|
|
1478
1495
|
/** Custom symbol categories */
|
|
@@ -1484,7 +1501,7 @@ interface SymbolLibraryProps {
|
|
|
1484
1501
|
* Displays available symbols organized by category
|
|
1485
1502
|
* Supports drag-and-drop to add new nodes to diagrams
|
|
1486
1503
|
*/
|
|
1487
|
-
declare function SymbolLibrary({ className, onSymbolDragStart, showCategories, categories, }: SymbolLibraryProps):
|
|
1504
|
+
declare function SymbolLibrary({ className, onSymbolDragStart, showCategories, categories, }: SymbolLibraryProps): React__default.ReactElement;
|
|
1488
1505
|
|
|
1489
1506
|
interface NodeConfigPanelProps {
|
|
1490
1507
|
/** Selected node to configure */
|
|
@@ -1502,7 +1519,7 @@ interface NodeConfigPanelProps {
|
|
|
1502
1519
|
/** Additional CSS class name */
|
|
1503
1520
|
className?: string;
|
|
1504
1521
|
/** Custom styles */
|
|
1505
|
-
style?:
|
|
1522
|
+
style?: React__default.CSSProperties;
|
|
1506
1523
|
}
|
|
1507
1524
|
/**
|
|
1508
1525
|
* NodeConfigPanel - Reusable configuration panel for editing node properties and telemetry
|
|
@@ -1518,7 +1535,7 @@ interface NodeConfigPanelProps {
|
|
|
1518
1535
|
* />
|
|
1519
1536
|
* ```
|
|
1520
1537
|
*/
|
|
1521
|
-
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemove, className, style, }: NodeConfigPanelProps):
|
|
1538
|
+
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemove, className, style, }: NodeConfigPanelProps): react_jsx_runtime.JSX.Element;
|
|
1522
1539
|
|
|
1523
1540
|
/**
|
|
1524
1541
|
* Validates a diagram object structure
|
|
@@ -1940,7 +1957,7 @@ interface DeviceConfigPanelProps {
|
|
|
1940
1957
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
1941
1958
|
embedded?: boolean;
|
|
1942
1959
|
}
|
|
1943
|
-
declare function DeviceConfigPanel({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps):
|
|
1960
|
+
declare function DeviceConfigPanel({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1944
1961
|
|
|
1945
1962
|
/**
|
|
1946
1963
|
* Options for simulation behavior
|
|
@@ -1980,4 +1997,4 @@ interface SimulationOptions {
|
|
|
1980
1997
|
*/
|
|
1981
1998
|
declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
|
|
1982
1999
|
|
|
1983
|
-
export { type AnchorType, Button, type ButtonProps, 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, 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, FixedSVGContainer, FooterPanel, 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, 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, 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, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, resolveStatusColor, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
|
|
2000
|
+
export { type AnchorType, Button, type ButtonProps, 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, FixedSVGContainer, FooterPanel, 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, 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, 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, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, resolveStatusColor, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
|
package/dist/index.js
CHANGED
|
@@ -1755,33 +1755,41 @@ function DeviceControlPanel({
|
|
|
1755
1755
|
}
|
|
1756
1756
|
)
|
|
1757
1757
|
] }),
|
|
1758
|
-
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ jsx8("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) =>
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1758
|
+
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ jsx8("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) => {
|
|
1759
|
+
const actionDisabled = action.disabled === true;
|
|
1760
|
+
return /* @__PURE__ */ jsxs7(
|
|
1761
|
+
"button",
|
|
1762
|
+
{
|
|
1763
|
+
onClick: () => {
|
|
1764
|
+
if (!actionDisabled) onCustomAction?.(action.id);
|
|
1765
|
+
},
|
|
1766
|
+
disabled: actionDisabled,
|
|
1767
|
+
title: actionDisabled ? action.disabledReason : void 0,
|
|
1768
|
+
style: {
|
|
1769
|
+
flex: 1,
|
|
1770
|
+
minWidth: "120px",
|
|
1771
|
+
height: touchSize,
|
|
1772
|
+
backgroundColor: surfaceColor,
|
|
1773
|
+
color: textColor,
|
|
1774
|
+
border: `1px solid ${borderColor}`,
|
|
1775
|
+
borderRadius: "6px",
|
|
1776
|
+
fontSize: "11px",
|
|
1777
|
+
fontWeight: 600,
|
|
1778
|
+
fontFamily: "monospace",
|
|
1779
|
+
letterSpacing: "0.5px",
|
|
1780
|
+
textTransform: "uppercase",
|
|
1781
|
+
cursor: actionDisabled ? "not-allowed" : "pointer",
|
|
1782
|
+
opacity: actionDisabled ? 0.4 : 1,
|
|
1783
|
+
transition: "all 0.15s"
|
|
1784
|
+
},
|
|
1785
|
+
children: [
|
|
1786
|
+
action.icon && /* @__PURE__ */ jsx8("span", { style: { marginRight: "6px" }, children: action.icon }),
|
|
1787
|
+
action.label
|
|
1788
|
+
]
|
|
1777
1789
|
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
]
|
|
1782
|
-
},
|
|
1783
|
-
action.id
|
|
1784
|
-
)) })
|
|
1790
|
+
action.id
|
|
1791
|
+
);
|
|
1792
|
+
}) })
|
|
1785
1793
|
] }),
|
|
1786
1794
|
binding.state.lastCommandResult && showToast && /* @__PURE__ */ jsx8(
|
|
1787
1795
|
"div",
|
|
@@ -4821,6 +4829,30 @@ function PipeRenderer({
|
|
|
4821
4829
|
|
|
4822
4830
|
// src/components/PIDCanvas/DataOverlay.tsx
|
|
4823
4831
|
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4832
|
+
var PULSE_KEYFRAME_ID = "pid-data-overlay-pulse-keyframes";
|
|
4833
|
+
var PULSE_ANIMATION = "pid-data-overlay-pulse 1.5s ease-in-out infinite";
|
|
4834
|
+
function ensurePulseKeyframes() {
|
|
4835
|
+
if (typeof document === "undefined") return;
|
|
4836
|
+
if (document.getElementById(PULSE_KEYFRAME_ID)) return;
|
|
4837
|
+
const style = document.createElement("style");
|
|
4838
|
+
style.id = PULSE_KEYFRAME_ID;
|
|
4839
|
+
style.textContent = "@keyframes pid-data-overlay-pulse{0%{opacity:.9}50%{opacity:.3}100%{opacity:.9}}";
|
|
4840
|
+
document.head.appendChild(style);
|
|
4841
|
+
}
|
|
4842
|
+
function renderStatusDot(cx, cy, scale, fill) {
|
|
4843
|
+
ensurePulseKeyframes();
|
|
4844
|
+
return /* @__PURE__ */ jsx18(
|
|
4845
|
+
"circle",
|
|
4846
|
+
{
|
|
4847
|
+
className: "pid-data-overlay-status-dot",
|
|
4848
|
+
cx: cx + 35 * scale,
|
|
4849
|
+
cy: cy - 18 * scale,
|
|
4850
|
+
r: 3 * scale,
|
|
4851
|
+
fill,
|
|
4852
|
+
style: { animation: PULSE_ANIMATION }
|
|
4853
|
+
}
|
|
4854
|
+
);
|
|
4855
|
+
}
|
|
4824
4856
|
function DataOverlay({
|
|
4825
4857
|
nodeId,
|
|
4826
4858
|
x,
|
|
@@ -4925,25 +4957,7 @@ function DataOverlay({
|
|
|
4925
4957
|
children: displayText
|
|
4926
4958
|
}
|
|
4927
4959
|
),
|
|
4928
|
-
showStatus && value.status !== "normal" &&
|
|
4929
|
-
"circle",
|
|
4930
|
-
{
|
|
4931
|
-
cx: displayX + 35 * scale,
|
|
4932
|
-
cy: displayY - 18 * scale,
|
|
4933
|
-
r: 3 * scale,
|
|
4934
|
-
fill: finalTextColor,
|
|
4935
|
-
opacity: "0.9",
|
|
4936
|
-
children: /* @__PURE__ */ jsx18(
|
|
4937
|
-
"animate",
|
|
4938
|
-
{
|
|
4939
|
-
attributeName: "opacity",
|
|
4940
|
-
values: "0.9;0.3;0.9",
|
|
4941
|
-
dur: "1.5s",
|
|
4942
|
-
repeatCount: "indefinite"
|
|
4943
|
-
}
|
|
4944
|
-
)
|
|
4945
|
-
}
|
|
4946
|
-
),
|
|
4960
|
+
showStatus && value.status !== "normal" && renderStatusDot(displayX, displayY, scale, finalTextColor),
|
|
4947
4961
|
value.quality !== void 0 && value.quality < 100 && /* @__PURE__ */ jsxs14(
|
|
4948
4962
|
"text",
|
|
4949
4963
|
{
|
|
@@ -8609,14 +8623,17 @@ function DeviceConfigPanel({
|
|
|
8609
8623
|
const currentTimestamp = binding?.state.lastSaved || 0;
|
|
8610
8624
|
if (binding?.state.lastSaveResult && currentTimestamp !== lastResultTimestampRef.current) {
|
|
8611
8625
|
lastResultTimestampRef.current = currentTimestamp;
|
|
8626
|
+
let hideTimer;
|
|
8612
8627
|
const showTimer = setTimeout(() => {
|
|
8613
8628
|
setShowToast(true);
|
|
8614
|
-
|
|
8629
|
+
hideTimer = setTimeout(() => {
|
|
8615
8630
|
setShowToast(false);
|
|
8616
8631
|
}, toastDuration);
|
|
8617
|
-
return () => clearTimeout(hideTimer);
|
|
8618
8632
|
}, 0);
|
|
8619
|
-
return () =>
|
|
8633
|
+
return () => {
|
|
8634
|
+
clearTimeout(showTimer);
|
|
8635
|
+
if (hideTimer) clearTimeout(hideTimer);
|
|
8636
|
+
};
|
|
8620
8637
|
}
|
|
8621
8638
|
}, [binding?.state.lastSaveResult, binding?.state.lastSaved, toastDuration]);
|
|
8622
8639
|
const parametersBySection = useMemo(() => {
|